diff --git a/cmd/ci-operator/main_test.go b/cmd/ci-operator/main_test.go index 5c41913aa3f..d2ab10c4ebe 100644 --- a/cmd/ci-operator/main_test.go +++ b/cmd/ci-operator/main_test.go @@ -1004,7 +1004,7 @@ func TestBuildPartialGraph(t *testing.T) { loggingclient.New(fakectrlruntimeclient.NewClientBuilder().WithRuntimeObjects(&imagev1.ImageStreamTag{ObjectMeta: metav1.ObjectMeta{Name: ":"}}).Build(), nil), nil, ), - steps.SourceStep(api.SourceStepConfiguration{From: api.PipelineImageStreamTagReferenceRoot, To: api.PipelineImageStreamTagReferenceSource}, api.ResourceConfiguration{}, nil, nil, &api.JobSpec{}, nil, nil, nil), + steps.SourceStep(api.SourceStepConfiguration{From: api.PipelineImageStreamTagReferenceRoot, To: api.PipelineImageStreamTagReferenceSource}, api.ResourceConfiguration{}, nil, nil, &api.JobSpec{}, nil, nil, nil, "openshift"), steps.ProjectDirectoryImageBuildStep( api.ProjectDirectoryImageBuildStepConfiguration{ From: api.PipelineImageStreamTagReferenceSource, diff --git a/go.mod b/go.mod index b10e083fba8..4c78f9aeb9e 100644 --- a/go.mod +++ b/go.mod @@ -164,14 +164,16 @@ require ( cloud.google.com/go/resourcemanager v1.10.3 cloud.google.com/go/secretmanager v1.14.5 github.com/GoogleCloudPlatform/secrets-store-csi-driver-provider-gcp v1.7.0 - github.com/aws/aws-sdk-go-v2 v1.36.3 + github.com/aws/aws-sdk-go-v2 v1.41.5 github.com/aws/aws-sdk-go-v2/config v1.29.14 github.com/aws/aws-sdk-go-v2/credentials v1.17.67 github.com/aws/aws-sdk-go-v2/service/cloudformation v1.56.0 + github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.68.0 + github.com/aws/aws-sdk-go-v2/service/codebuild v1.68.13 github.com/aws/aws-sdk-go-v2/service/ec2 v1.194.0 github.com/aws/aws-sdk-go-v2/service/s3 v1.69.0 github.com/aws/aws-sdk-go-v2/service/sts v1.33.19 - github.com/aws/smithy-go v1.22.2 + github.com/aws/smithy-go v1.24.2 github.com/coreos/stream-metadata-go v0.1.8 github.com/estesp/manifest-tool/v2 v2.1.8 github.com/felixge/httpsnoop v1.0.4 @@ -232,11 +234,11 @@ require ( github.com/andygrunwald/go-gerrit v0.0.0-20230211083816-04e01d7217b2 // indirect github.com/antlr4-go/antlr/v4 v4.13.0 // indirect github.com/apache/arrow/go/v15 v15.0.2 // indirect - github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.7 // indirect + github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.8 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30 // indirect github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.10 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.21 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.21 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.24 // indirect github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3 // indirect diff --git a/go.sum b/go.sum index 118d9002909..9e5ef36f94b 100644 --- a/go.sum +++ b/go.sum @@ -174,10 +174,10 @@ github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:l github.com/aws/aws-sdk-go v1.42.23/go.mod h1:gyRszuZ/icHmHAVE4gc/r+cfCmhA1AD+vqfWbgI+eHs= github.com/aws/aws-sdk-go v1.55.5 h1:KKUZBfBoyqy5d3swXyiC7Q76ic40rYcbqH7qjh59kzU= github.com/aws/aws-sdk-go v1.55.5/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU= -github.com/aws/aws-sdk-go-v2 v1.36.3 h1:mJoei2CxPutQVxaATCzDUjcZEjVRdpsiiXi2o38yqWM= -github.com/aws/aws-sdk-go-v2 v1.36.3/go.mod h1:LLXuLpgzEbD766Z5ECcRmi8AzSwfZItDtmABVkRLGzg= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.7 h1:lL7IfaFzngfx0ZwUGOZdsFFnQ5uLvR0hWqqhyE7Q9M8= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.7/go.mod h1:QraP0UcVlQJsmHfioCrveWOC1nbiWUl3ej08h4mXWoc= +github.com/aws/aws-sdk-go-v2 v1.41.5 h1:dj5kopbwUsVUVFgO4Fi5BIT3t4WyqIDjGKCangnV/yY= +github.com/aws/aws-sdk-go-v2 v1.41.5/go.mod h1:mwsPRE8ceUUpiTgF7QmQIJ7lgsKUPQOUl3o72QBrE1o= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.8 h1:eBMB84YGghSocM7PsjmmPffTa+1FBUeNvGvFou6V/4o= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.8/go.mod h1:lyw7GFp3qENLh7kwzf7iMzAxDn+NzjXEAGjKS2UOKqI= github.com/aws/aws-sdk-go-v2/config v1.29.14 h1:f+eEi/2cKCg9pqKBoAIwRGzVb70MRKqWX4dg1BDcSJM= github.com/aws/aws-sdk-go-v2/config v1.29.14/go.mod h1:wVPHWcIFv3WO89w0rE10gzf17ZYy+UVS1Geq8Iei34g= github.com/aws/aws-sdk-go-v2/credentials v1.17.67 h1:9KxtdcIA/5xPNQyZRgUSpYOE6j9Bc4+D7nZua0KGYOM= @@ -186,16 +186,20 @@ github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30 h1:x793wxmUWVDhshP8WW2mln github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30/go.mod h1:Jpne2tDnYiFascUEs2AWHJL9Yp7A5ZVy3TNyxaAjD6M= github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.10 h1:zeN9UtUlA6FTx0vFSayxSX32HDw73Yb6Hh2izDSFxXY= github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.10/go.mod h1:3HKuexPDcwLWPaqpW2UR/9n8N/u/3CKcGAzSs8p8u8g= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34 h1:ZK5jHhnrioRkUNOc+hOgQKlUL5JeC3S6JgLxtQ+Rm0Q= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34/go.mod h1:p4VfIceZokChbA9FzMbRGz5OV+lekcVtHlPKEO0gSZY= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34 h1:SZwFm17ZUNNg5Np0ioo/gq8Mn6u9w19Mri8DnJ15Jf0= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34/go.mod h1:dFZsC0BLo346mvKQLWmoJxT+Sjp+qcVR1tRVHQGOH9Q= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.21 h1:Rgg6wvjjtX8bNHcvi9OnXWwcE0a2vGpbwmtICOsvcf4= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.21/go.mod h1:A/kJFst/nm//cyqonihbdpQZwiUhhzpqTsdbhDdRF9c= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.21 h1:PEgGVtPoB6NTpPrBgqSE5hE/o47Ij9qk/SEZFbUOe9A= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.21/go.mod h1:p+hz+PRAYlY3zcpJhPwXlLC4C+kqn70WIHwnzAfs6ps= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 h1:bIqFDwgGXXN1Kpp99pDOdKMTTb5d2KyU5X/BZxjOkRo= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3/go.mod h1:H5O/EsxDWyU+LP/V8i5sm8cxoZgc2fdNR9bxlOFrQTo= github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.24 h1:JX70yGKLj25+lMC5Yyh8wBtvB01GDilyRuJvXJ4piD0= github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.24/go.mod h1:+Ln60j9SUTD0LEwnhEB0Xhg61DHqplBrbZpLgyjoEHg= github.com/aws/aws-sdk-go-v2/service/cloudformation v1.56.0 h1:zmXJiEm/fQYtFDLIUsZrcPIjTrL3R/noFICGlYBj3Ww= github.com/aws/aws-sdk-go-v2/service/cloudformation v1.56.0/go.mod h1:9nOjXCDKE+QMK4JaCrLl36PU+VEfJmI7WVehYmojO8s= +github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.68.0 h1:+/lmB/+i2oqkzbmlQxsW0kr/+wmJgmyiEF9VDJicX34= +github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.68.0/go.mod h1:PobeppEnIjw4pcgjFryNDZCTH7AiqZw0yb5r98Gvf9c= +github.com/aws/aws-sdk-go-v2/service/codebuild v1.68.13 h1:EEdmtkVROLA9VniV5STKv/EfEgV+n9NFBpOYU1jN9As= +github.com/aws/aws-sdk-go-v2/service/codebuild v1.68.13/go.mod h1:+pwMMAvpmRuI7oHsTT2F5Lrp4ZQV2RF7b6tiaBj3Ugk= github.com/aws/aws-sdk-go-v2/service/ec2 v1.194.0 h1:56YXcRmryw9wiTrvdVeJEUwBCoN/+o33R52PA7CCi08= github.com/aws/aws-sdk-go-v2/service/ec2 v1.194.0/go.mod h1:mzj8EEjIHSN2oZRXiw1Dd+uB4HZTl7hC8nBzX9IZMWw= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3 h1:eAh2A4b5IzM/lum78bZ590jy36+d/aFLgKF/4Vd1xPE= @@ -214,8 +218,8 @@ github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.1 h1:hXmVKytPfTy5axZ+fYbR5d0c github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.1/go.mod h1:MlYRNmYu/fGPoxBQVvBYr9nyr948aY/WLUvwBMBJubs= github.com/aws/aws-sdk-go-v2/service/sts v1.33.19 h1:1XuUZ8mYJw9B6lzAkXhqHlJd/XvaX32evhproijJEZY= github.com/aws/aws-sdk-go-v2/service/sts v1.33.19/go.mod h1:cQnB8CUnxbMU82JvlqjKR2HBOm3fe9pWorWBza6MBJ4= -github.com/aws/smithy-go v1.22.2 h1:6D9hW43xKFrRx/tXXfAlIZc4JI+yQe6snnWcQyxSyLQ= -github.com/aws/smithy-go v1.22.2/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= +github.com/aws/smithy-go v1.24.2 h1:FzA3bu/nt/vDvmnkg+R8Xl46gmzEDam6mZ1hzmwXFng= +github.com/aws/smithy-go v1.24.2/go.mod h1:YE2RhdIuDbA5E5bTdciG9KrW3+TiEONeUWCqxX9i1Fc= github.com/bazelbuild/buildtools v0.0.0-20200922170545-10384511ce98 h1:OhVnC5zU5QHQ+DUSmgOTPqPnJnrlFmrh2S0HKeHmpbw= github.com/bazelbuild/buildtools v0.0.0-20200922170545-10384511ce98/go.mod h1:5JP0TXzWDHXv8qvxRC4InIazwdyDseBDbzESUMKk1yU= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= diff --git a/pkg/api/config.go b/pkg/api/config.go index ae58ba32452..d259d9af3d4 100644 --- a/pkg/api/config.go +++ b/pkg/api/config.go @@ -57,6 +57,10 @@ func (config *ReleaseBuildConfiguration) Default() { for i := range config.Tests { defTest(&config.Tests[i]) } + + if config.BuildType == "" { + config.BuildType = "openshift" + } } // ImageStreamFor guesses at the ImageStream that will hold a tag. diff --git a/pkg/api/types.go b/pkg/api/types.go index bd6db72227c..862dd98748e 100644 --- a/pkg/api/types.go +++ b/pkg/api/types.go @@ -39,6 +39,8 @@ type ReleaseBuildConfiguration struct { InputConfiguration `json:",inline"` + BuildType string `json:"build_type,omitempty"` + // BinaryBuildCommands will create a "bin" image based on "src" that // contains the output of this command. This allows reuse of binary artifacts // across other steps. If empty, no "bin" image will be created. diff --git a/pkg/defaults/defaults.go b/pkg/defaults/defaults.go index 487f26e3b9e..be2d4cd984d 100644 --- a/pkg/defaults/defaults.go +++ b/pkg/defaults/defaults.go @@ -201,13 +201,13 @@ func fromConfig(ctx context.Context, cfg *Config) ([]api.Step, []api.Step, error inputImages[conf.InputImage] = struct{}{} } else if rawStep.PipelineImageCacheStepConfiguration != nil { skippedBinaries := filterRequiredBinariesFromSkipped(cfg.CIConfig.Images.Items, cfg.SkippedImages) - step = steps.PipelineImageCacheStep(*rawStep.PipelineImageCacheStepConfiguration, cfg.CIConfig.Resources, cfg.buildClient, cfg.podClient, cfg.JobSpec, cfg.PullSecret, cfg.MetricsAgent, skippedBinaries) + step = steps.PipelineImageCacheStep(*rawStep.PipelineImageCacheStepConfiguration, cfg.CIConfig.Resources, cfg.buildClient, cfg.podClient, cfg.JobSpec, cfg.PullSecret, cfg.MetricsAgent, skippedBinaries, cfg.CIConfig.BuildType) } else if rawStep.SourceStepConfiguration != nil { - step = steps.SourceStep(*rawStep.SourceStepConfiguration, cfg.CIConfig.Resources, cfg.buildClient, cfg.podClient, cfg.JobSpec, cfg.CloneAuthConfig, cfg.PullSecret, cfg.MetricsAgent) + step = steps.SourceStep(*rawStep.SourceStepConfiguration, cfg.CIConfig.Resources, cfg.buildClient, cfg.podClient, cfg.JobSpec, cfg.CloneAuthConfig, cfg.PullSecret, cfg.MetricsAgent, cfg.CIConfig.BuildType) } else if rawStep.BundleSourceStepConfiguration != nil { - step = steps.BundleSourceStep(*rawStep.BundleSourceStepConfiguration, cfg.CIConfig, cfg.CIConfig.Resources, cfg.buildClient, cfg.podClient, cfg.JobSpec, cfg.PullSecret) + step = steps.BundleSourceStep(*rawStep.BundleSourceStepConfiguration, cfg.CIConfig, cfg.CIConfig.Resources, cfg.buildClient, cfg.podClient, cfg.JobSpec, cfg.PullSecret, cfg.CIConfig.BuildType) } else if rawStep.IndexGeneratorStepConfiguration != nil { - step = steps.IndexGeneratorStep(*rawStep.IndexGeneratorStepConfiguration, cfg.CIConfig, cfg.CIConfig.Resources, cfg.buildClient, cfg.podClient, cfg.JobSpec, cfg.PullSecret, cfg.MetricsAgent) + step = steps.IndexGeneratorStep(*rawStep.IndexGeneratorStepConfiguration, cfg.CIConfig, cfg.CIConfig.Resources, cfg.buildClient, cfg.podClient, cfg.JobSpec, cfg.PullSecret, cfg.MetricsAgent, cfg.CIConfig.BuildType) } else if rawStep.ProjectDirectoryImageBuildStepConfiguration != nil { imgConfig := rawStep.ProjectDirectoryImageBuildStepConfiguration if cfg.SkippedImages.Has(string(imgConfig.To)) { @@ -216,9 +216,9 @@ func fromConfig(ctx context.Context, cfg *Config) ([]api.Step, []api.Step, error } step = steps.ProjectDirectoryImageBuildStep(*imgConfig, cfg.CIConfig, cfg.CIConfig.Resources, cfg.buildClient, cfg.podClient, cfg.JobSpec, cfg.PullSecret, cfg.MetricsAgent) } else if rawStep.ProjectDirectoryImageBuildInputs != nil { - step = steps.GitSourceStep(*rawStep.ProjectDirectoryImageBuildInputs, cfg.CIConfig.Resources, cfg.buildClient, cfg.podClient, cfg.JobSpec, cfg.CloneAuthConfig, cfg.PullSecret, cfg.MetricsAgent) + step = steps.GitSourceStep(*rawStep.ProjectDirectoryImageBuildInputs, cfg.CIConfig.Resources, cfg.buildClient, cfg.podClient, cfg.JobSpec, cfg.CloneAuthConfig, cfg.PullSecret, cfg.MetricsAgent, cfg.CIConfig.BuildType) } else if rawStep.RPMImageInjectionStepConfiguration != nil { - step = steps.RPMImageInjectionStep(*rawStep.RPMImageInjectionStepConfiguration, cfg.CIConfig.Resources, cfg.buildClient, cfg.podClient, cfg.JobSpec, cfg.PullSecret, cfg.MetricsAgent) + step = steps.RPMImageInjectionStep(*rawStep.RPMImageInjectionStepConfiguration, cfg.CIConfig.Resources, cfg.buildClient, cfg.podClient, cfg.JobSpec, cfg.PullSecret, cfg.MetricsAgent, cfg.CIConfig.BuildType) } else if rawStep.RPMServeStepConfiguration != nil { step = steps.RPMServerStep(*rawStep.RPMServeStepConfiguration, cfg.kubeClient, cfg.JobSpec) } else if rawStep.OutputImageTagStepConfiguration != nil { diff --git a/pkg/steps/bundle_source.go b/pkg/steps/bundle_source.go index e41d2256b49..5ec95572b7d 100644 --- a/pkg/steps/bundle_source.go +++ b/pkg/steps/bundle_source.go @@ -26,6 +26,7 @@ type bundleSourceStep struct { podClient kubernetes.PodClient jobSpec *api.JobSpec pullSecret *coreapi.Secret + buildType string } func (s *bundleSourceStep) Inputs() (api.InputDefinition, error) { @@ -82,7 +83,7 @@ func (s *bundleSourceStep) run(ctx context.Context) error { // Bundle images are not multi-arch by design. Here we build it without creating a manifest-listed image. // Note that we are not configuring a node selector here, so the build will be scheduled on any available // node no matter the architecture. - return handleBuild(ctx, s.client, s.podClient, *build) + return handleBuild(ctx, s.client, s.podClient, *build, s.buildType) } func replaceCommand(pullSpec, with string) string { @@ -144,6 +145,7 @@ func BundleSourceStep( podClient kubernetes.PodClient, jobSpec *api.JobSpec, pullSecret *coreapi.Secret, + buildType string, ) api.Step { return &bundleSourceStep{ config: config, @@ -153,5 +155,6 @@ func BundleSourceStep( podClient: podClient, jobSpec: jobSpec, pullSecret: pullSecret, + buildType: buildType, } } diff --git a/pkg/steps/git_source.go b/pkg/steps/git_source.go index a92cda826ee..22b34fa9a92 100644 --- a/pkg/steps/git_source.go +++ b/pkg/steps/git_source.go @@ -27,6 +27,7 @@ type gitSourceStep struct { pullSecret *coreapi.Secret architectures sets.Set[string] metricsAgent *metrics.MetricsAgent + buildType string } func (s *gitSourceStep) Inputs() (api.InputDefinition, error) { @@ -52,7 +53,7 @@ func (s *gitSourceStep) run(ctx context.Context) error { if s.config.Ref != "" { root = fmt.Sprintf("%s-%s", root, s.config.Ref) } - return handleBuilds(ctx, s.buildClient, s.podClient, *buildFromSource(s.jobSpec, "", api.PipelineImageStreamTagReference(root), buildapi.BuildSource{ + return handleBuilds(ctx, s.buildClient, s.podClient, s.buildType, *buildFromSource(s.jobSpec, "", api.PipelineImageStreamTagReference(root), buildapi.BuildSource{ Type: buildapi.BuildSourceGit, Dockerfile: s.config.DockerfileLiteral, ContextDir: s.config.ContextDir, @@ -142,6 +143,7 @@ func GitSourceStep( cloneAuthConfig *CloneAuthConfig, pullSecret *coreapi.Secret, metricsAgent *metrics.MetricsAgent, + buildType string, ) api.Step { return &gitSourceStep{ config: config, @@ -153,5 +155,6 @@ func GitSourceStep( pullSecret: pullSecret, architectures: sets.New[string](), metricsAgent: metricsAgent, + buildType: buildType, } } diff --git a/pkg/steps/index_generator.go b/pkg/steps/index_generator.go index 3025b539351..d0cbc9dcd47 100644 --- a/pkg/steps/index_generator.go +++ b/pkg/steps/index_generator.go @@ -32,6 +32,7 @@ type indexGeneratorStep struct { pullSecret *coreapi.Secret architectures sets.Set[string] metricsAgent *metrics.MetricsAgent + buildType string } const IndexDataDirectory = "/index-data" @@ -126,7 +127,7 @@ func (s *indexGeneratorStep) run(ctx context.Context) error { nil, "", ) - err = handleBuilds(ctx, s.client, s.podClient, *build, s.metricsAgent, newImageBuildOptions(s.architectures.UnsortedList())) + err = handleBuilds(ctx, s.client, s.podClient, s.buildType, *build, s.metricsAgent, newImageBuildOptions(s.architectures.UnsortedList())) if err != nil && strings.Contains(err.Error(), "error checking provided apis") { return results.ForReason("generating_index").WithError(err).Errorf("failed to generate operator index due to invalid bundle info: %v", err) } @@ -217,6 +218,7 @@ func IndexGeneratorStep( jobSpec *api.JobSpec, pullSecret *coreapi.Secret, metricsAgent *metrics.MetricsAgent, + buildType string, ) api.Step { return &indexGeneratorStep{ config: config, @@ -228,5 +230,6 @@ func IndexGeneratorStep( pullSecret: pullSecret, architectures: sets.New[string](), metricsAgent: metricsAgent, + buildType: buildType, } } diff --git a/pkg/steps/pipeline_image_cache.go b/pkg/steps/pipeline_image_cache.go index b367147f5fd..7e38c776b77 100644 --- a/pkg/steps/pipeline_image_cache.go +++ b/pkg/steps/pipeline_image_cache.go @@ -38,6 +38,7 @@ type pipelineImageCacheStep struct { architectures sets.Set[string] metricsAgent *metrics.MetricsAgent skippedImages sets.Set[string] + buildType string } func (s *pipelineImageCacheStep) Inputs() (api.InputDefinition, error) { @@ -75,7 +76,7 @@ func (s *pipelineImageCacheStep) run(ctx context.Context) error { build.Spec.Strategy.DockerStrategy.Env = append(build.Spec.Strategy.DockerStrategy.Env, coreapi.EnvVar{Name: SkippedImagesEnvVar, Value: strings.Join(sets.List(s.skippedImages), ",")}) } - return handleBuilds(ctx, s.client, s.podClient, *build, s.metricsAgent, newImageBuildOptions(s.architectures.UnsortedList())) + return handleBuilds(ctx, s.client, s.podClient, s.buildType, *build, s.metricsAgent, newImageBuildOptions(s.architectures.UnsortedList())) } func (s *pipelineImageCacheStep) Requires() []api.StepLink { @@ -122,6 +123,7 @@ func PipelineImageCacheStep( pullSecret *coreapi.Secret, metricsAgent *metrics.MetricsAgent, skippedImages sets.Set[string], + buildType string, ) api.Step { return &pipelineImageCacheStep{ config: config, @@ -133,5 +135,6 @@ func PipelineImageCacheStep( architectures: sets.New[string](), metricsAgent: metricsAgent, skippedImages: skippedImages, + buildType: buildType, } } diff --git a/pkg/steps/project_image.go b/pkg/steps/project_image.go index 3b9e68c2204..9ee588a8977 100644 --- a/pkg/steps/project_image.go +++ b/pkg/steps/project_image.go @@ -32,6 +32,7 @@ type projectDirectoryImageBuildStep struct { multiArch bool architectures sets.Set[string] metricsAgent *metrics.MetricsAgent + buildType string } func (s *projectDirectoryImageBuildStep) Inputs() (api.InputDefinition, error) { @@ -72,10 +73,10 @@ func (s *projectDirectoryImageBuildStep) run(ctx context.Context) error { // Bundle images are non multi-arch by design. No manifest list is needed. Here we spawn a single build. if s.config.IsBundleImage() { - return handleBuild(ctx, s.client, s.podClient, *build) + return handleBuild(ctx, s.client, s.podClient, *build, s.buildType) } - return handleBuilds(ctx, s.client, s.podClient, *build, s.metricsAgent, newImageBuildOptions(s.architectures.UnsortedList())) + return handleBuilds(ctx, s.client, s.podClient, s.buildType, *build, s.metricsAgent, newImageBuildOptions(s.architectures.UnsortedList())) } type workingDir func(tag string) (string, error) diff --git a/pkg/steps/rpm_injection.go b/pkg/steps/rpm_injection.go index 395b8a407f6..9fa9056e8f0 100644 --- a/pkg/steps/rpm_injection.go +++ b/pkg/steps/rpm_injection.go @@ -31,6 +31,7 @@ type rpmImageInjectionStep struct { pullSecret *coreapi.Secret architectures sets.Set[string] metricsAgent *metrics.MetricsAgent + buildType string } func (s *rpmImageInjectionStep) Inputs() (api.InputDefinition, error) { @@ -54,7 +55,7 @@ func (s *rpmImageInjectionStep) run(ctx context.Context) error { if err != nil { return err } - return handleBuilds(ctx, s.client, s.podClient, *buildFromSource( + return handleBuilds(ctx, s.client, s.podClient, s.buildType, *buildFromSource( s.jobSpec, s.config.From, s.config.To, buildapi.BuildSource{ Type: buildapi.BuildSourceDockerfile, @@ -107,6 +108,7 @@ func RPMImageInjectionStep( jobSpec *api.JobSpec, pullSecret *coreapi.Secret, metricsAgent *metrics.MetricsAgent, + buildType string, ) api.Step { return &rpmImageInjectionStep{ config: config, @@ -117,5 +119,6 @@ func RPMImageInjectionStep( pullSecret: pullSecret, architectures: sets.New[string](), metricsAgent: metricsAgent, + buildType: buildType, } } diff --git a/pkg/steps/source.go b/pkg/steps/source.go index ac18768008b..515b75ebe36 100644 --- a/pkg/steps/source.go +++ b/pkg/steps/source.go @@ -5,14 +5,22 @@ import ( "fmt" "io" "os" + "path/filepath" + "regexp" "sort" "strings" "sync" "sync/atomic" "time" + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/openshift/ci-tools/pkg/kubernetes/pkg/credentialprovider" + "github.com/openshift/ci-tools/pkg/util/buildspec" "github.com/sirupsen/logrus" "golang.org/x/sync/errgroup" + "k8s.io/apimachinery/pkg/util/json" + "k8s.io/utils/ptr" + "sigs.k8s.io/yaml" corev1 "k8s.io/api/core/v1" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -30,6 +38,10 @@ import ( buildapi "github.com/openshift/api/build/v1" imagev1 "github.com/openshift/api/image/v1" + "github.com/aws/aws-sdk-go-v2/config" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs" + "github.com/aws/aws-sdk-go-v2/service/codebuild" + codebuildtypes "github.com/aws/aws-sdk-go-v2/service/codebuild/types" "github.com/openshift/ci-tools/pkg/api" apiutils "github.com/openshift/ci-tools/pkg/api/utils" "github.com/openshift/ci-tools/pkg/kubernetes" @@ -173,6 +185,7 @@ type sourceStep struct { pullSecret *corev1.Secret architectures sets.Set[string] metricsAgent *metrics.MetricsAgent + buildType string } func (s *sourceStep) Inputs() (api.InputDefinition, error) { @@ -196,6 +209,7 @@ func (s *sourceStep) run(ctx context.Context) error { ctx, s.client, s.podClient, + s.buildType, *createBuild(s.config, s.jobSpec, clonerefsRef, s.resources, s.cloneAuthConfig, s.pullSecret, fromDigest), s.metricsAgent, newImageBuildOptions(s.architectures.UnsortedList()), ) } @@ -474,7 +488,7 @@ func newImageBuildOptions(archs []string) ImageBuildOptions { return ImageBuildOptions{Architectures: archs} } -func handleBuilds(ctx context.Context, buildClient BuildClient, podClient kubernetes.PodClient, build buildapi.Build, metricsAgent *metrics.MetricsAgent, opts ...ImageBuildOptions) error { +func handleBuilds(ctx context.Context, buildClient BuildClient, podClient kubernetes.PodClient, buildType string, build buildapi.Build, metricsAgent *metrics.MetricsAgent, opts ...ImageBuildOptions) error { var wg sync.WaitGroup o := ImageBuildOptions{} @@ -490,7 +504,7 @@ func handleBuilds(ctx context.Context, buildClient BuildClient, podClient kubern go func(b buildapi.Build) { defer wg.Done() metricsAgent.AddNodeWorkload(ctx, b.Namespace, fmt.Sprintf("%s-build", b.Name), b.Name, podClient) - if err := handleBuild(ctx, buildClient, podClient, b); err != nil { + if err := handleBuild(ctx, buildClient, podClient, b, buildType); err != nil { errChan <- fmt.Errorf("error occurred handling build %s: %w", b.Name, err) } metricsAgent.RemoveNodeWorkload(b.Name) @@ -548,33 +562,14 @@ func constructMultiArchBuilds(build buildapi.Build, stepArchitectures []string) return ret } -func handleBuild(ctx context.Context, client BuildClient, podClient kubernetes.PodClient, build buildapi.Build) error { +func handleBuild(ctx context.Context, buildClient BuildClient, podClient kubernetes.PodClient, build buildapi.Build, buildType string) error { const attempts = 5 - ns, name := build.Namespace, build.Name var errs []error if err := wait.ExponentialBackoff(wait.Backoff{Duration: time.Minute, Factor: 1.5, Steps: attempts}, func() (bool, error) { - var attempt buildapi.Build - - build.DeepCopyInto(&attempt) - if err := client.Create(ctx, &attempt); err == nil { - logrus.Infof("Created build %q", name) - } else if kerrors.IsAlreadyExists(err) { - logrus.Infof("Found existing build %q", name) - } else { - return false, fmt.Errorf("could not create build %s: %w", name, err) - } - - client.MetricsAgent().AddNodeWorkload(ctx, ns, fmt.Sprintf("%s-build", name), name, podClient) - client.MetricsAgent().StoreMachinesSnapshotForBuildPod(ctx, ns, fmt.Sprintf("%s-build", name), podClient) - if err := waitForBuildOrTimeout(ctx, client, podClient, ns, name); err != nil { - errs = append(errs, err) - return false, handleFailedBuild(ctx, client, ns, name, err) + if buildType == "aws" { + return awsBuild(ctx, buildClient, build, &errs) } - if err := gatherSuccessfulBuildLog(client, ns, name); err != nil { - // log error but do not fail successful build - logrus.WithError(err).Warnf("Failed gathering successful build %s logs into artifacts.", name) - } - return true, nil + return openshiftBuild(ctx, buildClient, podClient, build, &errs) }); err != nil { if err == wait.ErrWaitTimeout { return fmt.Errorf("build not successful after %d attempts: %w", attempts, utilerrors.NewAggregate(errs)) @@ -844,6 +839,7 @@ func SourceStep( cloneAuthConfig *CloneAuthConfig, pullSecret *corev1.Secret, metricsAgent *metrics.MetricsAgent, + buildType string, ) api.Step { return &sourceStep{ config: config, @@ -855,6 +851,7 @@ func SourceStep( pullSecret: pullSecret, architectures: sets.New[string](), metricsAgent: metricsAgent, + buildType: buildType, } } @@ -908,3 +905,325 @@ func addLabelsToBuild(refs *prowv1.Refs, build *buildapi.Build, contextDir strin return build.Spec.Output.ImageLabels[i].Name < build.Spec.Output.ImageLabels[j].Name }) } + +func openshiftBuild(ctx context.Context, buildClient BuildClient, podClient kubernetes.PodClient, build buildapi.Build, errs *[]error) (bool, error) { + var attempt buildapi.Build + ns, name := build.Namespace, build.Name + build.DeepCopyInto(&attempt) + if err := buildClient.Create(ctx, &attempt); err == nil { + logrus.Infof("Created build %q", name) + } else if kerrors.IsAlreadyExists(err) { + logrus.Infof("Found existing build %q", name) + } else { + return false, fmt.Errorf("could not create build %s: %w", name, err) + } + + buildClient.MetricsAgent().AddNodeWorkload(ctx, ns, fmt.Sprintf("%s-build", name), name, podClient) + buildClient.MetricsAgent().StoreMachinesSnapshotForBuildPod(ctx, ns, fmt.Sprintf("%s-build", name), podClient) + if err := waitForBuildOrTimeout(ctx, buildClient, podClient, ns, name); err != nil { + *errs = append(*errs, err) + return false, handleFailedBuild(ctx, buildClient, ns, name, err) + } + if err := gatherSuccessfulBuildLog(buildClient, ns, name); err != nil { + // log error but do not fail successful build + logrus.WithError(err).Warnf("Failed gathering successful build %s logs into artifacts.", name) + } + return true, nil +} + +func awsBuild(ctx context.Context, buildClient BuildClient, build buildapi.Build, errs *[]error) (bool, error) { + projectName := fmt.Sprintf("%s-%s", build.Namespace, build.Name) + sdkConfig, err := config.LoadDefaultConfig(ctx) + if err != nil { + *errs = append(*errs, err) + return false, fmt.Errorf("could not load aws credentials: %w", err) + } + + cbClient := codebuild.NewFromConfig(sdkConfig) + projects, err := cbClient.BatchGetProjects(ctx, &codebuild.BatchGetProjectsInput{Names: []string{projectName}}) + if err != nil { + *errs = append(*errs, err) + return false, fmt.Errorf("could not get project %s: %w", projectName, err) + } + + projectExists := len(projects.Projects) > 0 + if !projectExists { + is := &imagev1.ImageStreamTag{} + credentials, err := awsBuildAssemblyCredentials(ctx, buildClient, build, is, errs) + if err != nil { + return false, err + } + buildSpec, err := awsBuildSpec(build, string(credentials), is.Image.DockerImageReference, buildClient.LocalRegistryDNS()) + if err != nil { + return false, err + } + + err = awsBuildCreateCloudBuildProject(ctx, build, cbClient, buildSpec, projectName, errs) + if err != nil { + return false, err + } + } + + sbi := &codebuild.StartBuildInput{ + ProjectName: &projectName, + } + + awsBuildResult, err := cbClient.StartBuild(ctx, sbi) + if err != nil { + *errs = append(*errs, err) + return false, fmt.Errorf("could not start build at codebuild project %s: %w", projectName, err) + } + + err = awsBuildWaitForIt(ctx, sdkConfig, cbClient, awsBuildResult, build.Name) + if err != nil { + *errs = append(*errs, err) + return false, fmt.Errorf("could not wait/pull logs for build %s: %w", build.Namespace, err) + } + + return true, nil +} + +func awsBuildSpec(build buildapi.Build, credentials string, imageStreamReference, localRegistryDNS string) (buildspec.BuildSpec, error) { + commands := []string{ + `mkdir -p ~/.docker`, + `echo "$credentials" > ~/.docker/config.json`, + `echo "$dockerfile" > Dockerfile`, + } + for i, image := range build.Spec.CommonSpec.Source.Images { + commands = append(commands, fmt.Sprintf(`docker create --name c%d %s`, i, util.ShellEscape(image.From.Name))) + for _, path := range image.Paths { + commands = append(commands, fmt.Sprintf(`docker cp c%d:%s %s`, i, util.ShellEscape(path.SourcePath), util.ShellEscape(path.DestinationDir))) + } + commands = append(commands, fmt.Sprintf(`docker rm c%d`, i)) + } + + buildEnv := []string{} + buildArgs := []string{} + for _, env := range build.Spec.CommonSpec.Strategy.DockerStrategy.Env { + buildEnv = append(buildEnv, fmt.Sprintf(`--build-arg %s='%s'`, env.Name, util.ShellEscape(env.Value))) + buildArgs = append(buildArgs, fmt.Sprintf(`ARG %s`, env.Name)) + } + + re := regexp.MustCompile(`image-registry\.openshift-image-registry\.svc[.:a-z0-9]*`) + imageStreamReference = re.ReplaceAllString(imageStreamReference, localRegistryDNS) + commands = append(commands, fmt.Sprintf(`docker buildx build %s --platform linux/%s --tag %s/%s/%s --output type=registry .`, strings.Join(buildEnv, " "), build.Spec.NodeSelector["kubernetes.io/arch"], localRegistryDNS, build.Namespace, build.Spec.Output.To.Name)) + if build.Spec.CommonSpec.Source.Dockerfile == nil { + return buildspec.BuildSpec{}, fmt.Errorf("no Dockerfile defined on build.spec") + } + dockerFile := strings.ReplaceAll(*build.Spec.CommonSpec.Source.Dockerfile, build.Spec.CommonSpec.Strategy.DockerStrategy.From.Name, fmt.Sprintf("%s\n%s", imageStreamReference, strings.Join(buildArgs, "\n"))) + + return buildspec.BuildSpec{ + Env: buildspec.Env{ + Variables: buildspec.Variables{ + DockerFile: dockerFile, + Credentials: credentials, + }, + }, + Phases: buildspec.Phases{ + Build: buildspec.BuildPhase{ + OnFailure: "ABORT", + Commands: commands, + }, + }, + Version: "0.2", + }, nil +} + +func awsBuildAssemblyCredentials(ctx context.Context, buildClient BuildClient, build buildapi.Build, is *imagev1.ImageStreamTag, errs *[]error) ([]byte, error) { + if build.Spec.Strategy.DockerStrategy == nil || build.Spec.Strategy.DockerStrategy.PullSecret == nil { + err := fmt.Errorf("build %s has no pull secret configured", build.Name) + *errs = append(*errs, err) + return nil, err + } + secretName := build.Spec.Strategy.DockerStrategy.PullSecret.Name + secret := &corev1.Secret{} + err := buildClient.Get(ctx, ctrlruntimeclient.ObjectKey{Namespace: build.Namespace, Name: secretName}, secret) + if err != nil { + *errs = append(*errs, err) + if kerrors.IsNotFound(err) { + return nil, fmt.Errorf("could not get secret %s: %w", secretName, err) + } + return nil, fmt.Errorf("could not get secret %s: %w", secretName, err) + } + + isName := build.Spec.Strategy.DockerStrategy.From.Name + err = buildClient.Get(ctx, ctrlruntimeclient.ObjectKey{Namespace: build.Namespace, Name: isName}, is) + if err != nil { + *errs = append(*errs, err) + if kerrors.IsNotFound(err) { + return nil, fmt.Errorf("could not get imagestream %s: %w", isName, err) + } + return nil, fmt.Errorf("could not get imagestream %s: %w", isName, err) + } + + dockerConfigJSON, found := secret.Data[corev1.DockerConfigJsonKey] + if !found { + *errs = append(*errs, fmt.Errorf("key %s not found on secret %s", corev1.DockerConfigJsonKey, secret.Name)) + return nil, fmt.Errorf("key %s not found on secret %s", corev1.DockerConfigJsonKey, secret.Name) + } + + manifestToolDockerCfg := buildClient.ManifestToolDockerCfg() + pushCredentialsData, err := os.ReadFile(manifestToolDockerCfg) + if err != nil { + *errs = append(*errs, err) + return nil, fmt.Errorf("could not read secret %s: %w", manifestToolDockerCfg, err) + } + pushCredentials := credentialprovider.DockerConfigJSON{} + err = json.Unmarshal(pushCredentialsData, &pushCredentials) + if err != nil { + *errs = append(*errs, err) + return nil, fmt.Errorf("could not unmarshal secret %s: %w", manifestToolDockerCfg, err) + } + + registryCredentials := credentialprovider.DockerConfigJSON{} + err = json.Unmarshal(dockerConfigJSON, ®istryCredentials) + if err != nil { + *errs = append(*errs, err) + return nil, fmt.Errorf("could not unmarshal secret %s: %w", secret.Name, err) + } + if registryCredentials.Auths == nil { + registryCredentials.Auths = map[string]credentialprovider.DockerConfigEntry{} + } + localRegistryDNS := buildClient.LocalRegistryDNS() + localRegistryAuth, exists := pushCredentials.Auths[localRegistryDNS] + if !exists { + err := fmt.Errorf("local registry auth %s not found", localRegistryDNS) + *errs = append(*errs, err) + return nil, err + } + registryCredentials.Auths[localRegistryDNS] = localRegistryAuth + marshalledRegistryCredentials, err := json.Marshal(registryCredentials) + if err != nil { + *errs = append(*errs, err) + return nil, fmt.Errorf("could not marshal manifesttooldockercfg combined with registry-pull-credentials: %w", err) + } + return marshalledRegistryCredentials, nil +} + +func awsBuildCreateCloudBuildProject(ctx context.Context, build buildapi.Build, cbClient *codebuild.Client, buildSpec buildspec.BuildSpec, projectName string, errs *[]error) error { + awsBuildImage := "aws/codebuild/amazonlinux2-x86_64-standard:6.0" + awsEnvironmentTypeContainer := codebuildtypes.EnvironmentTypeLinuxContainer + if build.Spec.NodeSelector["kubernetes.io/arch"] == "arm64" { + awsBuildImage = "aws/codebuild/amazonlinux2-aarch64-standard:3.0" + awsEnvironmentTypeContainer = codebuildtypes.EnvironmentTypeArmContainer + } + const ServiceRole string = "codebuild-ci-operator" + marshaledBuildSpec, err := yaml.Marshal(buildSpec) + if err != nil { + *errs = append(*errs, err) + return fmt.Errorf("could not marshal codebuild buildspec: %w", err) + } + logrus.Infof("Creating %s project", projectName) + _, err = cbClient.CreateProject(ctx, &codebuild.CreateProjectInput{ + Name: &projectName, + TimeoutInMinutes: ptr.To(int32(60 * 8)), + Artifacts: &codebuildtypes.ProjectArtifacts{ + Type: codebuildtypes.ArtifactsTypeNoArtifacts, + }, + Environment: &codebuildtypes.ProjectEnvironment{ + Type: awsEnvironmentTypeContainer, + Image: &awsBuildImage, + ComputeType: codebuildtypes.ComputeTypeBuildGeneral1Medium, + }, + Source: &codebuildtypes.ProjectSource{ + Type: codebuildtypes.SourceTypeNoSource, + Buildspec: ptr.To(string(marshaledBuildSpec)), + }, + ServiceRole: ptr.To(ServiceRole), + }) + if err != nil { + *errs = append(*errs, err) + return fmt.Errorf("could not create codebuild project %s: %w", projectName, err) + } + return nil +} + +func awsBuildWaitForIt(ctx context.Context, sdkConfig aws.Config, cbClient *codebuild.Client, buildOutput *codebuild.StartBuildOutput, imageName string) error { + artifactDir, set := api.Artifacts() + if !set { + return fmt.Errorf("no artifacts directory configured") + } + dir := filepath.Join(artifactDir, "build-logs") + if err := os.MkdirAll(dir, 0750); err != nil { + return fmt.Errorf("could not create artifacts/build-logs dir: %w", err) + } + logPath := filepath.Join(dir, fmt.Sprintf("%s.log", imageName)) + log, err := os.Create(logPath) + if err != nil { + return fmt.Errorf("failed to create %s: %w", logPath, err) + } + defer log.Close() + buildId := aws.ToString(buildOutput.Build.Id) + logrus.Infof("Waiting for build %s to complete", buildId) + for { + // avoid maximum number of attempts + time.Sleep(10 * time.Second) + + if ctx.Err() != nil { + return fmt.Errorf("build polling canceled: %w", ctx.Err()) + } + + buildInputs := codebuild.BatchGetBuildsInput{Ids: []string{buildId}} + builds, err := cbClient.BatchGetBuilds(ctx, &buildInputs) + if err != nil { + return fmt.Errorf("could not get build %s: %w", buildId, err) + } + + if len(builds.Builds) == 0 { + return fmt.Errorf("no builds found with id %s", buildId) + } + + build := builds.Builds[0] + status := build.BuildStatus + if status == codebuildtypes.StatusTypeSucceeded { + return awsBuildGatherLogs(ctx, sdkConfig, build, log) + } else if status == codebuildtypes.StatusTypeFailed || status == codebuildtypes.StatusTypeStopped { + if err := awsBuildGatherLogs(ctx, sdkConfig, build, log); err != nil { + return err + } + logFile, err := os.Open(logPath) + defer logFile.Close() + if err != nil { + return fmt.Errorf("could not open %s: %w", logPath, err) + } + if _, err := io.Copy(os.Stdout, logFile); err != nil { + logrus.WithError(err).Warn("Unable to copy log output from failed aws codebuild.") + } + return fmt.Errorf("build %s failed or was stopped with status: %s", buildId, status) + } + } +} + +func awsBuildGatherLogs(ctx context.Context, sdkConfig aws.Config, build codebuildtypes.Build, log *os.File) error { + buildId := aws.ToString(build.Id) + if build.Logs == nil || build.Logs.GroupName == nil || build.Logs.StreamName == nil { + return fmt.Errorf("cloudwatch log location is missing for build %s", buildId) + } + cloudwatch := cloudwatchlogs.NewFromConfig(sdkConfig) + input := &cloudwatchlogs.GetLogEventsInput{ + LogGroupName: build.Logs.GroupName, + LogStreamName: build.Logs.StreamName, + StartFromHead: &[]bool{true}[0], + } + paginator := cloudwatchlogs.NewGetLogEventsPaginator(cloudwatch, input) + for paginator.HasMorePages() { + page, err := paginator.NextPage(ctx) + if err != nil { + return fmt.Errorf("could not read logs for build %s: %w", buildId, err) + } + if len(page.Events) == 0 { + break + } + for _, event := range page.Events { + if event.Timestamp == nil || event.Message == nil { + continue + } + timestamp := time.Unix(*event.Timestamp/1000, 0) + _, err := log.Write([]byte(fmt.Sprintf("[%s] %s", timestamp.Format(time.RFC3339), *event.Message))) + if err != nil { + return fmt.Errorf("could not write log for %s on %s: %w", buildId, log.Name(), err) + } + } + } + return nil +} diff --git a/pkg/util/buildspec/buildspec.go b/pkg/util/buildspec/buildspec.go new file mode 100644 index 00000000000..e49aee702e6 --- /dev/null +++ b/pkg/util/buildspec/buildspec.go @@ -0,0 +1,23 @@ +package buildspec + +type BuildSpec struct { + Env Env `json:"env"` + Phases Phases `json:"phases"` + Version string `json:"version"` +} + +type Env struct { + Variables Variables `json:"variables"` +} +type Phases struct { + Build BuildPhase `json:"build"` +} + +type Variables struct { + DockerFile string `json:"dockerfile"` + Credentials string `json:"credentials"` +} +type BuildPhase struct { + OnFailure string `json:"on-failure"` + Commands []string `json:"commands"` +} diff --git a/pkg/util/util.go b/pkg/util/util.go index d9506e7d7fd..3866a983f2e 100644 --- a/pkg/util/util.go +++ b/pkg/util/util.go @@ -2,6 +2,7 @@ package util import ( "sort" + "strings" "golang.org/x/exp/constraints" ) @@ -94,3 +95,8 @@ func PopCount[T comparable](xs ...T) (ret uint) { } return } + +// ShellEscape escapes a string for safe use in shell single quotes +func ShellEscape(command string) string { + return strings.ReplaceAll(command, "'", "'\\''") +} 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 index a015cc5b20c..3219517dabc 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/config.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/config.go @@ -6,6 +6,7 @@ import ( smithybearer "github.com/aws/smithy-go/auth/bearer" "github.com/aws/smithy-go/logging" "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" ) // HTTPClient provides the interface to provide custom HTTPClients. Generally @@ -192,6 +193,17 @@ type Config struct { // This variable is sourced from environment variable AWS_RESPONSE_CHECKSUM_VALIDATION or // the shared config profile attribute "response_checksum_validation". ResponseChecksumValidation ResponseChecksumValidation + + // Registry of HTTP interceptors. + Interceptors smithyhttp.InterceptorRegistry + + // Priority list of preferred auth scheme IDs. + AuthSchemePreference []string + + // ServiceOptions provides service specific configuration options that will be applied + // when constructing clients for specific services. Each callback function receives the service ID + // and the service's Options struct, allowing for dynamic configuration based on the service. + ServiceOptions []func(string, any) } // NewConfig returns a new Config pointer that can be chained with builder 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 index 4ad2ee4405d..9f94cfe0046 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/credentials.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/credentials.go @@ -118,6 +118,10 @@ const ( CredentialSourceHTTP // CredentialSourceIMDS credentials resolved from the instance metadata service (IMDS) CredentialSourceIMDS + // CredentialSourceProfileLogin credentials resolved from an `aws login` session sourced from a profile + CredentialSourceProfileLogin + // CredentialSourceLogin credentials resolved from an `aws login` session + CredentialSourceLogin ) // A Credentials is the AWS credentials value for individual credential fields. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go index 8e930fc6f87..57bfbfb694c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go @@ -3,4 +3,4 @@ package aws // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.36.3" +const goModuleVersion = "1.41.5" 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 index 6ee3391be27..157a71505cd 100644 --- 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 @@ -135,6 +135,11 @@ const ( UserAgentFeatureCredentialsAwsSdkStore = "y" // n/a (this is used by .NET based sdk) UserAgentFeatureCredentialsHTTP = "z" UserAgentFeatureCredentialsIMDS = "0" + + UserAgentFeatureBearerServiceEnvVars = "3" + + UserAgentFeatureCredentialsProfileLogin = "AC" + UserAgentFeatureCredentialsLogin = "AD" ) var credentialSourceToFeature = map[aws.CredentialSource]UserAgentFeature{ @@ -158,6 +163,8 @@ var credentialSourceToFeature = map[aws.CredentialSource]UserAgentFeature{ aws.CredentialSourceProcess: UserAgentFeatureCredentialsProcess, aws.CredentialSourceHTTP: UserAgentFeatureCredentialsHTTP, aws.CredentialSourceIMDS: UserAgentFeatureCredentialsIMDS, + aws.CredentialSourceProfileLogin: UserAgentFeatureCredentialsProfileLogin, + aws.CredentialSourceLogin: UserAgentFeatureCredentialsLogin, } // RequestUserAgent is a build middleware that set the User-Agent for the request. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/CHANGELOG.md index a4872987aef..ba519e46f7f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/CHANGELOG.md @@ -1,3 +1,56 @@ +# v1.7.8 (2026-03-23) + +* No change notes available for this release. + +# v1.7.7 (2026-03-13) + +* **Bug Fix**: Replace usages of the old ioutil/ package throughout the SDK. + +# v1.7.6 (2026-03-03) + +* **Bug Fix**: Modernize non codegen files with go fix +* **Dependency Update**: Bump minimum Go version to 1.24 + +# v1.7.5 (2026-02-23) + +* No change notes available for this release. + +# v1.7.4 (2025-12-02) + +* **Dependency Update**: Upgrade to smithy-go v1.24.0. Notably this version of the library reduces the allocation footprint of the middleware system. We observe a ~10% reduction in allocations per SDK call with this change. + +# v1.7.3 (2025-11-04) + +* **Dependency Update**: Upgrade to smithy-go v1.23.2 which should convey some passive reduction of overall allocations, especially when not using the metrics system. + +# v1.7.2 (2025-10-16) + +* **Dependency Update**: Bump minimum Go version to 1.23. + +# v1.7.1 (2025-08-27) + +* **Dependency Update**: Update to smithy-go v1.23.0. + +# v1.7.0 (2025-07-28) + +* **Feature**: Add support for HTTP interceptors. + +# v1.6.11 (2025-06-17) + +* **Dependency Update**: Update to smithy-go v1.22.4. + +# v1.6.10 (2025-02-18) + +* **Bug Fix**: Bump go version to 1.22 + +# v1.6.9 (2025-02-14) + +* **Bug Fix**: Remove max limit on event stream messages + +# v1.6.8 (2025-01-24) + +* **Dependency Update**: Upgrade to smithy-go v1.22.2. + # v1.6.7 (2024-11-18) * **Dependency Update**: Update to smithy-go v1.22.1. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/debug.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/debug.go index 151054971a5..ca4394f8bf7 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/debug.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/debug.go @@ -82,9 +82,9 @@ type decodedHeaders Headers func (hs *decodedHeaders) UnmarshalJSON(b []byte) error { var jsonHeaders []struct { - Name string `json:"name"` - Type valueType `json:"type"` - Value interface{} `json:"value"` + Name string `json:"name"` + Type valueType `json:"type"` + Value any `json:"value"` } decoder := json.NewDecoder(bytes.NewReader(b)) @@ -106,7 +106,7 @@ func (hs *decodedHeaders) UnmarshalJSON(b []byte) error { return nil } -func valueFromType(typ valueType, val interface{}) (Value, error) { +func valueFromType(typ valueType, val any) (Value, error) { switch typ { case trueValueType: return BoolValue(true), nil @@ -139,6 +139,6 @@ func valueFromType(typ valueType, val interface{}) (Value, error) { copy(tv[:], v) return tv, err default: - panic(fmt.Sprintf("unknown type, %s, %T", typ.String(), val)) + return nil, fmt.Errorf("unable to decode unknown type, %s, %T", typ.String(), val) } } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/encode.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/encode.go index f03ee4b934b..61cf7238d96 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/encode.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/encode.go @@ -157,7 +157,7 @@ func EncodeHeaders(w io.Writer, headers Headers) error { return nil } -func binaryWriteFields(w io.Writer, order binary.ByteOrder, vs ...interface{}) error { +func binaryWriteFields(w io.Writer, order binary.ByteOrder, vs ...any) error { for _, v := range vs { if err := binary.Write(w, order, v); err != nil { return err diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/error.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/error.go index 5481ef30796..7616214dd64 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/error.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/error.go @@ -7,7 +7,7 @@ type LengthError struct { Part string Want int Have int - Value interface{} + Value any } func (e LengthError) Error() string { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/go_module_metadata.go index 78af41cbedf..77ac62d5246 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/go_module_metadata.go @@ -3,4 +3,4 @@ package eventstream // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.6.7" +const goModuleVersion = "1.7.8" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/header.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/header.go index f6f8c5674ed..b5aacca00ec 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/header.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/header.go @@ -34,7 +34,7 @@ func (hs *Headers) Set(name string, value Value) { // Get returns the Value associated with the header. Nil is returned if the // value does not exist. func (hs Headers) Get(name string) Value { - for i := 0; i < len(hs); i++ { + for i := range hs { if h := hs[i]; h.Name == name { return h.Value } @@ -151,7 +151,7 @@ func decodeHeaderValue(r io.Reader) (Value, error) { err = tv.decode(r) v = tv default: - panic(fmt.Sprintf("unknown value type %d", raw.Type)) + return nil, fmt.Errorf("unable to decode header of unknown value type %d", raw.Type) } // Error could be EOF, let caller deal with it diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/header_value.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/header_value.go index 423b6bb26c1..61ed35366d2 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/header_value.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/header_value.go @@ -62,7 +62,7 @@ type rawValue struct { Value []byte // byte representation of value, BigEndian encoding. } -func (r rawValue) encodeScalar(w io.Writer, v interface{}) error { +func (r rawValue) encodeScalar(w io.Writer, v any) error { return binaryWriteFields(w, binary.BigEndian, r.Type, v, @@ -158,7 +158,7 @@ func decodeStringValue(r io.Reader) (string, error) { // Value represents the abstract header value. type Value interface { - Get() interface{} + Get() any String() string valueType() valueType encode(io.Writer) error @@ -169,7 +169,7 @@ type Value interface { type BoolValue bool // Get returns the underlying type -func (v BoolValue) Get() interface{} { +func (v BoolValue) Get() any { return bool(v) } @@ -196,7 +196,7 @@ func (v BoolValue) encode(w io.Writer) error { type Int8Value int8 // Get returns the underlying value. -func (v Int8Value) Get() interface{} { +func (v Int8Value) Get() any { return int8(v) } @@ -234,7 +234,7 @@ func (v *Int8Value) decode(r io.Reader) error { type Int16Value int16 // Get returns the underlying value. -func (v Int16Value) Get() interface{} { +func (v Int16Value) Get() any { return int16(v) } @@ -271,7 +271,7 @@ func (v *Int16Value) decode(r io.Reader) error { type Int32Value int32 // Get returns the underlying value. -func (v Int32Value) Get() interface{} { +func (v Int32Value) Get() any { return int32(v) } @@ -308,7 +308,7 @@ func (v *Int32Value) decode(r io.Reader) error { type Int64Value int64 // Get returns the underlying value. -func (v Int64Value) Get() interface{} { +func (v Int64Value) Get() any { return int64(v) } @@ -345,7 +345,7 @@ func (v *Int64Value) decode(r io.Reader) error { type BytesValue []byte // Get returns the underlying value. -func (v BytesValue) Get() interface{} { +func (v BytesValue) Get() any { return []byte(v) } @@ -383,7 +383,7 @@ func (v *BytesValue) decode(r io.Reader) error { type StringValue string // Get returns the underlying value. -func (v StringValue) Get() interface{} { +func (v StringValue) Get() any { return string(v) } @@ -421,7 +421,7 @@ func (v *StringValue) decode(r io.Reader) error { type TimestampValue time.Time // Get returns the underlying value. -func (v TimestampValue) Get() interface{} { +func (v TimestampValue) Get() any { return time.Time(v) } @@ -478,7 +478,7 @@ func timeFromEpochMilli(t int64) time.Time { type UUIDValue [16]byte // Get returns the underlying value. -func (v UUIDValue) Get() interface{} { +func (v UUIDValue) Get() any { return v[:] } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/message.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/message.go index f7427da039e..1a77654f7e5 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/message.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/message.go @@ -10,9 +10,6 @@ const preludeLen = 8 const preludeCRCLen = 4 const msgCRCLen = 4 const minMsgLen = preludeLen + preludeCRCLen + msgCRCLen -const maxPayloadLen = 1024 * 1024 * 16 // 16MB -const maxHeadersLen = 1024 * 128 // 128KB -const maxMsgLen = minMsgLen + maxHeadersLen + maxPayloadLen var crc32IEEETable = crc32.MakeTable(crc32.IEEE) @@ -82,28 +79,13 @@ func (p messagePrelude) PayloadLen() uint32 { } func (p messagePrelude) ValidateLens() error { - if p.Length == 0 || p.Length > maxMsgLen { + if p.Length == 0 { return LengthError{ Part: "message prelude", - Want: maxMsgLen, + Want: minMsgLen, Have: int(p.Length), } } - if p.HeadersLen > maxHeadersLen { - return LengthError{ - Part: "message headers", - Want: maxHeadersLen, - Have: int(p.HeadersLen), - } - } - if payloadLen := p.PayloadLen(); payloadLen > maxPayloadLen { - return LengthError{ - Part: "message payload", - Want: maxPayloadLen, - Have: int(payloadLen), - } - } - return nil } 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 index 36034479113..39efd848cd6 100644 --- 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 @@ -3,7 +3,7 @@ package query import ( "context" "fmt" - "io/ioutil" + "io" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -52,7 +52,7 @@ func (m *asGetRequest) HandleSerialize( delim = "&" } - b, err := ioutil.ReadAll(stream) + b, err := io.ReadAll(stream) if err != nil { return out, metadata, fmt.Errorf("unable to get request body %w", err) } 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 index 52d59b04bf6..52acb62f913 100644 --- 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 @@ -6,6 +6,7 @@ import ( "fmt" "strconv" "strings" + "sync/atomic" "time" internalcontext "github.com/aws/aws-sdk-go-v2/internal/context" @@ -43,6 +44,10 @@ type Attempt struct { // A Meter instance for recording retry-related metrics. OperationMeter metrics.Meter + // Initial clock skew that would have been saved from a previous operation + // call. + ClientSkew *atomic.Int64 + retryer aws.RetryerV2 requestCloner RequestCloner } @@ -82,8 +87,12 @@ func (r Attempt) logf(logger logging.Logger, classification logging.Classificati 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 + if r.ClientSkew != nil { + attemptClockSkew = time.Duration(r.ClientSkew.Load()) + } + + var attemptNum int var attemptResults AttemptResults maxAttempts := r.retryer.MaxAttempts() @@ -99,6 +108,8 @@ func (r *Attempt) HandleFinalize(ctx context.Context, in smithymiddle.FinalizeIn attemptInput := in attemptInput.Request = r.requestCloner(attemptInput.Request) + ctx = internalcontext.SetAttemptSkewContext(ctx, attemptClockSkew) + // Record the metadata for the for attempt being started. attemptCtx := setRetryMetadata(ctx, retryMetadata{ AttemptNum: attemptNum, @@ -107,9 +118,6 @@ func (r *Attempt) HandleFinalize(ctx context.Context, in smithymiddle.FinalizeIn AttemptClockSkew: attemptClockSkew, }) - // Setting clock skew to be used on other context (like signing) - ctx = internalcontext.SetAttemptSkewContext(ctx, attemptClockSkew) - var attemptResult AttemptResult attemptCtx, span := tracing.StartSpan(attemptCtx, "Attempt", func(o *tracing.SpanOptions) { @@ -149,6 +157,14 @@ func (r *Attempt) HandleFinalize(ctx context.Context, in smithymiddle.FinalizeIn } } + // this guarantees we are staying on top of the persistent skew value + // (either to apply it or to heal it back if the clocks realign) + if r.ClientSkew != nil { + if resultSkew, ok := awsmiddle.GetAttemptSkew(metadata); ok { + r.ClientSkew.Store(resultSkew.Nanoseconds()) + } + } + addAttemptResults(&metadata, attemptResults) return out, metadata, err } @@ -260,7 +276,7 @@ func (r *Attempt) handleAttempt( // Get a retry token that will be released after the releaseRetryToken, retryTokenErr := r.retryer.GetRetryToken(ctx, err) if retryTokenErr != nil { - return out, attemptResult, nopRelease, retryTokenErr + return out, attemptResult, nopRelease, errors.Join(err, retryTokenErr) } //------------------------------ diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/stream.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/stream.go index 66aa2bd6ab0..32875e07798 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/stream.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/stream.go @@ -59,7 +59,7 @@ func (s *StreamSigner) GetSignature(ctx context.Context, headers, payload []byte prevSignature := s.prevSignature - st := v4Internal.NewSigningTime(signingTime) + st := v4Internal.NewSigningTime(signingTime.UTC()) sigKey := s.signingKeyDeriver.DeriveKey(s.credentials, s.service, s.region, st) 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 index 8d7c35a9ec8..49cc31205c5 100644 --- 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 @@ -18,6 +18,7 @@ var ( // Default connection pool options DefaultHTTPTransportMaxIdleConns = 100 DefaultHTTPTransportMaxIdleConnsPerHost = 10 + DefaultHTTPTransportMaxConnsPerHost = 2048 // Default connection timeouts DefaultHTTPTransportIdleConnTimeout = 90 * time.Second @@ -186,6 +187,7 @@ func defaultHTTPTransport() *http.Transport { TLSHandshakeTimeout: DefaultHTTPTransportTLSHandleshakeTimeout, MaxIdleConns: DefaultHTTPTransportMaxIdleConns, MaxIdleConnsPerHost: DefaultHTTPTransportMaxIdleConnsPerHost, + MaxConnsPerHost: DefaultHTTPTransportMaxConnsPerHost, IdleConnTimeout: DefaultHTTPTransportIdleConnTimeout, ExpectContinueTimeout: DefaultHTTPTransportExpectContinueTimeout, ForceAttemptHTTP2: true, @@ -298,6 +300,17 @@ func limitedRedirect(r *http.Request, via []*http.Request) error { switch resp.StatusCode { case 307, 308: // Only allow 307 and 308 redirects as they preserve the method. + + // If redirecting to a different host, remove X-Amz-Security-Token header + // to prevent credentials from being sent to a different host, similar to + // how Authorization header is handled by the HTTP client. + if len(via) > 0 { + lastRequest := via[len(via)-1] + if lastRequest.URL.Host != r.URL.Host { + r.Header.Del("X-Amz-Security-Token") + } + } + return nil } 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 index 993929bd9b7..4881ae1445b 100644 --- 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 @@ -64,6 +64,11 @@ func (r *timeoutReadCloser) Close() error { // AddResponseReadTimeoutMiddleware adds a middleware to the stack that wraps the // response body so that a read that takes too long will return an error. +// +// Deprecated: This API was previously exposed to customize behavior of the +// Kinesis service. That customization has been removed and this middleware's +// implementation can cause panics within the standard library networking loop. +// See #2752. func AddResponseReadTimeoutMiddleware(stack *middleware.Stack, duration time.Duration) error { return stack.Deserialize.Add(&readTimeout{duration: duration}, middleware.After) } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md index eae3e16af7d..1def5e2d9fa 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md @@ -1,3 +1,111 @@ +# v1.4.21 (2026-03-26) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.4.20 (2026-03-13) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.4.19 (2026-03-03) + +* **Bug Fix**: Modernize non codegen files with go fix +* **Dependency Update**: Bump minimum Go version to 1.24 +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.4.18 (2026-02-23) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.4.17 (2026-01-09) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.4.16 (2025-12-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.4.15 (2025-12-02) + +* **Dependency Update**: Updated to the latest SDK module versions +* **Dependency Update**: Upgrade to smithy-go v1.24.0. Notably this version of the library reduces the allocation footprint of the middleware system. We observe a ~10% reduction in allocations per SDK call with this change. + +# v1.4.14 (2025-11-19.2) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.4.13 (2025-11-04) + +* **Dependency Update**: Updated to the latest SDK module versions +* **Dependency Update**: Upgrade to smithy-go v1.23.2 which should convey some passive reduction of overall allocations, especially when not using the metrics system. + +# v1.4.12 (2025-10-30) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.4.11 (2025-10-23) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.4.10 (2025-10-16) + +* **Dependency Update**: Bump minimum Go version to 1.23. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.4.9 (2025-09-26) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.4.8 (2025-09-23) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.4.7 (2025-09-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.4.6 (2025-08-29) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.4.5 (2025-08-27) + +* **Dependency Update**: Update to smithy-go v1.23.0. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.4.4 (2025-08-21) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.4.3 (2025-08-11) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.4.2 (2025-08-04) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.4.1 (2025-07-30) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.4.0 (2025-07-28) + +* **Feature**: Add support for HTTP interceptors. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.3.37 (2025-07-19) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.3.36 (2025-06-17) + +* **Dependency Update**: Update to smithy-go v1.22.4. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.3.35 (2025-06-10) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.3.34 (2025-02-27) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/config.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/config.go index cd4d19b8982..bd731e5f58c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/config.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/config.go @@ -14,7 +14,7 @@ type EnableEndpointDiscoveryProvider interface { // ResolveEnableEndpointDiscovery extracts the first instance of a EnableEndpointDiscoveryProvider from the config slice. // Additionally returns a aws.EndpointDiscoveryEnableState to indicate if the value was found in provided configs, // and error if one is encountered. -func ResolveEnableEndpointDiscovery(ctx context.Context, configs []interface{}) (value aws.EndpointDiscoveryEnableState, found bool, err error) { +func ResolveEnableEndpointDiscovery(ctx context.Context, configs []any) (value aws.EndpointDiscoveryEnableState, found bool, err error) { for _, cfg := range configs { if p, ok := cfg.(EnableEndpointDiscoveryProvider); ok { value, found, err = p.GetEnableEndpointDiscovery(ctx) @@ -33,7 +33,7 @@ type UseDualStackEndpointProvider interface { // ResolveUseDualStackEndpoint extracts the first instance of a UseDualStackEndpoint from the config slice. // Additionally returns a boolean to indicate if the value was found in provided configs, and error if one is encountered. -func ResolveUseDualStackEndpoint(ctx context.Context, configs []interface{}) (value aws.DualStackEndpointState, found bool, err error) { +func ResolveUseDualStackEndpoint(ctx context.Context, configs []any) (value aws.DualStackEndpointState, found bool, err error) { for _, cfg := range configs { if p, ok := cfg.(UseDualStackEndpointProvider); ok { value, found, err = p.GetUseDualStackEndpoint(ctx) @@ -52,7 +52,7 @@ type UseFIPSEndpointProvider interface { // ResolveUseFIPSEndpoint extracts the first instance of a UseFIPSEndpointProvider from the config slice. // Additionally, returns a boolean to indicate if the value was found in provided configs, and error if one is encountered. -func ResolveUseFIPSEndpoint(ctx context.Context, configs []interface{}) (value aws.FIPSEndpointState, found bool, err error) { +func ResolveUseFIPSEndpoint(ctx context.Context, configs []any) (value aws.FIPSEndpointState, found bool, err error) { for _, cfg := range configs { if p, ok := cfg.(UseFIPSEndpointProvider); ok { value, found, err = p.GetUseFIPSEndpoint(ctx) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/endpoints.go index e7835f85241..1ebe8f4a8a3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/endpoints.go @@ -26,7 +26,7 @@ type IgnoreConfiguredEndpointsProvider interface { // Currently duplicated from github.com/aws/aws-sdk-go-v2/config because // service packages cannot import github.com/aws/aws-sdk-go-v2/config // due to result import cycle error. -func GetIgnoreConfiguredEndpoints(ctx context.Context, configs []interface{}) (value bool, found bool, err error) { +func GetIgnoreConfiguredEndpoints(ctx context.Context, configs []any) (value bool, found bool, err error) { for _, cfg := range configs { if p, ok := cfg.(IgnoreConfiguredEndpointsProvider); ok { value, found, err = p.GetIgnoreConfiguredEndpoints(ctx) @@ -40,7 +40,7 @@ func GetIgnoreConfiguredEndpoints(ctx context.Context, configs []interface{}) (v // ResolveServiceBaseEndpoint is used to retrieve service endpoints from configured sources // while allowing for configured endpoints to be disabled -func ResolveServiceBaseEndpoint(ctx context.Context, sdkID string, configs []interface{}) (value string, found bool, err error) { +func ResolveServiceBaseEndpoint(ctx context.Context, sdkID string, configs []any) (value string, found bool, err error) { if val, found, _ := GetIgnoreConfiguredEndpoints(ctx, configs); found && val { return "", false, nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go index eddabe6344c..548da96016c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go @@ -3,4 +3,4 @@ package configsources // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.3.34" +const goModuleVersion = "1.4.21" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.go index 5f0779997de..6ab4d9669fb 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.go @@ -3,7 +3,8 @@ package awsrulesfn // GetPartition returns an AWS [Partition] for the region provided. If the -// partition cannot be determined nil will be returned. +// partition cannot be determined then the default partition (AWS commercial) +// will be returned. func GetPartition(region string) *PartitionConfig { return getPartition(partitions, region) } @@ -11,7 +12,7 @@ func GetPartition(region string) *PartitionConfig { var partitions = []Partition{ { ID: "aws", - RegionRegex: "^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$", + RegionRegex: "^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$", DefaultConfig: PartitionConfig{ Name: "aws", DnsSuffix: "amazonaws.com", @@ -35,6 +36,13 @@ var partitions = []Partition{ SupportsFIPS: nil, SupportsDualStack: nil, }, + "ap-east-2": { + Name: nil, + DnsSuffix: nil, + DualStackDnsSuffix: nil, + SupportsFIPS: nil, + SupportsDualStack: nil, + }, "ap-northeast-1": { Name: nil, DnsSuffix: nil, @@ -98,6 +106,27 @@ var partitions = []Partition{ SupportsFIPS: nil, SupportsDualStack: nil, }, + "ap-southeast-5": { + Name: nil, + DnsSuffix: nil, + DualStackDnsSuffix: nil, + SupportsFIPS: nil, + SupportsDualStack: nil, + }, + "ap-southeast-6": { + Name: nil, + DnsSuffix: nil, + DualStackDnsSuffix: nil, + SupportsFIPS: nil, + SupportsDualStack: nil, + }, + "ap-southeast-7": { + Name: nil, + DnsSuffix: nil, + DualStackDnsSuffix: nil, + SupportsFIPS: nil, + SupportsDualStack: nil, + }, "aws-global": { Name: nil, DnsSuffix: nil, @@ -196,6 +225,13 @@ var partitions = []Partition{ SupportsFIPS: nil, SupportsDualStack: nil, }, + "mx-central-1": { + Name: nil, + DnsSuffix: nil, + DualStackDnsSuffix: nil, + SupportsFIPS: nil, + SupportsDualStack: nil, + }, "sa-east-1": { Name: nil, DnsSuffix: nil, @@ -269,32 +305,18 @@ var partitions = []Partition{ }, }, { - ID: "aws-us-gov", - RegionRegex: "^us\\-gov\\-\\w+\\-\\d+$", + ID: "aws-eusc", + RegionRegex: "^eusc\\-(de)\\-\\w+\\-\\d+$", DefaultConfig: PartitionConfig{ - Name: "aws-us-gov", - DnsSuffix: "amazonaws.com", - DualStackDnsSuffix: "api.aws", + Name: "aws-eusc", + DnsSuffix: "amazonaws.eu", + DualStackDnsSuffix: "api.amazonwebservices.eu", SupportsFIPS: true, SupportsDualStack: true, - ImplicitGlobalRegion: "us-gov-west-1", + ImplicitGlobalRegion: "eusc-de-east-1", }, Regions: map[string]RegionOverrides{ - "aws-us-gov-global": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "us-gov-east-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "us-gov-west-1": { + "eusc-de-east-1": { Name: nil, DnsSuffix: nil, DualStackDnsSuffix: nil, @@ -309,9 +331,9 @@ var partitions = []Partition{ DefaultConfig: PartitionConfig{ Name: "aws-iso", DnsSuffix: "c2s.ic.gov", - DualStackDnsSuffix: "c2s.ic.gov", + DualStackDnsSuffix: "api.aws.ic.gov", SupportsFIPS: true, - SupportsDualStack: false, + SupportsDualStack: true, ImplicitGlobalRegion: "us-iso-east-1", }, Regions: map[string]RegionOverrides{ @@ -344,9 +366,9 @@ var partitions = []Partition{ DefaultConfig: PartitionConfig{ Name: "aws-iso-b", DnsSuffix: "sc2s.sgov.gov", - DualStackDnsSuffix: "sc2s.sgov.gov", + DualStackDnsSuffix: "api.aws.scloud", SupportsFIPS: true, - SupportsDualStack: false, + SupportsDualStack: true, ImplicitGlobalRegion: "us-isob-east-1", }, Regions: map[string]RegionOverrides{ @@ -364,6 +386,13 @@ var partitions = []Partition{ SupportsFIPS: nil, SupportsDualStack: nil, }, + "us-isob-west-1": { + Name: nil, + DnsSuffix: nil, + DualStackDnsSuffix: nil, + SupportsFIPS: nil, + SupportsDualStack: nil, + }, }, }, { @@ -372,12 +401,19 @@ var partitions = []Partition{ DefaultConfig: PartitionConfig{ Name: "aws-iso-e", DnsSuffix: "cloud.adc-e.uk", - DualStackDnsSuffix: "cloud.adc-e.uk", + DualStackDnsSuffix: "api.cloud-aws.adc-e.uk", SupportsFIPS: true, - SupportsDualStack: false, + SupportsDualStack: true, ImplicitGlobalRegion: "eu-isoe-west-1", }, Regions: map[string]RegionOverrides{ + "aws-iso-e-global": { + Name: nil, + DnsSuffix: nil, + DualStackDnsSuffix: nil, + SupportsFIPS: nil, + SupportsDualStack: nil, + }, "eu-isoe-west-1": { Name: nil, DnsSuffix: nil, @@ -393,11 +429,68 @@ var partitions = []Partition{ DefaultConfig: PartitionConfig{ Name: "aws-iso-f", DnsSuffix: "csp.hci.ic.gov", - DualStackDnsSuffix: "csp.hci.ic.gov", + DualStackDnsSuffix: "api.aws.hci.ic.gov", SupportsFIPS: true, - SupportsDualStack: false, + SupportsDualStack: true, ImplicitGlobalRegion: "us-isof-south-1", }, - Regions: map[string]RegionOverrides{}, + Regions: map[string]RegionOverrides{ + "aws-iso-f-global": { + Name: nil, + DnsSuffix: nil, + DualStackDnsSuffix: nil, + SupportsFIPS: nil, + SupportsDualStack: nil, + }, + "us-isof-east-1": { + Name: nil, + DnsSuffix: nil, + DualStackDnsSuffix: nil, + SupportsFIPS: nil, + SupportsDualStack: nil, + }, + "us-isof-south-1": { + Name: nil, + DnsSuffix: nil, + DualStackDnsSuffix: nil, + SupportsFIPS: nil, + SupportsDualStack: nil, + }, + }, + }, + { + ID: "aws-us-gov", + RegionRegex: "^us\\-gov\\-\\w+\\-\\d+$", + DefaultConfig: PartitionConfig{ + Name: "aws-us-gov", + DnsSuffix: "amazonaws.com", + DualStackDnsSuffix: "api.aws", + SupportsFIPS: true, + SupportsDualStack: true, + ImplicitGlobalRegion: "us-gov-west-1", + }, + Regions: map[string]RegionOverrides{ + "aws-us-gov-global": { + Name: nil, + DnsSuffix: nil, + DualStackDnsSuffix: nil, + SupportsFIPS: nil, + SupportsDualStack: nil, + }, + "us-gov-east-1": { + Name: nil, + DnsSuffix: nil, + DualStackDnsSuffix: nil, + SupportsFIPS: nil, + SupportsDualStack: nil, + }, + "us-gov-west-1": { + Name: nil, + DnsSuffix: nil, + DualStackDnsSuffix: nil, + SupportsFIPS: nil, + SupportsDualStack: nil, + }, + }, }, } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.json b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.json index e19224f1b86..fb9ebb1fa69 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.json +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.json @@ -17,6 +17,9 @@ "ap-east-1" : { "description" : "Asia Pacific (Hong Kong)" }, + "ap-east-2" : { + "description" : "Asia Pacific (Taipei)" + }, "ap-northeast-1" : { "description" : "Asia Pacific (Tokyo)" }, @@ -47,11 +50,14 @@ "ap-southeast-5" : { "description" : "Asia Pacific (Malaysia)" }, + "ap-southeast-6" : { + "description" : "Asia Pacific (New Zealand)" + }, "ap-southeast-7" : { "description" : "Asia Pacific (Thailand)" }, "aws-global" : { - "description" : "AWS Standard global region" + "description" : "aws global region" }, "ca-central-1" : { "description" : "Canada (Central)" @@ -124,7 +130,7 @@ "regionRegex" : "^cn\\-\\w+\\-\\d+$", "regions" : { "aws-cn-global" : { - "description" : "AWS China global region" + "description" : "aws-cn global region" }, "cn-north-1" : { "description" : "China (Beijing)" @@ -134,41 +140,35 @@ } } }, { - "id" : "aws-us-gov", + "id" : "aws-eusc", "outputs" : { - "dnsSuffix" : "amazonaws.com", - "dualStackDnsSuffix" : "api.aws", - "implicitGlobalRegion" : "us-gov-west-1", - "name" : "aws-us-gov", + "dnsSuffix" : "amazonaws.eu", + "dualStackDnsSuffix" : "api.amazonwebservices.eu", + "implicitGlobalRegion" : "eusc-de-east-1", + "name" : "aws-eusc", "supportsDualStack" : true, "supportsFIPS" : true }, - "regionRegex" : "^us\\-gov\\-\\w+\\-\\d+$", + "regionRegex" : "^eusc\\-(de)\\-\\w+\\-\\d+$", "regions" : { - "aws-us-gov-global" : { - "description" : "AWS GovCloud (US) global region" - }, - "us-gov-east-1" : { - "description" : "AWS GovCloud (US-East)" - }, - "us-gov-west-1" : { - "description" : "AWS GovCloud (US-West)" + "eusc-de-east-1" : { + "description" : "AWS European Sovereign Cloud (Germany)" } } }, { "id" : "aws-iso", "outputs" : { "dnsSuffix" : "c2s.ic.gov", - "dualStackDnsSuffix" : "c2s.ic.gov", + "dualStackDnsSuffix" : "api.aws.ic.gov", "implicitGlobalRegion" : "us-iso-east-1", "name" : "aws-iso", - "supportsDualStack" : false, + "supportsDualStack" : true, "supportsFIPS" : true }, "regionRegex" : "^us\\-iso\\-\\w+\\-\\d+$", "regions" : { "aws-iso-global" : { - "description" : "AWS ISO (US) global region" + "description" : "aws-iso global region" }, "us-iso-east-1" : { "description" : "US ISO East" @@ -181,33 +181,39 @@ "id" : "aws-iso-b", "outputs" : { "dnsSuffix" : "sc2s.sgov.gov", - "dualStackDnsSuffix" : "sc2s.sgov.gov", + "dualStackDnsSuffix" : "api.aws.scloud", "implicitGlobalRegion" : "us-isob-east-1", "name" : "aws-iso-b", - "supportsDualStack" : false, + "supportsDualStack" : true, "supportsFIPS" : true }, "regionRegex" : "^us\\-isob\\-\\w+\\-\\d+$", "regions" : { "aws-iso-b-global" : { - "description" : "AWS ISOB (US) global region" + "description" : "aws-iso-b global region" }, "us-isob-east-1" : { "description" : "US ISOB East (Ohio)" + }, + "us-isob-west-1" : { + "description" : "US ISOB West" } } }, { "id" : "aws-iso-e", "outputs" : { "dnsSuffix" : "cloud.adc-e.uk", - "dualStackDnsSuffix" : "cloud.adc-e.uk", + "dualStackDnsSuffix" : "api.cloud-aws.adc-e.uk", "implicitGlobalRegion" : "eu-isoe-west-1", "name" : "aws-iso-e", - "supportsDualStack" : false, + "supportsDualStack" : true, "supportsFIPS" : true }, "regionRegex" : "^eu\\-isoe\\-\\w+\\-\\d+$", "regions" : { + "aws-iso-e-global" : { + "description" : "aws-iso-e global region" + }, "eu-isoe-west-1" : { "description" : "EU ISOE West" } @@ -216,16 +222,16 @@ "id" : "aws-iso-f", "outputs" : { "dnsSuffix" : "csp.hci.ic.gov", - "dualStackDnsSuffix" : "csp.hci.ic.gov", + "dualStackDnsSuffix" : "api.aws.hci.ic.gov", "implicitGlobalRegion" : "us-isof-south-1", "name" : "aws-iso-f", - "supportsDualStack" : false, + "supportsDualStack" : true, "supportsFIPS" : true }, "regionRegex" : "^us\\-isof\\-\\w+\\-\\d+$", "regions" : { "aws-iso-f-global" : { - "description" : "AWS ISOF global region" + "description" : "aws-iso-f global region" }, "us-isof-east-1" : { "description" : "US ISOF EAST" @@ -234,6 +240,28 @@ "description" : "US ISOF SOUTH" } } + }, { + "id" : "aws-us-gov", + "outputs" : { + "dnsSuffix" : "amazonaws.com", + "dualStackDnsSuffix" : "api.aws", + "implicitGlobalRegion" : "us-gov-west-1", + "name" : "aws-us-gov", + "supportsDualStack" : true, + "supportsFIPS" : true + }, + "regionRegex" : "^us\\-gov\\-\\w+\\-\\d+$", + "regions" : { + "aws-us-gov-global" : { + "description" : "aws-us-gov global region" + }, + "us-gov-east-1" : { + "description" : "AWS GovCloud (US-East)" + }, + "us-gov-west-1" : { + "description" : "AWS GovCloud (US-West)" + } + } } ], "version" : "1.1" } \ No newline at end of file diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md index 83e5bd28a72..a2a1c183ffa 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md @@ -1,3 +1,111 @@ +# v2.7.21 (2026-03-26) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.7.20 (2026-03-13) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.7.19 (2026-03-03) + +* **Bug Fix**: Modernize non codegen files with go fix +* **Dependency Update**: Bump minimum Go version to 1.24 +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.7.18 (2026-02-23) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.7.17 (2026-01-09) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.7.16 (2025-12-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.7.15 (2025-12-02) + +* **Dependency Update**: Updated to the latest SDK module versions +* **Dependency Update**: Upgrade to smithy-go v1.24.0. Notably this version of the library reduces the allocation footprint of the middleware system. We observe a ~10% reduction in allocations per SDK call with this change. + +# v2.7.14 (2025-11-19.2) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.7.13 (2025-11-04) + +* **Dependency Update**: Updated to the latest SDK module versions +* **Dependency Update**: Upgrade to smithy-go v1.23.2 which should convey some passive reduction of overall allocations, especially when not using the metrics system. + +# v2.7.12 (2025-10-30) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.7.11 (2025-10-23) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.7.10 (2025-10-16) + +* **Dependency Update**: Bump minimum Go version to 1.23. +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.7.9 (2025-09-26) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.7.8 (2025-09-23) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.7.7 (2025-09-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.7.6 (2025-08-29) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.7.5 (2025-08-27) + +* **Dependency Update**: Update to smithy-go v1.23.0. +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.7.4 (2025-08-21) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.7.3 (2025-08-11) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.7.2 (2025-08-04) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.7.1 (2025-07-30) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.7.0 (2025-07-28) + +* **Feature**: Add support for HTTP interceptors. +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.6.37 (2025-07-19) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.6.36 (2025-06-17) + +* **Dependency Update**: Update to smithy-go v1.22.4. +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.6.35 (2025-06-10) + +* **Dependency Update**: Updated to the latest SDK module versions + # v2.6.34 (2025-02-27) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/endpoints.go index 32251a7e3cc..b425031cb3b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/endpoints.go @@ -101,7 +101,7 @@ func (ps Partitions) ResolveEndpoint(region string, opts Options) (aws.Endpoint, region = opts.ResolvedRegion } - for i := 0; i < len(ps); i++ { + for i := range ps { if !ps[i].canResolveEndpoint(region, opts) { continue } @@ -290,8 +290,8 @@ func getByPriority(s []string, p []string, def string) string { return def } - for i := 0; i < len(p); i++ { - for j := 0; j < len(s); j++ { + for i := range p { + for j := range s { if s[j] == p[i] { return s[j] } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go index 735dba7ac79..03a0b8c0380 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go @@ -3,4 +3,4 @@ package endpoints // goModuleVersion is the tagged release for this module -const goModuleVersion = "2.6.34" +const goModuleVersion = "2.7.21" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/middleware/middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/middleware/middleware.go index 8e24a3f0a47..fb06d8dc055 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/middleware/middleware.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/middleware/middleware.go @@ -3,15 +3,13 @@ package middleware import ( "context" "sync/atomic" - "time" - internalcontext "github.com/aws/aws-sdk-go-v2/internal/context" "github.com/aws/smithy-go/middleware" ) -// AddTimeOffsetMiddleware sets a value representing clock skew on the request context. -// This can be read by other operations (such as signing) to correct the date value they send -// on the request +// AddTimeOffsetMiddleware is deprecated. +// +// Deprecated: handled in retry loop. type AddTimeOffsetMiddleware struct { Offset *atomic.Int64 } @@ -19,24 +17,16 @@ type AddTimeOffsetMiddleware struct { // ID the identifier for AddTimeOffsetMiddleware func (m *AddTimeOffsetMiddleware) ID() string { return "AddTimeOffsetMiddleware" } -// HandleBuild sets a value for attemptSkew on the request context if one is set on the client. +// HandleBuild is a no-op. func (m AddTimeOffsetMiddleware) HandleBuild(ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler) ( out middleware.BuildOutput, metadata middleware.Metadata, err error, ) { - if m.Offset != nil { - offset := time.Duration(m.Offset.Load()) - ctx = internalcontext.SetAttemptSkewContext(ctx, offset) - } return next.HandleBuild(ctx, in) } -// HandleDeserialize gets the clock skew context from the context, and if set, sets it on the pointer -// held by AddTimeOffsetMiddleware +// HandleDeserialize is a no-op. func (m *AddTimeOffsetMiddleware) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { - if v := internalcontext.GetAttemptSkewContext(ctx); v != 0 { - m.Offset.Store(v.Nanoseconds()) - } return next.HandleDeserialize(ctx, in) } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/CHANGELOG.md new file mode 100644 index 00000000000..c38b182f7eb --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/CHANGELOG.md @@ -0,0 +1,918 @@ +# v1.68.0 (2026-04-03) + +* **Feature**: Added queryDuration, bytesScanned, and userIdentity fields to the QueryInfo response object returned by DescribeQueries. Customers can now view detailed query cost information including who ran the query, how long it took, and the volume of data scanned. + +# v1.67.0 (2026-04-02) + +* **Feature**: We are pleased to announce that our logs transformation csv processor now has a destination field, allowing you to specify under which parent node parsed columns be placed under. + +# v1.66.0 (2026-03-30) + +* **Feature**: Adds Lookup Tables to CloudWatch Logs for log enrichment using CSV key-value data with KMS encryption support. + +# v1.65.0 (2026-03-26) + +* **Feature**: This release adds parameter support to saved queries in CloudWatch Logs Insights. Define reusable query templates with named placeholders, invoke them using start query. Available in Console, CLI and SDK +* **Bug Fix**: Fix a bug where a recorded clock skew could persist on the client even if the client and server clock ended up realigning. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.64.2 (2026-03-23) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.64.1 (2026-03-13) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.64.0 (2026-03-03) + +* **Feature**: CloudWatch Logs updates- Added support for the PutBearerTokenAuthentication API to enable or disable bearer token authentication on a log group. For more information, see CloudWatch Logs API documentation. +* **Dependency Update**: Bump minimum Go version to 1.24 +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.63.2 (2026-02-23) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.63.1 (2026-01-09) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.63.0 (2025-12-15) + +* **Feature**: This release allows you to import your historical CloudTrail Lake data into CloudWatch with a few steps, enabling you to easily consolidate operational, security, and compliance data in one place. + +# v1.62.2 (2025-12-09) + +* No change notes available for this release. + +# v1.62.1 (2025-12-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.62.0 (2025-12-02) + +* **Feature**: CloudWatch Logs adds managed S3 Tables integration to access logs using other analytical tools, as well as facets and field indexing to simplify log analytics in CloudWatch Logs Insights. +* **Dependency Update**: Updated to the latest SDK module versions +* **Dependency Update**: Upgrade to smithy-go v1.24.0. Notably this version of the library reduces the allocation footprint of the middleware system. We observe a ~10% reduction in allocations per SDK call with this change. + +# v1.61.1 (2025-11-25) + +* **Bug Fix**: Add error check for endpoint param binding during auth scheme resolution to fix panic reported in #3234 + +# v1.61.0 (2025-11-24) + +* **Feature**: New CloudWatch Logs feature - LogGroup Deletion Protection, a capability that allows customers to safeguard their critical CloudWatch log groups from accidental or unintended deletion. + +# v1.60.1 (2025-11-19.2) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.60.0 (2025-11-19) + +* **Feature**: Adding support for ocsf version 1.5, add optional parameter MappingVersion + +# v1.59.0 (2025-11-18) + +* **Feature**: CloudWatch Logs updates: Added capability to setup a recurring schedule for log insights queries. Logs introduced Scheduled Queries (managed through Create/Update/Get/Delete/List/History Scheduled Query APIs). For more information, see CloudWatch Logs API documentation. + +# v1.58.9 (2025-11-12) + +* **Bug Fix**: Further reduce allocation overhead when the metrics system isn't in-use. +* **Bug Fix**: Reduce allocation overhead when the client doesn't have any HTTP interceptors configured. +* **Bug Fix**: Remove blank trace spans towards the beginning of the request that added no additional information. This conveys a slight reduction in overall allocations. + +# v1.58.8 (2025-11-11) + +* **Bug Fix**: Return validation error if input region is not a valid host label. + +# v1.58.7 (2025-11-04) + +* **Dependency Update**: Updated to the latest SDK module versions +* **Dependency Update**: Upgrade to smithy-go v1.23.2 which should convey some passive reduction of overall allocations, especially when not using the metrics system. + +# v1.58.6 (2025-10-30) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.58.5 (2025-10-23) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.58.4 (2025-10-22) + +* No change notes available for this release. + +# v1.58.3 (2025-10-16) + +* **Dependency Update**: Bump minimum Go version to 1.23. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.58.2 (2025-09-26) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.58.1 (2025-09-23) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.58.0 (2025-09-16) + +* **Feature**: Cloudwatch Logs added support for 2 new API parameters in metric and subscription filter APIs to filter log events based on system field values and emit system field values as dimensions and send them to customer destination as additional metadata. + +# v1.57.4 (2025-09-10) + +* No change notes available for this release. + +# v1.57.3 (2025-09-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.57.2 (2025-08-29) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.57.1 (2025-08-27) + +* **Dependency Update**: Update to smithy-go v1.23.0. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.57.0 (2025-08-25) + +* **Feature**: Remove incorrect endpoint tests + +# v1.56.2 (2025-08-21) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.56.1 (2025-08-20) + +* **Bug Fix**: Remove unused deserialization code. + +# v1.56.0 (2025-08-11) + +* **Feature**: Add support for configuring per-service Options via callback on global config. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.55.0 (2025-08-04) + +* **Feature**: Support configurable auth scheme preferences in service clients via AWS_AUTH_SCHEME_PREFERENCE in the environment, auth_scheme_preference in the config file, and through in-code settings on LoadDefaultConfig and client constructor methods. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.54.1 (2025-07-30) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.54.0 (2025-07-28) + +* **Feature**: Add support for HTTP interceptors. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.53.1 (2025-07-19) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.53.0 (2025-07-18) + +* **Feature**: CloudWatchLogs launches GetLogObject API with streaming support for efficient log data retrieval. Logs added support for new AccountPolicy type METRIC_EXTRACTION_POLICY. For more information, see CloudWatch Logs API documentation + +# v1.52.0 (2025-07-16.2) + +* **Feature**: CloudWatch Logs updates: Added X-Ray tracing for Amazon Bedrock Agent resources. Logs introduced Log Group level resource policies (managed through Put/Delete/Describe Resource Policy APIs). For more information, see CloudWatch Logs API documentation. + +# v1.51.0 (2025-06-18) + +* **Feature**: Added CloudWatch Logs Transformer support for converting CloudTrail, VPC Flow, EKS Audit, AWS WAF and Route53 Resolver logs to OCSF v1.1 format. + +# v1.50.3 (2025-06-17) + +* **Dependency Update**: Update to smithy-go v1.22.4. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.50.2 (2025-06-10) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.50.1 (2025-06-06) + +* No change notes available for this release. + +# v1.50.0 (2025-05-14) + +* **Feature**: This release adds a new API "ListLogGroups" and an improvement in API "DescribeLogGroups" + +# v1.49.0 (2025-05-09) + +* **Feature**: We are pleased to announce limit increases to our grok processor logs transformation feature. Now you can define 20 Grok patterns in their configurations, with an expanded total pattern matching limit of 512 characters. + +# v1.48.0 (2025-04-30) + +* **Feature**: CloudWatch Logs supports "DELIVERY" log class. This log class is used only for delivering AWS Lambda logs to Amazon S3 or Amazon Data Firehose. + +# v1.47.3 (2025-04-10) + +* No change notes available for this release. + +# v1.47.2 (2025-04-03) + +* No change notes available for this release. + +# v1.47.1 (2025-03-20) + +* No change notes available for this release. + +# v1.47.0 (2025-03-13) + +* **Feature**: Updated CreateLogAnomalyDetector to accept only kms key arn + +# v1.46.1 (2025-03-04.2) + +* **Bug Fix**: Add assurance test for operation order. + +# v1.46.0 (2025-02-27) + +* **Feature**: Track credential providers via User-Agent Feature ids +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.45.14 (2025-02-18) + +* **Bug Fix**: Bump go version to 1.22 +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.45.13 (2025-02-14) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.45.12 (2025-02-05) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.45.11 (2025-02-04) + +* No change notes available for this release. + +# v1.45.10 (2025-01-31) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.45.9 (2025-01-30) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.45.8 (2025-01-24) + +* **Dependency Update**: Updated to the latest SDK module versions +* **Dependency Update**: Upgrade to smithy-go v1.22.2. + +# v1.45.7 (2025-01-21) + +* **Documentation**: Documentation-only update to address doc errors + +# v1.45.6 (2025-01-17) + +* **Bug Fix**: Fix bug where credentials weren't refreshed during retry loop. + +# v1.45.5 (2025-01-15) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.45.4 (2025-01-14) + +* No change notes available for this release. + +# v1.45.3 (2025-01-09) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.45.2 (2025-01-08) + +* No change notes available for this release. + +# v1.45.1 (2024-12-19) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.45.0 (2024-12-02) + +* **Feature**: Adds PutIntegration, GetIntegration, ListIntegrations and DeleteIntegration APIs. Adds QueryLanguage support to StartQuery, GetQueryResults, DescribeQueries, DescribeQueryDefinitions, and PutQueryDefinition APIs. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.44.0 (2024-11-21) + +* **Feature**: Adds "Create field indexes to improve query performance and reduce scan volume" and "Transform logs during ingestion". Updates documentation for "PutLogEvents with Entity". + +# v1.43.3 (2024-11-18) + +* **Dependency Update**: Update to smithy-go v1.22.1. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.43.2 (2024-11-07) + +* **Bug Fix**: Adds case-insensitive handling of error message fields in service responses + +# v1.43.1 (2024-11-06) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.43.0 (2024-10-29) + +* **Feature**: Added support for new optional baseline parameter in the UpdateAnomaly API. For UpdateAnomaly requests with baseline set to True, The anomaly behavior is then treated as baseline behavior. However, more severe occurrences of this behavior will still be reported as anomalies. + +# v1.42.1 (2024-10-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.42.0 (2024-10-25) + +* **Feature**: Adding inferred token name for dynamic tokens in Anomalies. + +# v1.41.2 (2024-10-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.41.1 (2024-10-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.41.0 (2024-10-04) + +* **Feature**: Add support for HTTP client metrics. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.40.4 (2024-10-03) + +* No change notes available for this release. + +# v1.40.3 (2024-09-27) + +* No change notes available for this release. + +# v1.40.2 (2024-09-25) + +* No change notes available for this release. + +# v1.40.1 (2024-09-23) + +* No change notes available for this release. + +# v1.40.0 (2024-09-20) + +* **Feature**: Add tracing and metrics support to service clients. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.39.1 (2024-09-17) + +* **Bug Fix**: **BREAKFIX**: Only generate AccountIDEndpointMode config for services that use it. This is a compiler break, but removes no actual functionality, as no services currently use the account ID in endpoint resolution. + +# v1.39.0 (2024-09-04) + +* **Feature**: Update to support new APIs for delivery of logs from AWS services. + +# v1.38.1 (2024-09-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.38.0 (2024-08-30) + +* **Feature**: This release introduces a new optional parameter: Entity, in PutLogEvents request + +# v1.37.5 (2024-08-22) + +* No change notes available for this release. + +# v1.37.4 (2024-08-15) + +* **Dependency Update**: Bump minimum Go version to 1.21. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.37.3 (2024-07-10.2) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.37.2 (2024-07-10) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.37.1 (2024-06-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.37.0 (2024-06-26) + +* **Feature**: Support list-of-string endpoint parameter. + +# v1.36.1 (2024-06-19) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.36.0 (2024-06-18) + +* **Feature**: Track usage of various AWS SDK features in user-agent string. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.35.8 (2024-06-17) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.35.7 (2024-06-07) + +* **Bug Fix**: Add clock skew correction on all service clients +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.35.6 (2024-06-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.35.5 (2024-05-23) + +* No change notes available for this release. + +# v1.35.4 (2024-05-16) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.35.3 (2024-05-15) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.35.2 (2024-05-08) + +* **Bug Fix**: GoDoc improvement + +# v1.35.1 (2024-03-29) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.35.0 (2024-03-19) + +* **Feature**: Update LogSamples field in Anomaly model to be a list of LogEvent + +# v1.34.4 (2024-03-18) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.34.3 (2024-03-07) + +* **Bug Fix**: Remove dependency on go-cmp. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.34.2 (2024-02-29) + +* No change notes available for this release. + +# v1.34.1 (2024-02-23) + +* **Bug Fix**: Move all common, SDK-side middleware stack ops into the service client module to prevent cross-module compatibility issues in the future. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.34.0 (2024-02-22) + +* **Feature**: Add middleware stack snapshot tests. + +# v1.33.3 (2024-02-21) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.33.2 (2024-02-20) + +* **Bug Fix**: When sourcing values for a service's `EndpointParameters`, the lack of a configured region (i.e. `options.Region == ""`) will now translate to a `nil` value for `EndpointParameters.Region` instead of a pointer to the empty string `""`. This will result in a much more explicit error when calling an operation instead of an obscure hostname lookup failure. + +# v1.33.1 (2024-02-15) + +* **Bug Fix**: Correct failure to determine the error type in awsJson services that could occur when errors were modeled with a non-string `code` field. + +# v1.33.0 (2024-02-13) + +* **Feature**: Bump minimum Go version to 1.20 per our language support policy. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.32.0 (2024-02-06) + +* **Feature**: This release adds a new field, logGroupArn, to the response of the logs:DescribeLogGroups action. + +# v1.31.0 (2024-01-10) + +* **Feature**: Add support for account level subscription filter policies to PutAccountPolicy, DescribeAccountPolicies, and DeleteAccountPolicy APIs. Additionally, PutAccountPolicy has been modified with new optional "selectionCriteria" parameter for resource selection. + +# v1.30.2 (2024-01-04) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.30.1 (2023-12-20) + +* No change notes available for this release. + +# v1.30.0 (2023-12-12) + +* **Feature**: This release introduces the StartLiveTail API to tail ingested logs in near real time. + +# v1.29.5 (2023-12-08) + +* **Bug Fix**: Reinstate presence of default Retryer in functional options, but still respect max attempts set therein. + +# v1.29.4 (2023-12-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.29.3 (2023-12-06) + +* **Bug Fix**: Restore pre-refactor auth behavior where all operations could technically be performed anonymously. + +# v1.29.2 (2023-12-01) + +* **Bug Fix**: Correct wrapping of errors in authentication workflow. +* **Bug Fix**: Correctly recognize cache-wrapped instances of AnonymousCredentials at client construction. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.29.1 (2023-11-30) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.29.0 (2023-11-29) + +* **Feature**: Expose Options() accessor on service clients. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.28.2 (2023-11-28.2) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.28.1 (2023-11-28) + +* **Bug Fix**: Respect setting RetryMaxAttempts in functional options at client construction. + +# v1.28.0 (2023-11-27) + +* **Feature**: Added APIs to Create, Update, Get, List and Delete LogAnomalyDetectors and List and Update Anomalies in Detector. Added LogGroupClass attribute for LogGroups to classify loggroup as Standard loggroup with all capabilities or InfrequentAccess loggroup with limited capabilities. + +# v1.27.2 (2023-11-20) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.1 (2023-11-15) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.0 (2023-11-09.2) + +* **Feature**: Update to support new APIs for delivery of logs from AWS services. + +# v1.26.1 (2023-11-09) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.26.0 (2023-11-01) + +* **Feature**: Adds support for configured endpoints via environment variables and the AWS shared configuration file. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.25.0 (2023-10-31) + +* **Feature**: **BREAKING CHANGE**: Bump minimum go version to 1.19 per the revised [go version support policy](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-aligns-with-go-release-policy-on-supported-runtimes/). +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.24.2 (2023-10-12) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.24.1 (2023-10-06) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.24.0 (2023-09-20) + +* **Feature**: Add ClientToken to QueryDefinition CFN Handler in CWL + +# v1.23.5 (2023-08-21) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.23.4 (2023-08-18) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.23.3 (2023-08-17) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.23.2 (2023-08-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.23.1 (2023-08-01) + +* No change notes available for this release. + +# v1.23.0 (2023-07-31) + +* **Feature**: Adds support for smithy-modeled endpoint resolution. A new rules-based endpoint resolution will be added to the SDK which will supercede and deprecate existing endpoint resolution. Specifically, EndpointResolver will be deprecated while BaseEndpoint and EndpointResolverV2 will take its place. For more information, please see the Endpoints section in our Developer Guide. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.22.2 (2023-07-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.22.1 (2023-07-13) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.22.0 (2023-07-07) + +* **Feature**: Add CMK encryption support for CloudWatch Logs Insights query result data + +# v1.21.2 (2023-06-15) + +* No change notes available for this release. + +# v1.21.1 (2023-06-13) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.21.0 (2023-06-07) + +* **Feature**: This change adds support for account level data protection policies using 3 new APIs, PutAccountPolicy, DeleteAccountPolicy and DescribeAccountPolicy. DescribeLogGroup API has been modified to indicate if account level policy is applied to the LogGroup via "inheritedProperties" list in the response. + +# v1.20.11 (2023-05-04) + +* No change notes available for this release. + +# v1.20.10 (2023-04-24) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.20.9 (2023-04-10) + +* No change notes available for this release. + +# v1.20.8 (2023-04-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.20.7 (2023-03-21) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.20.6 (2023-03-10) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.20.5 (2023-02-22) + +* **Bug Fix**: Prevent nil pointer dereference when retrieving error codes. + +# v1.20.4 (2023-02-20) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.20.3 (2023-02-15) + +* **Announcement**: When receiving an error response in restJson-based services, an incorrect error type may have been returned based on the content of the response. This has been fixed via PR #2012 tracked in issue #1910. +* **Bug Fix**: Correct error type parsing for restJson services. + +# v1.20.2 (2023-02-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.20.1 (2023-01-23) + +* No change notes available for this release. + +# v1.20.0 (2023-01-19) + +* **Feature**: Bug fix - Removed the regex pattern validation from CoralModel to avoid potential security issue. + +# v1.19.0 (2023-01-12) + +* **Feature**: Bug fix: logGroupName is now not a required field in GetLogEvents, FilterLogEvents, GetLogGroupFields, and DescribeLogStreams APIs as logGroupIdentifier can be provided instead + +# v1.18.0 (2023-01-05) + +* **Feature**: Add `ErrorCodeOverride` field to all error structs (aws/smithy-go#401). + +# v1.17.4 (2023-01-04) + +* **Documentation**: Update to remove sequenceToken as a required field in PutLogEvents calls. + +# v1.17.3 (2022-12-15) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.2 (2022-12-09) + +* **Documentation**: Doc-only update for CloudWatch Logs, for Tagging Permissions clarifications + +# v1.17.1 (2022-12-02) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.0 (2022-11-28) + +* **Feature**: Updates to support CloudWatch Logs data protection and CloudWatch cross-account observability + +# v1.16.4 (2022-11-22) + +* No change notes available for this release. + +# v1.16.3 (2022-11-16) + +* No change notes available for this release. + +# v1.16.2 (2022-11-10) + +* No change notes available for this release. + +# v1.16.1 (2022-11-04) + +* **Documentation**: Doc-only update for bug fixes and support of export to buckets encrypted with SSE-KMS + +# v1.16.0 (2022-10-31) + +* **Feature**: SDK release to support tagging for destinations and log groups with TagResource. Also supports tag on create with PutDestination. + +# v1.15.22 (2022-10-24) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.15.21 (2022-10-21) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.15.20 (2022-09-20) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.15.19 (2022-09-14) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.15.18 (2022-09-02) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.15.17 (2022-08-31) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.15.16 (2022-08-30) + +* No change notes available for this release. + +# v1.15.15 (2022-08-29) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.15.14 (2022-08-11) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.15.13 (2022-08-09) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.15.12 (2022-08-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.15.11 (2022-08-01) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.15.10 (2022-07-05) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.15.9 (2022-06-29) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.15.8 (2022-06-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.15.7 (2022-05-20) + +* **Documentation**: Doc-only update to publish the new valid values for log retention + +# v1.15.6 (2022-05-17) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.15.5 (2022-04-25) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.15.4 (2022-03-30) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.15.3 (2022-03-24) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.15.2 (2022-03-23) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.15.1 (2022-03-08.2) + +* No change notes available for this release. + +# v1.15.0 (2022-03-08) + +* **Feature**: Updated `github.com/aws/smithy-go` to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.14.0 (2022-02-24) + +* **Feature**: API client updated +* **Feature**: Adds RetryMaxAttempts and RetryMod to API client Options. This allows the API clients' default Retryer to be configured from the shared configuration files or environment variables. Adding a new Retry mode of `Adaptive`. `Adaptive` retry mode is an experimental mode, adding client rate limiting when throttles reponses are received from an API. See [retry.AdaptiveMode](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws/retry#AdaptiveMode) for more details, and configuration options. +* **Feature**: Updated `github.com/aws/smithy-go` to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.13.0 (2022-01-14) + +* **Feature**: Updated `github.com/aws/smithy-go` to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.12.0 (2022-01-07) + +* **Feature**: Updated `github.com/aws/smithy-go` to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.11.0 (2021-12-21) + +* **Feature**: API Paginators now support specifying the initial starting token, and support stopping on empty string tokens. +* **Feature**: API client updated +* **Feature**: Updated to latest service endpoints + +# v1.10.2 (2021-12-02) + +* **Bug Fix**: Fixes a bug that prevented aws.EndpointResolverWithOptions from being used by the service client. ([#1514](https://github.com/aws/aws-sdk-go-v2/pull/1514)) +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.10.1 (2021-11-19) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.10.0 (2021-11-12) + +* **Feature**: Service clients now support custom endpoints that have an initial URI path defined. + +# v1.9.0 (2021-11-06) + +* **Feature**: The SDK now supports configuration of FIPS and DualStack endpoints using environment variables, shared configuration, or programmatically. +* **Feature**: Updated `github.com/aws/smithy-go` to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.8.0 (2021-10-21) + +* **Feature**: API client updated +* **Feature**: Updated to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.7.2 (2021-10-11) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.7.1 (2021-09-17) + +* **Dependency Update**: Updated to the latest SDK module versions + +# 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.0 (2021-08-19) + +* **Feature**: API client updated +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.5.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.5.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.5.0 (2021-06-25) + +* **Feature**: Updated `github.com/aws/smithy-go` to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.4.0 (2021-05-25) + +* **Feature**: API client updated + +# v1.3.1 (2021-05-20) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.3.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/cloudwatchlogs/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/LICENSE.txt new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/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/cloudwatchlogs/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_client.go new file mode 100644 index 00000000000..7d8f4938813 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_client.go @@ -0,0 +1,948 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + cryptorand "crypto/rand" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/aws/defaults" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/retry" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy" + internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" + smithy "github.com/aws/smithy-go" + smithydocument "github.com/aws/smithy-go/document" + "github.com/aws/smithy-go/logging" + "github.com/aws/smithy-go/metrics" + "github.com/aws/smithy-go/middleware" + smithyrand "github.com/aws/smithy-go/rand" + "github.com/aws/smithy-go/tracing" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net" + "net/http" + "sync/atomic" + "time" +) + +const ServiceID = "CloudWatch Logs" +const ServiceAPIVersion = "2014-03-28" + +type operationMetrics struct { + Duration metrics.Float64Histogram + SerializeDuration metrics.Float64Histogram + ResolveIdentityDuration metrics.Float64Histogram + ResolveEndpointDuration metrics.Float64Histogram + SignRequestDuration metrics.Float64Histogram + DeserializeDuration metrics.Float64Histogram +} + +func (m *operationMetrics) histogramFor(name string) metrics.Float64Histogram { + switch name { + case "client.call.duration": + return m.Duration + case "client.call.serialization_duration": + return m.SerializeDuration + case "client.call.resolve_identity_duration": + return m.ResolveIdentityDuration + case "client.call.resolve_endpoint_duration": + return m.ResolveEndpointDuration + case "client.call.signing_duration": + return m.SignRequestDuration + case "client.call.deserialization_duration": + return m.DeserializeDuration + default: + panic("unrecognized operation metric") + } +} + +func timeOperationMetric[T any]( + ctx context.Context, metric string, fn func() (T, error), + opts ...metrics.RecordMetricOption, +) (T, error) { + mm := getOperationMetrics(ctx) + if mm == nil { // not using the metrics system + return fn() + } + + instr := mm.histogramFor(metric) + opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) + + start := time.Now() + v, err := fn() + end := time.Now() + + elapsed := end.Sub(start) + instr.Record(ctx, float64(elapsed)/1e9, opts...) + return v, err +} + +func startMetricTimer(ctx context.Context, metric string, opts ...metrics.RecordMetricOption) func() { + mm := getOperationMetrics(ctx) + if mm == nil { // not using the metrics system + return func() {} + } + + instr := mm.histogramFor(metric) + opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) + + var ended bool + start := time.Now() + return func() { + if ended { + return + } + ended = true + + end := time.Now() + + elapsed := end.Sub(start) + instr.Record(ctx, float64(elapsed)/1e9, opts...) + } +} + +func withOperationMetadata(ctx context.Context) metrics.RecordMetricOption { + return func(o *metrics.RecordMetricOptions) { + o.Properties.Set("rpc.service", middleware.GetServiceID(ctx)) + o.Properties.Set("rpc.method", middleware.GetOperationName(ctx)) + } +} + +type operationMetricsKey struct{} + +func withOperationMetrics(parent context.Context, mp metrics.MeterProvider) (context.Context, error) { + if _, ok := mp.(metrics.NopMeterProvider); ok { + // not using the metrics system - setting up the metrics context is a memory-intensive operation + // so we should skip it in this case + return parent, nil + } + + meter := mp.Meter("github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs") + om := &operationMetrics{} + + var err error + + om.Duration, err = operationMetricTimer(meter, "client.call.duration", + "Overall call duration (including retries and time to send or receive request and response body)") + if err != nil { + return nil, err + } + om.SerializeDuration, err = operationMetricTimer(meter, "client.call.serialization_duration", + "The time it takes to serialize a message body") + if err != nil { + return nil, err + } + om.ResolveIdentityDuration, err = operationMetricTimer(meter, "client.call.auth.resolve_identity_duration", + "The time taken to acquire an identity (AWS credentials, bearer token, etc) from an Identity Provider") + if err != nil { + return nil, err + } + om.ResolveEndpointDuration, err = operationMetricTimer(meter, "client.call.resolve_endpoint_duration", + "The time it takes to resolve an endpoint (endpoint resolver, not DNS) for the request") + if err != nil { + return nil, err + } + om.SignRequestDuration, err = operationMetricTimer(meter, "client.call.auth.signing_duration", + "The time it takes to sign a request") + if err != nil { + return nil, err + } + om.DeserializeDuration, err = operationMetricTimer(meter, "client.call.deserialization_duration", + "The time it takes to deserialize a message body") + if err != nil { + return nil, err + } + + return context.WithValue(parent, operationMetricsKey{}, om), nil +} + +func operationMetricTimer(m metrics.Meter, name, desc string) (metrics.Float64Histogram, error) { + return m.Float64Histogram(name, func(o *metrics.InstrumentOptions) { + o.UnitLabel = "s" + o.Description = desc + }) +} + +func getOperationMetrics(ctx context.Context) *operationMetrics { + if v := ctx.Value(operationMetricsKey{}); v != nil { + return v.(*operationMetrics) + } + return nil +} + +func operationTracer(p tracing.TracerProvider) tracing.Tracer { + return p.Tracer("github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs") +} + +// Client provides the API client to make operations call for Amazon CloudWatch +// Logs. +type Client struct { + options Options + + // Difference between the time reported by the server and the client + timeOffset *atomic.Int64 +} + +// New returns an initialized Client based on the functional options. Provide +// additional functional options to further configure the behavior of the client, +// such as changing the client's endpoint or adding custom middleware behavior. +func New(options Options, optFns ...func(*Options)) *Client { + options = options.Copy() + + resolveDefaultLogger(&options) + + setResolvedDefaultsMode(&options) + + resolveRetryer(&options) + + resolveHTTPClient(&options) + + resolveHTTPSignerV4(&options) + + resolveIdempotencyTokenProvider(&options) + + resolveEndpointResolverV2(&options) + + resolveTracerProvider(&options) + + resolveMeterProvider(&options) + + resolveAuthSchemeResolver(&options) + + for _, fn := range optFns { + fn(&options) + } + + finalizeRetryMaxAttempts(&options) + + ignoreAnonymousAuth(&options) + + wrapWithAnonymousAuth(&options) + + resolveAuthSchemes(&options) + + client := &Client{ + options: options, + } + + initializeTimeOffsetResolver(client) + + return client +} + +// Options returns a copy of the client configuration. +// +// Callers SHOULD NOT perform mutations on any inner structures within client +// config. Config overrides should instead be made on a per-operation basis through +// functional options. +func (c *Client) Options() Options { + return c.options.Copy() +} + +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) + ctx = middleware.WithServiceID(ctx, ServiceID) + ctx = middleware.WithOperationName(ctx, opID) + + stack := middleware.NewStack(opID, smithyhttp.NewStackRequest) + options := c.options.Copy() + + for _, fn := range optFns { + fn(&options) + } + + setSafeEventStreamClientLogMode(&options, opID) + + finalizeOperationRetryMaxAttempts(&options, *c) + + finalizeClientEndpointResolverOptions(&options) + + for _, fn := range stackFns { + if err := fn(stack, options); err != nil { + return nil, metadata, err + } + } + + for _, fn := range options.APIOptions { + if err := fn(stack); err != nil { + return nil, metadata, err + } + } + + ctx, err = withOperationMetrics(ctx, options.MeterProvider) + if err != nil { + return nil, metadata, err + } + + tracer := operationTracer(options.TracerProvider) + spanName := fmt.Sprintf("%s.%s", ServiceID, opID) + + ctx = tracing.WithOperationTracer(ctx, tracer) + + ctx, span := tracer.StartSpan(ctx, spanName, func(o *tracing.SpanOptions) { + o.Kind = tracing.SpanKindClient + o.Properties.Set("rpc.system", "aws-api") + o.Properties.Set("rpc.method", opID) + o.Properties.Set("rpc.service", ServiceID) + }) + endTimer := startMetricTimer(ctx, "client.call.duration") + defer endTimer() + defer span.End() + + handler := smithyhttp.NewClientHandlerWithOptions(options.HTTPClient, func(o *smithyhttp.ClientHandler) { + o.Meter = options.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs") + }) + decorated := middleware.DecorateHandler(handler, stack) + result, metadata, err = decorated.Handle(ctx, params) + if err != nil { + span.SetProperty("exception.type", fmt.Sprintf("%T", err)) + span.SetProperty("exception.message", err.Error()) + + var aerr smithy.APIError + if errors.As(err, &aerr) { + span.SetProperty("api.error_code", aerr.ErrorCode()) + span.SetProperty("api.error_message", aerr.ErrorMessage()) + span.SetProperty("api.error_fault", aerr.ErrorFault().String()) + } + + err = &smithy.OperationError{ + ServiceID: ServiceID, + OperationName: opID, + Err: err, + } + } + + span.SetProperty("error", err != nil) + if err == nil { + span.SetStatus(tracing.SpanStatusOK) + } else { + span.SetStatus(tracing.SpanStatusError) + } + + return result, metadata, err +} + +type operationInputKey struct{} + +func setOperationInput(ctx context.Context, input interface{}) context.Context { + return middleware.WithStackValue(ctx, operationInputKey{}, input) +} + +func getOperationInput(ctx context.Context) interface{} { + return middleware.GetStackValue(ctx, operationInputKey{}) +} + +type setOperationInputMiddleware struct { +} + +func (*setOperationInputMiddleware) ID() string { + return "setOperationInput" +} + +func (m *setOperationInputMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + ctx = setOperationInput(ctx, in.Parameters) + return next.HandleSerialize(ctx, in) +} + +func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, operation string) error { + if err := stack.Finalize.Add(&resolveAuthSchemeMiddleware{operation: operation, options: options}, middleware.Before); err != nil { + return fmt.Errorf("add ResolveAuthScheme: %w", err) + } + if err := stack.Finalize.Insert(&getIdentityMiddleware{options: options}, "ResolveAuthScheme", middleware.After); err != nil { + return fmt.Errorf("add GetIdentity: %v", err) + } + if err := stack.Finalize.Insert(&resolveEndpointV2Middleware{options: options}, "GetIdentity", middleware.After); err != nil { + return fmt.Errorf("add ResolveEndpointV2: %v", err) + } + if err := stack.Finalize.Insert(&signRequestMiddleware{options: options}, "ResolveEndpointV2", middleware.After); err != nil { + return fmt.Errorf("add Signing: %w", err) + } + return nil +} +func resolveAuthSchemeResolver(options *Options) { + if options.AuthSchemeResolver == nil { + options.AuthSchemeResolver = &defaultAuthSchemeResolver{} + } +} + +func resolveAuthSchemes(options *Options) { + if options.AuthSchemes == nil { + options.AuthSchemes = []smithyhttp.AuthScheme{ + internalauth.NewHTTPAuthScheme("aws.auth#sigv4", &internalauthsmithy.V4SignerAdapter{ + Signer: options.HTTPSignerV4, + Logger: options.Logger, + LogSigning: options.ClientLogMode.IsSigning(), + }), + } + } +} + +type noSmithyDocumentSerde = smithydocument.NoSerde + +type legacyEndpointContextSetter struct { + LegacyResolver EndpointResolver +} + +func (*legacyEndpointContextSetter) ID() string { + return "legacyEndpointContextSetter" +} + +func (m *legacyEndpointContextSetter) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.LegacyResolver != nil { + ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, true) + } + + return next.HandleInitialize(ctx, in) + +} +func addlegacyEndpointContextSetter(stack *middleware.Stack, o Options) error { + return stack.Initialize.Add(&legacyEndpointContextSetter{ + LegacyResolver: o.EndpointResolver, + }, middleware.Before) +} + +func resolveDefaultLogger(o *Options) { + if o.Logger != nil { + return + } + o.Logger = logging.Nop{} +} + +func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { + return middleware.AddSetLoggerMiddleware(stack, o.Logger) +} + +func setResolvedDefaultsMode(o *Options) { + if len(o.resolvedDefaultsMode) > 0 { + return + } + + var mode aws.DefaultsMode + mode.SetFromString(string(o.DefaultsMode)) + + if mode == aws.DefaultsModeAuto { + mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment) + } + + o.resolvedDefaultsMode = mode +} + +// NewFromConfig returns a new client from the provided config. +func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { + opts := Options{ + Region: cfg.Region, + DefaultsMode: cfg.DefaultsMode, + RuntimeEnvironment: cfg.RuntimeEnvironment, + HTTPClient: cfg.HTTPClient, + Credentials: cfg.Credentials, + APIOptions: cfg.APIOptions, + Logger: cfg.Logger, + ClientLogMode: cfg.ClientLogMode, + AppID: cfg.AppID, + AuthSchemePreference: cfg.AuthSchemePreference, + } + resolveAWSRetryerProvider(cfg, &opts) + resolveAWSRetryMaxAttempts(cfg, &opts) + resolveAWSRetryMode(cfg, &opts) + resolveAWSEndpointResolver(cfg, &opts) + resolveInterceptors(cfg, &opts) + resolveUseDualStackEndpoint(cfg, &opts) + resolveUseFIPSEndpoint(cfg, &opts) + resolveBaseEndpoint(cfg, &opts) + return New(opts, func(o *Options) { + for _, opt := range cfg.ServiceOptions { + opt(ServiceID, o) + } + for _, opt := range optFns { + opt(o) + } + }) +} + +func resolveHTTPClient(o *Options) { + var buildable *awshttp.BuildableClient + + if o.HTTPClient != nil { + var ok bool + buildable, ok = o.HTTPClient.(*awshttp.BuildableClient) + if !ok { + return + } + } else { + buildable = awshttp.NewBuildableClient() + } + + modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) + if err == nil { + buildable = buildable.WithDialerOptions(func(dialer *net.Dialer) { + if dialerTimeout, ok := modeConfig.GetConnectTimeout(); ok { + dialer.Timeout = dialerTimeout + } + }) + + buildable = buildable.WithTransportOptions(func(transport *http.Transport) { + if tlsHandshakeTimeout, ok := modeConfig.GetTLSNegotiationTimeout(); ok { + transport.TLSHandshakeTimeout = tlsHandshakeTimeout + } + }) + } + + o.HTTPClient = buildable +} + +func resolveRetryer(o *Options) { + if o.Retryer != nil { + return + } + + if len(o.RetryMode) == 0 { + modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) + if err == nil { + o.RetryMode = modeConfig.RetryMode + } + } + if len(o.RetryMode) == 0 { + o.RetryMode = aws.RetryModeStandard + } + + var standardOptions []func(*retry.StandardOptions) + if v := o.RetryMaxAttempts; v != 0 { + standardOptions = append(standardOptions, func(so *retry.StandardOptions) { + so.MaxAttempts = v + }) + } + + switch o.RetryMode { + case aws.RetryModeAdaptive: + var adaptiveOptions []func(*retry.AdaptiveModeOptions) + if len(standardOptions) != 0 { + adaptiveOptions = append(adaptiveOptions, func(ao *retry.AdaptiveModeOptions) { + ao.StandardOptions = append(ao.StandardOptions, standardOptions...) + }) + } + o.Retryer = retry.NewAdaptiveMode(adaptiveOptions...) + + default: + o.Retryer = retry.NewStandard(standardOptions...) + } +} + +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + +func resolveAWSRetryMode(cfg aws.Config, o *Options) { + if len(cfg.RetryMode) == 0 { + return + } + o.RetryMode = cfg.RetryMode +} +func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) { + if cfg.RetryMaxAttempts == 0 { + return + } + o.RetryMaxAttempts = cfg.RetryMaxAttempts +} + +func finalizeRetryMaxAttempts(o *Options) { + if o.RetryMaxAttempts == 0 { + return + } + + o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts) +} + +func finalizeOperationRetryMaxAttempts(o *Options, client Client) { + if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts { + return + } + + o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts) +} + +func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { + if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil { + return + } + o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions) +} + +func resolveInterceptors(cfg aws.Config, o *Options) { + o.Interceptors = cfg.Interceptors.Copy() +} + +func addClientUserAgent(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "cloudwatchlogs", goModuleVersion) + if len(options.AppID) > 0 { + ua.AddSDKAgentKey(awsmiddleware.ApplicationIdentifier, options.AppID) + } + + return nil +} + +func getOrAddRequestUserAgent(stack *middleware.Stack) (*awsmiddleware.RequestUserAgent, error) { + id := (*awsmiddleware.RequestUserAgent)(nil).ID() + mw, ok := stack.Build.Get(id) + if !ok { + mw = awsmiddleware.NewRequestUserAgent() + if err := stack.Build.Add(mw, middleware.After); err != nil { + return nil, err + } + } + + ua, ok := mw.(*awsmiddleware.RequestUserAgent) + if !ok { + return nil, fmt.Errorf("%T for %s middleware did not match expected type", mw, id) + } + + return ua, nil +} + +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 addClientRequestID(stack *middleware.Stack) error { + return stack.Build.Add(&awsmiddleware.ClientRequestID{}, middleware.After) +} + +func addComputeContentLength(stack *middleware.Stack) error { + return stack.Build.Add(&smithyhttp.ComputeContentLength{}, middleware.After) +} + +func addRawResponseToMetadata(stack *middleware.Stack) error { + return stack.Deserialize.Add(&awsmiddleware.AddRawResponse{}, middleware.Before) +} + +func addRecordResponseTiming(stack *middleware.Stack) error { + return stack.Deserialize.Add(&awsmiddleware.RecordResponseTiming{}, middleware.After) +} + +func addSpanRetryLoop(stack *middleware.Stack, options Options) error { + return stack.Finalize.Insert(&spanRetryLoop{options: options}, "Retry", middleware.Before) +} + +type spanRetryLoop struct { + options Options +} + +func (*spanRetryLoop) ID() string { + return "spanRetryLoop" +} + +func (m *spanRetryLoop) HandleFinalize( + ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler, +) ( + middleware.FinalizeOutput, middleware.Metadata, error, +) { + tracer := operationTracer(m.options.TracerProvider) + ctx, span := tracer.StartSpan(ctx, "RetryLoop") + defer span.End() + + return next.HandleFinalize(ctx, in) +} +func addStreamingEventsPayload(stack *middleware.Stack) error { + return stack.Finalize.Add(&v4.StreamingEventsPayload{}, middleware.Before) +} + +func addUnsignedPayload(stack *middleware.Stack) error { + return stack.Finalize.Insert(&v4.UnsignedPayload{}, "ResolveEndpointV2", middleware.After) +} + +func addComputePayloadSHA256(stack *middleware.Stack) error { + return stack.Finalize.Insert(&v4.ComputePayloadSHA256{}, "ResolveEndpointV2", middleware.After) +} + +func addContentSHA256Header(stack *middleware.Stack) error { + return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) +} + +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + +func resolveIdempotencyTokenProvider(o *Options) { + if o.IdempotencyTokenProvider != nil { + return + } + o.IdempotencyTokenProvider = smithyrand.NewUUIDIdempotencyToken(cryptorand.Reader) +} + +func addRetry(stack *middleware.Stack, o Options, c *Client) error { + attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { + m.LogAttempts = o.ClientLogMode.IsRetries() + m.OperationMeter = o.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs") + m.ClientSkew = c.timeOffset + }) + if err := stack.Finalize.Insert(attempt, "ResolveAuthScheme", middleware.Before); err != nil { + return err + } + if err := stack.Finalize.Insert(&retry.MetricsHeader{}, attempt.ID(), middleware.After); err != nil { + return err + } + return nil +} + +// resolves dual-stack endpoint configuration +func resolveUseDualStackEndpoint(cfg aws.Config, o *Options) error { + if len(cfg.ConfigSources) == 0 { + return nil + } + value, found, err := internalConfig.ResolveUseDualStackEndpoint(context.Background(), cfg.ConfigSources) + if err != nil { + return err + } + if found { + o.EndpointOptions.UseDualStackEndpoint = value + } + return nil +} + +// resolves FIPS endpoint configuration +func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { + if len(cfg.ConfigSources) == 0 { + return nil + } + value, found, err := internalConfig.ResolveUseFIPSEndpoint(context.Background(), cfg.ConfigSources) + if err != nil { + return err + } + if found { + o.EndpointOptions.UseFIPSEndpoint = value + } + return nil +} + +func initializeTimeOffsetResolver(c *Client) { + c.timeOffset = new(atomic.Int64) +} + +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + +type setCredentialSourceMiddleware struct { + ua *awsmiddleware.RequestUserAgent + options Options +} + +func (m setCredentialSourceMiddleware) ID() string { return "SetCredentialSourceMiddleware" } + +func (m setCredentialSourceMiddleware) HandleBuild(ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler) ( + out middleware.BuildOutput, metadata middleware.Metadata, err error, +) { + asProviderSource, ok := m.options.Credentials.(aws.CredentialProviderSource) + if !ok { + return next.HandleBuild(ctx, in) + } + providerSources := asProviderSource.ProviderSources() + for _, source := range providerSources { + m.ua.AddCredentialsSource(source) + } + return next.HandleBuild(ctx, in) +} + +func addCredentialSource(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + mw := setCredentialSourceMiddleware{ua: ua, options: options} + return stack.Build.Insert(&mw, "UserAgent", middleware.Before) +} + +func resolveTracerProvider(options *Options) { + if options.TracerProvider == nil { + options.TracerProvider = &tracing.NopTracerProvider{} + } +} + +func resolveMeterProvider(options *Options) { + if options.MeterProvider == nil { + options.MeterProvider = metrics.NopMeterProvider{} + } +} + +// IdempotencyTokenProvider interface for providing idempotency token +type IdempotencyTokenProvider interface { + GetIdempotencyToken() (string, error) +} + +func addRecursionDetection(stack *middleware.Stack) error { + return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) +} + +func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { + return stack.Deserialize.Insert(&awsmiddleware.RequestIDRetriever{}, "OperationDeserializer", middleware.Before) + +} + +func addResponseErrorMiddleware(stack *middleware.Stack) error { + return stack.Deserialize.Insert(&awshttp.ResponseErrorWrapper{}, "RequestIDRetriever", middleware.Before) + +} + +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) +} + +type disableHTTPSMiddleware struct { + DisableHTTPS bool +} + +func (*disableHTTPSMiddleware) ID() string { + return "disableHTTPS" +} + +func (m *disableHTTPSMiddleware) 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, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.DisableHTTPS && !smithyhttp.GetHostnameImmutable(ctx) { + req.URL.Scheme = "http" + } + + return next.HandleFinalize(ctx, in) +} + +func addDisableHTTPSMiddleware(stack *middleware.Stack, o Options) error { + return stack.Finalize.Insert(&disableHTTPSMiddleware{ + DisableHTTPS: o.EndpointOptions.DisableHTTPS, + }, "ResolveEndpointV2", middleware.After) +} + +func addInterceptBeforeRetryLoop(stack *middleware.Stack, opts Options) error { + return stack.Finalize.Insert(&smithyhttp.InterceptBeforeRetryLoop{ + Interceptors: opts.Interceptors.BeforeRetryLoop, + }, "Retry", middleware.Before) +} + +func addInterceptAttempt(stack *middleware.Stack, opts Options) error { + return stack.Finalize.Insert(&smithyhttp.InterceptAttempt{ + BeforeAttempt: opts.Interceptors.BeforeAttempt, + AfterAttempt: opts.Interceptors.AfterAttempt, + }, "Retry", middleware.After) +} + +func addInterceptors(stack *middleware.Stack, opts Options) error { + // middlewares are expensive, don't add all of these interceptor ones unless the caller + // actually has at least one interceptor configured + // + // at the moment it's all-or-nothing because some of the middlewares here are responsible for + // setting fields in the interceptor context for future ones + if len(opts.Interceptors.BeforeExecution) == 0 && + len(opts.Interceptors.BeforeSerialization) == 0 && len(opts.Interceptors.AfterSerialization) == 0 && + len(opts.Interceptors.BeforeRetryLoop) == 0 && + len(opts.Interceptors.BeforeAttempt) == 0 && + len(opts.Interceptors.BeforeSigning) == 0 && len(opts.Interceptors.AfterSigning) == 0 && + len(opts.Interceptors.BeforeTransmit) == 0 && len(opts.Interceptors.AfterTransmit) == 0 && + len(opts.Interceptors.BeforeDeserialization) == 0 && len(opts.Interceptors.AfterDeserialization) == 0 && + len(opts.Interceptors.AfterAttempt) == 0 && len(opts.Interceptors.AfterExecution) == 0 { + return nil + } + + return errors.Join( + stack.Initialize.Add(&smithyhttp.InterceptExecution{ + BeforeExecution: opts.Interceptors.BeforeExecution, + AfterExecution: opts.Interceptors.AfterExecution, + }, middleware.Before), + stack.Serialize.Insert(&smithyhttp.InterceptBeforeSerialization{ + Interceptors: opts.Interceptors.BeforeSerialization, + }, "OperationSerializer", middleware.Before), + stack.Serialize.Insert(&smithyhttp.InterceptAfterSerialization{ + Interceptors: opts.Interceptors.AfterSerialization, + }, "OperationSerializer", middleware.After), + stack.Finalize.Insert(&smithyhttp.InterceptBeforeSigning{ + Interceptors: opts.Interceptors.BeforeSigning, + }, "Signing", middleware.Before), + stack.Finalize.Insert(&smithyhttp.InterceptAfterSigning{ + Interceptors: opts.Interceptors.AfterSigning, + }, "Signing", middleware.After), + stack.Deserialize.Add(&smithyhttp.InterceptTransmit{ + BeforeTransmit: opts.Interceptors.BeforeTransmit, + AfterTransmit: opts.Interceptors.AfterTransmit, + }, middleware.After), + stack.Deserialize.Insert(&smithyhttp.InterceptBeforeDeserialization{ + Interceptors: opts.Interceptors.BeforeDeserialization, + }, "OperationDeserializer", middleware.After), // (deserialize stack is called in reverse) + stack.Deserialize.Insert(&smithyhttp.InterceptAfterDeserialization{ + Interceptors: opts.Interceptors.AfterDeserialization, + }, "OperationDeserializer", middleware.Before), + ) +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_AssociateKmsKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_AssociateKmsKey.go new file mode 100644 index 00000000000..daf25716dca --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_AssociateKmsKey.go @@ -0,0 +1,237 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Associates the specified KMS key with either one log group in the account, or +// with all stored CloudWatch Logs query insights results in the account. +// +// When you use AssociateKmsKey , you specify either the logGroupName parameter or +// the resourceIdentifier parameter. You can't specify both of those parameters in +// the same operation. +// +// - Specify the logGroupName parameter to cause log events ingested into that +// log group to be encrypted with that key. Only the log events ingested after the +// key is associated are encrypted with that key. +// +// Associating a KMS key with a log group overrides any existing associations +// +// between the log group and a KMS key. After a KMS key is associated with a log +// group, all newly ingested data for the log group is encrypted using the KMS key. +// This association is stored as long as the data encrypted with the KMS key is +// still within CloudWatch Logs. This enables CloudWatch Logs to decrypt this data +// whenever it is requested. +// +// Associating a key with a log group does not cause the results of queries of +// +// that log group to be encrypted with that key. To have query results encrypted +// with a KMS key, you must use an AssociateKmsKey operation with the +// resourceIdentifier parameter that specifies a query-result resource. +// +// - Specify the resourceIdentifier parameter with a query-result resource, to +// use that key to encrypt the stored results of all future [StartQuery]operations in the +// account. The response from a [GetQueryResults]operation will still return the query results in +// plain text. +// +// Even if you have not associated a key with your query results, the query +// +// results are encrypted when stored, using the default CloudWatch Logs method. +// +// If you run a query from a monitoring account that queries logs in a source +// +// account, the query results key from the monitoring account, if any, is used. +// +// If you delete the key that is used to encrypt log events or log group query +// results, then all the associated stored log events or query results that were +// encrypted with that key will be unencryptable and unusable. +// +// CloudWatch Logs supports only symmetric KMS keys. Do not associate an +// asymmetric KMS key with your log group or query results. For more information, +// see [Using Symmetric and Asymmetric Keys]. +// +// It can take up to 5 minutes for this operation to take effect. +// +// If you attempt to associate a KMS key with a log group but the KMS key does not +// exist or the KMS key is disabled, you receive an InvalidParameterException +// error. +// +// [Using Symmetric and Asymmetric Keys]: https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html +// +// [StartQuery]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_StartQuery.html +// [GetQueryResults]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetQueryResults.html +func (c *Client) AssociateKmsKey(ctx context.Context, params *AssociateKmsKeyInput, optFns ...func(*Options)) (*AssociateKmsKeyOutput, error) { + if params == nil { + params = &AssociateKmsKeyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "AssociateKmsKey", params, optFns, c.addOperationAssociateKmsKeyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*AssociateKmsKeyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type AssociateKmsKeyInput struct { + + // The Amazon Resource Name (ARN) of the KMS key to use when encrypting log data. + // This must be a symmetric KMS key. For more information, see [Amazon Resource Names]and [Using Symmetric and Asymmetric Keys]. + // + // [Amazon Resource Names]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kms + // [Using Symmetric and Asymmetric Keys]: https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html + // + // This member is required. + KmsKeyId *string + + // The name of the log group. + // + // In your AssociateKmsKey operation, you must specify either the + // resourceIdentifier parameter or the logGroup parameter, but you can't specify + // both. + LogGroupName *string + + // Specifies the target for this operation. You must specify one of the following: + // + // - Specify the following ARN to have future [GetQueryResults]operations in this account encrypt + // the results with the specified KMS key. Replace REGION and ACCOUNT_ID with your + // Region and account ID. + // + // arn:aws:logs:REGION:ACCOUNT_ID:query-result:* + // + // - Specify the ARN of a log group to have CloudWatch Logs use the KMS key to + // encrypt log events that are ingested and stored by that log group. The log group + // ARN must be in the following format. Replace REGION and ACCOUNT_ID with your + // Region and account ID. + // + // arn:aws:logs:REGION:ACCOUNT_ID:log-group:LOG_GROUP_NAME + // + // In your AssociateKmsKey operation, you must specify either the + // resourceIdentifier parameter or the logGroup parameter, but you can't specify + // both. + // + // [GetQueryResults]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetQueryResults.html + ResourceIdentifier *string + + noSmithyDocumentSerde +} + +type AssociateKmsKeyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationAssociateKmsKeyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpAssociateKmsKey{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpAssociateKmsKey{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "AssociateKmsKey"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpAssociateKmsKeyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateKmsKey(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opAssociateKmsKey(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "AssociateKmsKey", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_AssociateSourceToS3TableIntegration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_AssociateSourceToS3TableIntegration.go new file mode 100644 index 00000000000..1952324b31d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_AssociateSourceToS3TableIntegration.go @@ -0,0 +1,164 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Associates a data source with an S3 Table Integration for query access in the +// 'logs' namespace. This enables querying log data using analytics engines that +// support Iceberg such as Amazon Athena, Amazon Redshift, and Apache Spark. +func (c *Client) AssociateSourceToS3TableIntegration(ctx context.Context, params *AssociateSourceToS3TableIntegrationInput, optFns ...func(*Options)) (*AssociateSourceToS3TableIntegrationOutput, error) { + if params == nil { + params = &AssociateSourceToS3TableIntegrationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "AssociateSourceToS3TableIntegration", params, optFns, c.addOperationAssociateSourceToS3TableIntegrationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*AssociateSourceToS3TableIntegrationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type AssociateSourceToS3TableIntegrationInput struct { + + // The data source to associate with the S3 Table Integration. Contains the name + // and type of the data source. + // + // This member is required. + DataSource *types.DataSource + + // The Amazon Resource Name (ARN) of the S3 Table Integration to associate the + // data source with. + // + // This member is required. + IntegrationArn *string + + noSmithyDocumentSerde +} + +type AssociateSourceToS3TableIntegrationOutput struct { + + // The unique identifier for the association between the data source and S3 Table + // Integration. + Identifier *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationAssociateSourceToS3TableIntegrationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpAssociateSourceToS3TableIntegration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpAssociateSourceToS3TableIntegration{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "AssociateSourceToS3TableIntegration"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpAssociateSourceToS3TableIntegrationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateSourceToS3TableIntegration(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opAssociateSourceToS3TableIntegration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "AssociateSourceToS3TableIntegration", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_CancelExportTask.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_CancelExportTask.go new file mode 100644 index 00000000000..fa0a28f32dc --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_CancelExportTask.go @@ -0,0 +1,151 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Cancels the specified export task. +// +// The task must be in the PENDING or RUNNING state. +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 member is required. + TaskId *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) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpCancelExportTask{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCancelExportTask{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CancelExportTask"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); 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 = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCancelExportTask(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CancelExportTask", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_CancelImportTask.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_CancelImportTask.go new file mode 100644 index 00000000000..b05b4cb5b6f --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_CancelImportTask.go @@ -0,0 +1,169 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Cancels an active import task and stops importing data from the CloudTrail Lake +// Event Data Store. +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 ID of the import task to cancel. + // + // This member is required. + ImportId *string + + noSmithyDocumentSerde +} + +type CancelImportTaskOutput struct { + + // The timestamp when the import task was created, expressed as the number of + // milliseconds after Jan 1, 1970 00:00:00 UTC. + CreationTime *int64 + + // The ID of the cancelled import task. + ImportId *string + + // Statistics about the import progress at the time of cancellation. + ImportStatistics *types.ImportStatistics + + // The final status of the import task. This will be set to CANCELLED. + ImportStatus types.ImportStatus + + // The timestamp when the import task was cancelled, expressed as the number of + // milliseconds after Jan 1, 1970 00:00:00 UTC. + LastUpdatedTime *int64 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCancelImportTaskMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpCancelImportTask{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCancelImportTask{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CancelImportTask"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpCancelImportTaskValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCancelImportTask(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCancelImportTask(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CancelImportTask", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_CreateDelivery.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_CreateDelivery.go new file mode 100644 index 00000000000..a8d9448a19e --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_CreateDelivery.go @@ -0,0 +1,215 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a delivery. A delivery is a connection between a logical delivery +// source and a logical delivery destination that you have already created. +// +// Only some Amazon Web Services services support being configured as a delivery +// source using this operation. These services are listed as Supported [V2 +// Permissions] in the table at [Enabling logging from Amazon Web Services services.] +// +// A delivery destination can represent a log group in CloudWatch Logs, an Amazon +// S3 bucket, a delivery stream in Firehose, or X-Ray. +// +// To configure logs delivery between a supported Amazon Web Services service and +// a destination, you must do the following: +// +// - Create a delivery source, which is a logical object that represents the +// resource that is actually sending the logs. For more information, see [PutDeliverySource]. +// +// - Create a delivery destination, which is a logical object that represents +// the actual delivery destination. For more information, see [PutDeliveryDestination]. +// +// - If you are delivering logs cross-account, you must use [PutDeliveryDestinationPolicy]in the destination +// account to assign an IAM policy to the destination. This policy allows delivery +// to that destination. +// +// - Use CreateDelivery to create a delivery by pairing exactly one delivery +// source and one delivery destination. +// +// You can configure a single delivery source to send logs to multiple +// destinations by creating multiple deliveries. You can also create multiple +// deliveries to configure multiple delivery sources to send logs to the same +// delivery destination. +// +// To update an existing delivery configuration, use [UpdateDeliveryConfiguration]. +// +// [PutDeliveryDestination]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestination.html +// [PutDeliverySource]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliverySource.html +// [Enabling logging from Amazon Web Services services.]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AWS-logs-and-resource-policy.html +// [PutDeliveryDestinationPolicy]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestinationPolicy.html +// [UpdateDeliveryConfiguration]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_UpdateDeliveryConfiguration.html +func (c *Client) CreateDelivery(ctx context.Context, params *CreateDeliveryInput, optFns ...func(*Options)) (*CreateDeliveryOutput, error) { + if params == nil { + params = &CreateDeliveryInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateDelivery", params, optFns, c.addOperationCreateDeliveryMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateDeliveryOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateDeliveryInput struct { + + // The ARN of the delivery destination to use for this delivery. + // + // This member is required. + DeliveryDestinationArn *string + + // The name of the delivery source to use for this delivery. + // + // This member is required. + DeliverySourceName *string + + // The field delimiter to use between record fields when the final output format + // of a delivery is in Plain , W3C , or Raw format. + FieldDelimiter *string + + // The list of record fields to be delivered to the destination, in order. If the + // delivery's log source has mandatory fields, they must be included in this list. + RecordFields []string + + // This structure contains parameters that are valid only when the delivery's + // delivery destination is an S3 bucket. + S3DeliveryConfiguration *types.S3DeliveryConfiguration + + // An optional list of key-value pairs to associate with the resource. + // + // For more information about tagging, see [Tagging Amazon Web Services resources] + // + // [Tagging Amazon Web Services resources]: https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html + Tags map[string]string + + noSmithyDocumentSerde +} + +type CreateDeliveryOutput struct { + + // A structure that contains information about the delivery that you just created. + Delivery *types.Delivery + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateDeliveryMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateDelivery{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateDelivery{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateDelivery"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpCreateDeliveryValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateDelivery(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateDelivery(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateDelivery", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_CreateExportTask.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_CreateExportTask.go new file mode 100644 index 00000000000..eb5c0dc3727 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_CreateExportTask.go @@ -0,0 +1,221 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates an export task so that you can efficiently export data from a log group +// to an Amazon S3 bucket. When you perform a CreateExportTask operation, you must +// use credentials that have permission to write to the S3 bucket that you specify +// as the destination. +// +// Exporting log data to S3 buckets that are encrypted by KMS is supported. +// Exporting log data to Amazon S3 buckets that have S3 Object Lock enabled with a +// retention period is also supported. +// +// Exporting to S3 buckets that are encrypted with AES-256 is supported. +// +// This is an asynchronous call. If all the required information is provided, this +// operation initiates an export task and responds with the ID of the task. After +// the task has started, you can use [DescribeExportTasks]to get the status of the export task. Each +// account can only have one active ( RUNNING or PENDING ) export task at a time. +// To cancel an export task, use [CancelExportTask]. +// +// You can export logs from multiple log groups or multiple time ranges to the +// same S3 bucket. To separate log data for each export task, specify a prefix to +// be used as the Amazon S3 key prefix for all exported objects. +// +// We recommend that you don't regularly export to Amazon S3 as a way to +// continuously archive your logs. For that use case, we instead recommend that you +// use subscriptions. For more information about subscriptions, see [Real-time processing of log data with subscriptions]. +// +// Time-based sorting on chunks of log data inside an exported file is not +// guaranteed. You can sort the exported log field data by using Linux utilities. +// +// [CancelExportTask]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CancelExportTask.html +// [DescribeExportTasks]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeExportTasks.html +// [Real-time processing of log data with subscriptions]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Subscriptions.html +func (c *Client) CreateExportTask(ctx context.Context, params *CreateExportTaskInput, optFns ...func(*Options)) (*CreateExportTaskOutput, error) { + if params == nil { + params = &CreateExportTaskInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateExportTask", params, optFns, c.addOperationCreateExportTaskMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateExportTaskOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateExportTaskInput struct { + + // The name of S3 bucket for the exported log data. The bucket must be in the same + // Amazon Web Services Region. + // + // This member is required. + Destination *string + + // The start time of the range for the request, expressed as the number of + // milliseconds after Jan 1, 1970 00:00:00 UTC . Events with a timestamp earlier + // than this time are not exported. + // + // This member is required. + From *int64 + + // The name of the log group. + // + // This member is required. + LogGroupName *string + + // The end time of the range for the request, expressed as the number of + // milliseconds after Jan 1, 1970 00:00:00 UTC . Events with a timestamp later than + // this time are not exported. + // + // You must specify a time that is not earlier than when this log group was + // created. + // + // This member is required. + To *int64 + + // The prefix used as the start of the key for every object exported. If you don't + // specify a value, the default is exportedlogs . + // + // The length of this parameter must comply with the S3 object key name length + // limits. The object key name is a sequence of Unicode characters with UTF-8 + // encoding, and can be up to 1,024 bytes. + DestinationPrefix *string + + // Export only log streams that match the provided prefix. If you don't specify a + // value, no prefix filter is applied. + LogStreamNamePrefix *string + + // The name of the export task. + TaskName *string + + noSmithyDocumentSerde +} + +type CreateExportTaskOutput struct { + + // The ID of the export task. + TaskId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateExportTaskMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateExportTask{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateExportTask{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateExportTask"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpCreateExportTaskValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateExportTask(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateExportTask(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateExportTask", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_CreateImportTask.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_CreateImportTask.go new file mode 100644 index 00000000000..56533ae82f9 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_CreateImportTask.go @@ -0,0 +1,230 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Starts an import from a data source to CloudWatch Log and creates a managed log +// group as the destination for the imported data. Currently, [CloudTrail Event Data Store]is the only +// supported data source. +// +// The import task must satisfy the following constraints: +// +// - The specified source must be in an ACTIVE state. +// +// - The API caller must have permissions to access the data in the provided +// source and to perform iam:PassRole on the provided import role which has the +// same permissions, as described below. +// +// - The provided IAM role must trust the "cloudtrail.amazonaws.com" principal +// and have the following permissions: +// +// - cloudtrail:GetEventDataStoreData +// +// - logs:CreateLogGroup +// +// - logs:CreateLogStream +// +// - logs:PutResourcePolicy +// +// - (If source has an associated Amazon Web Services KMS Key) kms:Decrypt +// +// - (If source has an associated Amazon Web Services KMS Key) +// kms:GenerateDataKey +// +// Example IAM policy for provided import role: +// +// [ { "Effect": "Allow", "Action": "iam:PassRole", "Resource": +// +// "arn:aws:iam::123456789012:role/apiCallerCredentials", "Condition": { +// "StringLike": { "iam:AssociatedResourceARN": +// "arn:aws:logs:us-east-1:123456789012:log-group:aws/cloudtrail/f1d45bff-d0e3-4868-b5d9-2eb678aa32fb:*" +// } } }, { "Effect": "Allow", "Action": [ "cloudtrail:GetEventDataStoreData" ], +// "Resource": [ +// "arn:aws:cloudtrail:us-east-1:123456789012:eventdatastore/f1d45bff-d0e3-4868-b5d9-2eb678aa32fb" +// ] }, { "Effect": "Allow", "Action": [ "logs:CreateImportTask", +// "logs:CreateLogGroup", "logs:CreateLogStream", "logs:PutResourcePolicy" ], +// "Resource": [ "arn:aws:logs:us-east-1:123456789012:log-group:/aws/cloudtrail/*" +// ] }, { "Effect": "Allow", "Action": [ "kms:Decrypt", "kms:GenerateDataKey" ], +// "Resource": [ +// "arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012" ] +// } ] +// +// - If the import source has a customer managed key, the +// "cloudtrail.amazonaws.com" principal needs permissions to perform kms:Decrypt +// and kms:GenerateDataKey. +// +// - There can be no more than 3 active imports per account at a given time. +// +// - The startEventTime must be less than or equal to endEventTime. +// +// - The data being imported must be within the specified source's retention +// period. +// +// [CloudTrail Event Data Store]: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html +func (c *Client) CreateImportTask(ctx context.Context, params *CreateImportTaskInput, optFns ...func(*Options)) (*CreateImportTaskOutput, error) { + if params == nil { + params = &CreateImportTaskInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateImportTask", params, optFns, c.addOperationCreateImportTaskMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateImportTaskOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateImportTaskInput struct { + + // The ARN of the IAM role that grants CloudWatch Logs permission to import from + // the CloudTrail Lake Event Data Store. + // + // This member is required. + ImportRoleArn *string + + // The ARN of the source to import from. + // + // This member is required. + ImportSourceArn *string + + // Optional filters to constrain the import by CloudTrail event time. Times are + // specified in Unix timestamp milliseconds. The range of data being imported must + // be within the specified source's retention period. + ImportFilter *types.ImportFilter + + noSmithyDocumentSerde +} + +type CreateImportTaskOutput struct { + + // The timestamp when the import task was created, expressed as the number of + // milliseconds after Jan 1, 1970 00:00:00 UTC. + CreationTime *int64 + + // The ARN of the CloudWatch Logs log group created as the destination for the + // imported events. + ImportDestinationArn *string + + // A unique identifier for the import task. + ImportId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateImportTaskMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateImportTask{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateImportTask{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateImportTask"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpCreateImportTaskValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateImportTask(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateImportTask(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateImportTask", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_CreateLogAnomalyDetector.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_CreateLogAnomalyDetector.go new file mode 100644 index 00000000000..2aa1c0de44f --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_CreateLogAnomalyDetector.go @@ -0,0 +1,226 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates an anomaly detector that regularly scans one or more log groups and +// look for patterns and anomalies in the logs. +// +// An anomaly detector can help surface issues by automatically discovering +// anomalies in your log event traffic. An anomaly detector uses machine learning +// algorithms to scan log events and find patterns. A pattern is a shared text +// structure that recurs among your log fields. Patterns provide a useful tool for +// analyzing large sets of logs because a large number of log events can often be +// compressed into a few patterns. +// +// The anomaly detector uses pattern recognition to find anomalies , which are +// unusual log events. It uses the evaluationFrequency to compare current log +// events and patterns with trained baselines. +// +// Fields within a pattern are called tokens. Fields that vary within a pattern, +// such as a request ID or timestamp, are referred to as dynamic tokens and +// represented by <*> . +// +// The following is an example of a pattern: +// +// [INFO] Request time: <*> ms +// +// This pattern represents log events like [INFO] Request time: 327 ms and other +// similar log events that differ only by the number, in this csse 327. When the +// pattern is displayed, the different numbers are replaced by <*> +// +// Any parts of log events that are masked as sensitive data are not scanned for +// anomalies. For more information about masking sensitive data, see [Help protect sensitive log data with masking]. +// +// [Help protect sensitive log data with masking]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/mask-sensitive-log-data.html +func (c *Client) CreateLogAnomalyDetector(ctx context.Context, params *CreateLogAnomalyDetectorInput, optFns ...func(*Options)) (*CreateLogAnomalyDetectorOutput, error) { + if params == nil { + params = &CreateLogAnomalyDetectorInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateLogAnomalyDetector", params, optFns, c.addOperationCreateLogAnomalyDetectorMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateLogAnomalyDetectorOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateLogAnomalyDetectorInput struct { + + // An array containing the ARN of the log group that this anomaly detector will + // watch. You can specify only one log group ARN. + // + // This member is required. + LogGroupArnList []string + + // The number of days to have visibility on an anomaly. After this time period has + // elapsed for an anomaly, it will be automatically baselined and the anomaly + // detector will treat new occurrences of a similar anomaly as normal. Therefore, + // if you do not correct the cause of an anomaly during the time period specified + // in anomalyVisibilityTime , it will be considered normal going forward and will + // not be detected as an anomaly. + AnomalyVisibilityTime *int64 + + // A name for this anomaly detector. + DetectorName *string + + // Specifies how often the anomaly detector is to run and look for anomalies. Set + // this value according to the frequency that the log group receives new logs. For + // example, if the log group receives new log events every 10 minutes, then 15 + // minutes might be a good setting for evaluationFrequency . + EvaluationFrequency types.EvaluationFrequency + + // You can use this parameter to limit the anomaly detection model to examine only + // log events that match the pattern you specify here. For more information, see [Filter and Pattern Syntax]. + // + // [Filter and Pattern Syntax]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html + FilterPattern *string + + // Optionally assigns a KMS key to secure this anomaly detector and its findings. + // If a key is assigned, the anomalies found and the model used by this detector + // are encrypted at rest with the key. If a key is assigned to an anomaly detector, + // a user must have permissions for both this key and for the anomaly detector to + // retrieve information about the anomalies that it finds. + // + // Make sure the value provided is a valid KMS key ARN. For more information about + // using a KMS key and to see the required IAM policy, see [Use a KMS key with an anomaly detector]. + // + // [Use a KMS key with an anomaly detector]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/LogsAnomalyDetection-KMS.html + KmsKeyId *string + + // An optional list of key-value pairs to associate with the resource. + // + // For more information about tagging, see [Tagging Amazon Web Services resources] + // + // [Tagging Amazon Web Services resources]: https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html + Tags map[string]string + + noSmithyDocumentSerde +} + +type CreateLogAnomalyDetectorOutput struct { + + // The ARN of the log anomaly detector that you just created. + AnomalyDetectorArn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateLogAnomalyDetectorMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateLogAnomalyDetector{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateLogAnomalyDetector{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateLogAnomalyDetector"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpCreateLogAnomalyDetectorValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateLogAnomalyDetector(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateLogAnomalyDetector(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateLogAnomalyDetector", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_CreateLogGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_CreateLogGroup.go new file mode 100644 index 00000000000..1cba65ea619 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_CreateLogGroup.go @@ -0,0 +1,230 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a log group with the specified name. You can create up to 1,000,000 log +// groups per Region per account. +// +// You must use the following guidelines when naming a log group: +// +// - Log group names must be unique within a Region for an Amazon Web Services +// account. +// +// - Log group names can be between 1 and 512 characters long. +// +// - Log group names consist of the following characters: a-z, A-Z, 0-9, '_' +// (underscore), '-' (hyphen), '/' (forward slash), '.' (period), and '#' (number +// sign) +// +// - Log group names can't start with the string aws/ +// +// When you create a log group, by default the log events in the log group do not +// expire. To set a retention policy so that events expire and are deleted after a +// specified time, use [PutRetentionPolicy]. +// +// If you associate an KMS key with the log group, ingested data is encrypted +// using the KMS key. This association is stored as long as the data encrypted with +// the KMS key is still within CloudWatch Logs. This enables CloudWatch Logs to +// decrypt this data whenever it is requested. +// +// If you attempt to associate a KMS key with the log group but the KMS key does +// not exist or the KMS key is disabled, you receive an InvalidParameterException +// error. +// +// CloudWatch Logs supports only symmetric KMS keys. Do not associate an +// asymmetric KMS key with your log group. For more information, see [Using Symmetric and Asymmetric Keys]. +// +// [Using Symmetric and Asymmetric Keys]: https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html +// [PutRetentionPolicy]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutRetentionPolicy.html +func (c *Client) CreateLogGroup(ctx context.Context, params *CreateLogGroupInput, optFns ...func(*Options)) (*CreateLogGroupOutput, error) { + if params == nil { + params = &CreateLogGroupInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateLogGroup", params, optFns, c.addOperationCreateLogGroupMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateLogGroupOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateLogGroupInput struct { + + // A name for the log group. + // + // This member is required. + LogGroupName *string + + // Use this parameter to enable deletion protection for the new log group. When + // enabled on a log group, deletion protection blocks all deletion operations until + // it is explicitly disabled. By default log groups are created without deletion + // protection enabled. + DeletionProtectionEnabled *bool + + // The Amazon Resource Name (ARN) of the KMS key to use when encrypting log data. + // For more information, see [Amazon Resource Names]. + // + // [Amazon Resource Names]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kms + KmsKeyId *string + + // Use this parameter to specify the log group class for this log group. There are + // three classes: + // + // - The Standard log class supports all CloudWatch Logs features. + // + // - The Infrequent Access log class supports a subset of CloudWatch Logs + // features and incurs lower costs. + // + // - Use the Delivery log class only for delivering Lambda logs to store in + // Amazon S3 or Amazon Data Firehose. Log events in log groups in the Delivery + // class are kept in CloudWatch Logs for only one day. This log class doesn't offer + // rich CloudWatch Logs capabilities such as CloudWatch Logs Insights queries. + // + // If you omit this parameter, the default of STANDARD is used. + // + // The value of logGroupClass can't be changed after a log group is created. + // + // For details about the features supported by each class, see [Log classes] + // + // [Log classes]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch_Logs_Log_Classes.html + LogGroupClass types.LogGroupClass + + // The key-value pairs to use for the tags. + // + // You can grant users access to certain log groups while preventing them from + // accessing other log groups. To do so, tag your groups and use IAM policies that + // refer to those tags. To assign tags when you create a log group, you must have + // either the logs:TagResource or logs:TagLogGroup permission. For more + // information about tagging, see [Tagging Amazon Web Services resources]. For more information about using tags to + // control access, see [Controlling access to Amazon Web Services resources using tags]. + // + // [Controlling access to Amazon Web Services resources using tags]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html + // [Tagging Amazon Web Services resources]: https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html + Tags map[string]string + + noSmithyDocumentSerde +} + +type CreateLogGroupOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateLogGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateLogGroup{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateLogGroup{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateLogGroup"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpCreateLogGroupValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateLogGroup(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateLogGroup(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateLogGroup", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_CreateLogStream.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_CreateLogStream.go new file mode 100644 index 00000000000..b63f4c600e7 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_CreateLogStream.go @@ -0,0 +1,168 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a log stream for the specified log group. A log stream is a sequence of +// log events that originate from a single source, such as an application instance +// or a resource that is being monitored. +// +// There is no limit on the number of log streams that you can create for a log +// group. There is a limit of 50 TPS on CreateLogStream operations, after which +// transactions are throttled. +// +// You must use the following guidelines when naming a log stream: +// +// - Log stream names must be unique within the log group. +// +// - Log stream names can be between 1 and 512 characters long. +// +// - Don't use ':' (colon) or '*' (asterisk) characters. +func (c *Client) CreateLogStream(ctx context.Context, params *CreateLogStreamInput, optFns ...func(*Options)) (*CreateLogStreamOutput, error) { + if params == nil { + params = &CreateLogStreamInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateLogStream", params, optFns, c.addOperationCreateLogStreamMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateLogStreamOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateLogStreamInput struct { + + // The name of the log group. + // + // This member is required. + LogGroupName *string + + // The name of the log stream. + // + // This member is required. + LogStreamName *string + + noSmithyDocumentSerde +} + +type CreateLogStreamOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateLogStreamMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateLogStream{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateLogStream{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateLogStream"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpCreateLogStreamValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateLogStream(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateLogStream(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateLogStream", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_CreateLookupTable.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_CreateLookupTable.go new file mode 100644 index 00000000000..9bfd1f17fd4 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_CreateLookupTable.go @@ -0,0 +1,184 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a lookup table by uploading CSV data. You can use lookup tables to +// enrich log data in CloudWatch Logs Insights queries with reference data such as +// user details, application names, or error descriptions. +// +// The table name must be unique within your account and Region. The CSV content +// must include a header row with column names, use UTF-8 encoding, and not exceed +// 10 MB. +func (c *Client) CreateLookupTable(ctx context.Context, params *CreateLookupTableInput, optFns ...func(*Options)) (*CreateLookupTableOutput, error) { + if params == nil { + params = &CreateLookupTableInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateLookupTable", params, optFns, c.addOperationCreateLookupTableMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateLookupTableOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateLookupTableInput struct { + + // The name of the lookup table. The name must be unique within your account and + // Region. The name can contain only alphanumeric characters and underscores, and + // can be up to 256 characters long. + // + // This member is required. + LookupTableName *string + + // The CSV content of the lookup table. The first row must be a header row with + // column names. The content must use UTF-8 encoding and not exceed 10 MB. + // + // This member is required. + TableBody *string + + // A description of the lookup table. The description can be up to 1024 characters + // long. + Description *string + + // The ARN of the KMS key to use to encrypt the lookup table data. If you don't + // specify a key, the data is encrypted with an Amazon Web Services-owned key. + KmsKeyId *string + + // A list of key-value pairs to associate with the lookup table. You can associate + // as many as 50 tags with a lookup table. Tags can help you organize and + // categorize your resources. + Tags map[string]string + + noSmithyDocumentSerde +} + +type CreateLookupTableOutput struct { + + // The time when the lookup table was created, expressed as the number of + // milliseconds after Jan 1, 1970 00:00:00 UTC . + CreatedAt *int64 + + // The ARN of the lookup table that was created. + LookupTableArn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateLookupTableMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateLookupTable{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateLookupTable{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateLookupTable"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpCreateLookupTableValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateLookupTable(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateLookupTable(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateLookupTable", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_CreateScheduledQuery.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_CreateScheduledQuery.go new file mode 100644 index 00000000000..e3a0e3fe459 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_CreateScheduledQuery.go @@ -0,0 +1,224 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a scheduled query that runs CloudWatch Logs Insights queries at regular +// intervals. Scheduled queries enable proactive monitoring by automatically +// executing queries to detect patterns and anomalies in your log data. Query +// results can be delivered to Amazon S3 for analysis or further processing. +func (c *Client) CreateScheduledQuery(ctx context.Context, params *CreateScheduledQueryInput, optFns ...func(*Options)) (*CreateScheduledQueryOutput, error) { + if params == nil { + params = &CreateScheduledQueryInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateScheduledQuery", params, optFns, c.addOperationCreateScheduledQueryMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateScheduledQueryOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateScheduledQueryInput struct { + + // The ARN of the IAM role that grants permissions to execute the query and + // deliver results to the specified destination. The role must have permissions to + // read from the specified log groups and write to the destination. + // + // This member is required. + ExecutionRoleArn *string + + // The name of the scheduled query. The name must be unique within your account + // and region. Valid characters are alphanumeric characters, hyphens, underscores, + // and periods. Length must be between 1 and 255 characters. + // + // This member is required. + Name *string + + // The query language to use for the scheduled query. Valid values are CWLI , PPL , + // and SQL . + // + // This member is required. + QueryLanguage types.QueryLanguage + + // The query string to execute. This is the same query syntax used in CloudWatch + // Logs Insights. Maximum length is 10,000 characters. + // + // This member is required. + QueryString *string + + // A cron expression that defines when the scheduled query runs. The expression + // uses standard cron syntax and supports minute-level precision. Maximum length is + // 256 characters. + // + // This member is required. + ScheduleExpression *string + + // An optional description for the scheduled query to help identify its purpose + // and functionality. + Description *string + + // Configuration for where to deliver query results. Currently supports Amazon S3 + // destinations for storing query output. + DestinationConfiguration *types.DestinationConfiguration + + // An array of log group names or ARNs to query. You can specify between 1 and 50 + // log groups. Log groups can be identified by name or full ARN. + LogGroupIdentifiers []string + + // The end time for the scheduled query in Unix epoch format. The query will stop + // executing after this time. + ScheduleEndTime *int64 + + // The start time for the scheduled query in Unix epoch format. The query will not + // execute before this time. + ScheduleStartTime *int64 + + // The time offset in seconds that defines the lookback period for the query. This + // determines how far back in time the query searches from the execution time. + StartTimeOffset *int64 + + // The initial state of the scheduled query. Valid values are ENABLED and DISABLED + // . Default is ENABLED . + State types.ScheduledQueryState + + // Key-value pairs to associate with the scheduled query for resource management + // and cost allocation. + Tags map[string]string + + // The timezone for evaluating the schedule expression. This determines when the + // scheduled query executes relative to the specified timezone. + Timezone *string + + noSmithyDocumentSerde +} + +type CreateScheduledQueryOutput struct { + + // The ARN of the created scheduled query. + ScheduledQueryArn *string + + // The current state of the scheduled query. + State types.ScheduledQueryState + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateScheduledQueryMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateScheduledQuery{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateScheduledQuery{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateScheduledQuery"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpCreateScheduledQueryValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateScheduledQuery(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateScheduledQuery(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateScheduledQuery", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteAccountPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteAccountPolicy.go new file mode 100644 index 00000000000..5425e4ded78 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteAccountPolicy.go @@ -0,0 +1,184 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a CloudWatch Logs account policy. This stops the account-wide policy +// from applying to log groups or data sources in the account. If you delete a data +// protection policy or subscription filter policy, any log-group level policies of +// those types remain in effect. This operation supports deletion of data +// source-based field index policies, including facet configurations, in addition +// to log group-based policies. +// +// To use this operation, you must be signed on with the correct permissions +// depending on the type of policy that you are deleting. +// +// - To delete a data protection policy, you must have the +// logs:DeleteDataProtectionPolicy and logs:DeleteAccountPolicy permissions. +// +// - To delete a subscription filter policy, you must have the +// logs:DeleteSubscriptionFilter and logs:DeleteAccountPolicy permissions. +// +// - To delete a transformer policy, you must have the logs:DeleteTransformer and +// logs:DeleteAccountPolicy permissions. +// +// - To delete a field index policy, you must have the logs:DeleteIndexPolicy and +// logs:DeleteAccountPolicy permissions. +// +// If you delete a field index policy that included facet configurations, those +// +// facets will no longer be available for interactive exploration in the CloudWatch +// Logs Insights console. However, facet data is retained for up to 30 days. +// +// If you delete a field index policy, the indexing of the log events that +// happened before you deleted the policy will still be used for up to 30 days to +// improve CloudWatch Logs Insights queries. +func (c *Client) DeleteAccountPolicy(ctx context.Context, params *DeleteAccountPolicyInput, optFns ...func(*Options)) (*DeleteAccountPolicyOutput, error) { + if params == nil { + params = &DeleteAccountPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteAccountPolicy", params, optFns, c.addOperationDeleteAccountPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteAccountPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteAccountPolicyInput struct { + + // The name of the policy to delete. + // + // This member is required. + PolicyName *string + + // The type of policy to delete. + // + // This member is required. + PolicyType types.PolicyType + + noSmithyDocumentSerde +} + +type DeleteAccountPolicyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteAccountPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteAccountPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteAccountPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteAccountPolicy"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeleteAccountPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteAccountPolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteAccountPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteAccountPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteDataProtectionPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteDataProtectionPolicy.go new file mode 100644 index 00000000000..0eea5896f5f --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteDataProtectionPolicy.go @@ -0,0 +1,154 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes the data protection policy from the specified log group. +// +// For more information about data protection policies, see [PutDataProtectionPolicy]. +// +// [PutDataProtectionPolicy]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDataProtectionPolicy.html +func (c *Client) DeleteDataProtectionPolicy(ctx context.Context, params *DeleteDataProtectionPolicyInput, optFns ...func(*Options)) (*DeleteDataProtectionPolicyOutput, error) { + if params == nil { + params = &DeleteDataProtectionPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteDataProtectionPolicy", params, optFns, c.addOperationDeleteDataProtectionPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteDataProtectionPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteDataProtectionPolicyInput struct { + + // The name or ARN of the log group that you want to delete the data protection + // policy for. + // + // This member is required. + LogGroupIdentifier *string + + noSmithyDocumentSerde +} + +type DeleteDataProtectionPolicyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteDataProtectionPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteDataProtectionPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteDataProtectionPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteDataProtectionPolicy"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeleteDataProtectionPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteDataProtectionPolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteDataProtectionPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteDataProtectionPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteDelivery.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteDelivery.go new file mode 100644 index 00000000000..ff4b862e322 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteDelivery.go @@ -0,0 +1,155 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a delivery. A delivery is a connection between a logical delivery +// source and a logical delivery destination. Deleting a delivery only deletes the +// connection between the delivery source and delivery destination. It does not +// delete the delivery destination or the delivery source. +func (c *Client) DeleteDelivery(ctx context.Context, params *DeleteDeliveryInput, optFns ...func(*Options)) (*DeleteDeliveryOutput, error) { + if params == nil { + params = &DeleteDeliveryInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteDelivery", params, optFns, c.addOperationDeleteDeliveryMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteDeliveryOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteDeliveryInput struct { + + // The unique ID of the delivery to delete. You can find the ID of a delivery with + // the [DescribeDeliveries]operation. + // + // [DescribeDeliveries]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeDeliveries.html + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +type DeleteDeliveryOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteDeliveryMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteDelivery{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteDelivery{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteDelivery"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeleteDeliveryValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteDelivery(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteDelivery(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteDelivery", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteDeliveryDestination.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteDeliveryDestination.go new file mode 100644 index 00000000000..c8ae1685680 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteDeliveryDestination.go @@ -0,0 +1,160 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a delivery destination. A delivery is a connection between a logical +// delivery source and a logical delivery destination. +// +// You can't delete a delivery destination if any current deliveries are +// associated with it. To find whether any deliveries are associated with this +// delivery destination, use the [DescribeDeliveries]operation and check the deliveryDestinationArn +// field in the results. +// +// [DescribeDeliveries]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeDeliveries.html +func (c *Client) DeleteDeliveryDestination(ctx context.Context, params *DeleteDeliveryDestinationInput, optFns ...func(*Options)) (*DeleteDeliveryDestinationOutput, error) { + if params == nil { + params = &DeleteDeliveryDestinationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteDeliveryDestination", params, optFns, c.addOperationDeleteDeliveryDestinationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteDeliveryDestinationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteDeliveryDestinationInput struct { + + // The name of the delivery destination that you want to delete. You can find a + // list of delivery destination names by using the [DescribeDeliveryDestinations]operation. + // + // [DescribeDeliveryDestinations]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeDeliveryDestinations.html + // + // This member is required. + Name *string + + noSmithyDocumentSerde +} + +type DeleteDeliveryDestinationOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteDeliveryDestinationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteDeliveryDestination{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteDeliveryDestination{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteDeliveryDestination"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeleteDeliveryDestinationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteDeliveryDestination(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteDeliveryDestination(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteDeliveryDestination", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteDeliveryDestinationPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteDeliveryDestinationPolicy.go new file mode 100644 index 00000000000..a2f883811e5 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteDeliveryDestinationPolicy.go @@ -0,0 +1,152 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a delivery destination policy. For more information about these +// policies, see [PutDeliveryDestinationPolicy]. +// +// [PutDeliveryDestinationPolicy]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestinationPolicy.html +func (c *Client) DeleteDeliveryDestinationPolicy(ctx context.Context, params *DeleteDeliveryDestinationPolicyInput, optFns ...func(*Options)) (*DeleteDeliveryDestinationPolicyOutput, error) { + if params == nil { + params = &DeleteDeliveryDestinationPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteDeliveryDestinationPolicy", params, optFns, c.addOperationDeleteDeliveryDestinationPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteDeliveryDestinationPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteDeliveryDestinationPolicyInput struct { + + // The name of the delivery destination that you want to delete the policy for. + // + // This member is required. + DeliveryDestinationName *string + + noSmithyDocumentSerde +} + +type DeleteDeliveryDestinationPolicyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteDeliveryDestinationPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteDeliveryDestinationPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteDeliveryDestinationPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteDeliveryDestinationPolicy"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeleteDeliveryDestinationPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteDeliveryDestinationPolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteDeliveryDestinationPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteDeliveryDestinationPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteDeliverySource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteDeliverySource.go new file mode 100644 index 00000000000..acb19633c86 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteDeliverySource.go @@ -0,0 +1,156 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a delivery source. A delivery is a connection between a logical +// delivery source and a logical delivery destination. +// +// You can't delete a delivery source if any current deliveries are associated +// with it. To find whether any deliveries are associated with this delivery +// source, use the [DescribeDeliveries]operation and check the deliverySourceName field in the results. +// +// [DescribeDeliveries]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeDeliveries.html +func (c *Client) DeleteDeliverySource(ctx context.Context, params *DeleteDeliverySourceInput, optFns ...func(*Options)) (*DeleteDeliverySourceOutput, error) { + if params == nil { + params = &DeleteDeliverySourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteDeliverySource", params, optFns, c.addOperationDeleteDeliverySourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteDeliverySourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteDeliverySourceInput struct { + + // The name of the delivery source that you want to delete. + // + // This member is required. + Name *string + + noSmithyDocumentSerde +} + +type DeleteDeliverySourceOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteDeliverySourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteDeliverySource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteDeliverySource{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteDeliverySource"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeleteDeliverySourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteDeliverySource(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteDeliverySource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteDeliverySource", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteDestination.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteDestination.go new file mode 100644 index 00000000000..72e24e1e27d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteDestination.go @@ -0,0 +1,151 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes the specified destination, and eventually disables all the subscription +// filters that publish to it. This operation does not delete the physical resource +// encapsulated by the destination. +func (c *Client) DeleteDestination(ctx context.Context, params *DeleteDestinationInput, optFns ...func(*Options)) (*DeleteDestinationOutput, error) { + if params == nil { + params = &DeleteDestinationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteDestination", params, optFns, c.addOperationDeleteDestinationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteDestinationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteDestinationInput struct { + + // The name of the destination. + // + // This member is required. + DestinationName *string + + noSmithyDocumentSerde +} + +type DeleteDestinationOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteDestinationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteDestination{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteDestination{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteDestination"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeleteDestinationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteDestination(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteDestination(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteDestination", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteIndexPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteIndexPolicy.go new file mode 100644 index 00000000000..f94feb32447 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteIndexPolicy.go @@ -0,0 +1,169 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a log-group level field index policy that was applied to a single log +// group. The indexing of the log events that happened before you delete the policy +// will still be used for as many as 30 days to improve CloudWatch Logs Insights +// queries. +// +// If the deleted policy included facet configurations, those facets will no +// longer be available for interactive exploration in the CloudWatch Logs Insights +// console for this log group. However, facet data is retained for up to 30 days. +// +// You can't use this operation to delete an account-level index policy. Instead, +// use [DeleteAccountPolicy]. +// +// If you delete a log-group level field index policy and there is an +// account-level field index policy, in a few minutes the log group begins using +// that account-wide policy to index new incoming log events. This operation only +// affects log group-level policies, including any facet configurations, and +// preserves any data source-based account policies that may apply to the log +// group. +// +// [DeleteAccountPolicy]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DeleteAccountPolicy.html +func (c *Client) DeleteIndexPolicy(ctx context.Context, params *DeleteIndexPolicyInput, optFns ...func(*Options)) (*DeleteIndexPolicyOutput, error) { + if params == nil { + params = &DeleteIndexPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteIndexPolicy", params, optFns, c.addOperationDeleteIndexPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteIndexPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteIndexPolicyInput struct { + + // The log group to delete the index policy for. You can specify either the name + // or the ARN of the log group. + // + // This member is required. + LogGroupIdentifier *string + + noSmithyDocumentSerde +} + +type DeleteIndexPolicyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteIndexPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteIndexPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteIndexPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteIndexPolicy"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeleteIndexPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteIndexPolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteIndexPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteIndexPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteIntegration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteIntegration.go new file mode 100644 index 00000000000..8568de07721 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteIntegration.go @@ -0,0 +1,163 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes the integration between CloudWatch Logs and OpenSearch Service. If your +// integration has active vended logs dashboards, you must specify true for the +// force parameter, otherwise the operation will fail. If you delete the +// integration by setting force to true , all your vended logs dashboards powered +// by OpenSearch Service will be deleted and the data that was on them will no +// longer be accessible. +func (c *Client) DeleteIntegration(ctx context.Context, params *DeleteIntegrationInput, optFns ...func(*Options)) (*DeleteIntegrationOutput, error) { + if params == nil { + params = &DeleteIntegrationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteIntegration", params, optFns, c.addOperationDeleteIntegrationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteIntegrationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteIntegrationInput struct { + + // The name of the integration to delete. To find the name of your integration, + // use [ListIntegrations]. + // + // [ListIntegrations]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_ListIntegrations.html + // + // This member is required. + IntegrationName *string + + // Specify true to force the deletion of the integration even if vended logs + // dashboards currently exist. + // + // The default is false . + Force bool + + noSmithyDocumentSerde +} + +type DeleteIntegrationOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteIntegrationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteIntegration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteIntegration{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteIntegration"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeleteIntegrationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteIntegration(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteIntegration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteIntegration", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteLogAnomalyDetector.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteLogAnomalyDetector.go new file mode 100644 index 00000000000..8d1013617da --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteLogAnomalyDetector.go @@ -0,0 +1,152 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes the specified CloudWatch Logs anomaly detector. +func (c *Client) DeleteLogAnomalyDetector(ctx context.Context, params *DeleteLogAnomalyDetectorInput, optFns ...func(*Options)) (*DeleteLogAnomalyDetectorOutput, error) { + if params == nil { + params = &DeleteLogAnomalyDetectorInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteLogAnomalyDetector", params, optFns, c.addOperationDeleteLogAnomalyDetectorMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteLogAnomalyDetectorOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteLogAnomalyDetectorInput struct { + + // The ARN of the anomaly detector to delete. You can find the ARNs of log anomaly + // detectors in your account by using the [ListLogAnomalyDetectors]operation. + // + // [ListLogAnomalyDetectors]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_ListLogAnomalyDetectors.html + // + // This member is required. + AnomalyDetectorArn *string + + noSmithyDocumentSerde +} + +type DeleteLogAnomalyDetectorOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteLogAnomalyDetectorMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteLogAnomalyDetector{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteLogAnomalyDetector{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteLogAnomalyDetector"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeleteLogAnomalyDetectorValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteLogAnomalyDetector(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteLogAnomalyDetector(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteLogAnomalyDetector", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteLogGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteLogGroup.go new file mode 100644 index 00000000000..b9201e6d253 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteLogGroup.go @@ -0,0 +1,150 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes the specified log group and permanently deletes all the archived log +// events associated with the log group. +func (c *Client) DeleteLogGroup(ctx context.Context, params *DeleteLogGroupInput, optFns ...func(*Options)) (*DeleteLogGroupOutput, error) { + if params == nil { + params = &DeleteLogGroupInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteLogGroup", params, optFns, c.addOperationDeleteLogGroupMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteLogGroupOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteLogGroupInput struct { + + // The name of the log group. + // + // This member is required. + LogGroupName *string + + noSmithyDocumentSerde +} + +type DeleteLogGroupOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteLogGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteLogGroup{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteLogGroup{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteLogGroup"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeleteLogGroupValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteLogGroup(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteLogGroup(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteLogGroup", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteLogStream.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteLogStream.go new file mode 100644 index 00000000000..365eee814a0 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteLogStream.go @@ -0,0 +1,155 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes the specified log stream and permanently deletes all the archived log +// events associated with the log stream. +func (c *Client) DeleteLogStream(ctx context.Context, params *DeleteLogStreamInput, optFns ...func(*Options)) (*DeleteLogStreamOutput, error) { + if params == nil { + params = &DeleteLogStreamInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteLogStream", params, optFns, c.addOperationDeleteLogStreamMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteLogStreamOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteLogStreamInput struct { + + // The name of the log group. + // + // This member is required. + LogGroupName *string + + // The name of the log stream. + // + // This member is required. + LogStreamName *string + + noSmithyDocumentSerde +} + +type DeleteLogStreamOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteLogStreamMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteLogStream{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteLogStream{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteLogStream"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeleteLogStreamValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteLogStream(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteLogStream(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteLogStream", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteLookupTable.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteLookupTable.go new file mode 100644 index 00000000000..98024f32edf --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteLookupTable.go @@ -0,0 +1,152 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a lookup table permanently. This operation cannot be undone. +// +// Queries that reference a deleted table will return an error. Before deleting a +// lookup table, review any saved queries or dashboards that may reference it. +func (c *Client) DeleteLookupTable(ctx context.Context, params *DeleteLookupTableInput, optFns ...func(*Options)) (*DeleteLookupTableOutput, error) { + if params == nil { + params = &DeleteLookupTableInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteLookupTable", params, optFns, c.addOperationDeleteLookupTableMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteLookupTableOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteLookupTableInput struct { + + // The ARN of the lookup table to delete. + // + // This member is required. + LookupTableArn *string + + noSmithyDocumentSerde +} + +type DeleteLookupTableOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteLookupTableMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteLookupTable{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteLookupTable{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteLookupTable"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeleteLookupTableValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteLookupTable(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteLookupTable(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteLookupTable", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteMetricFilter.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteMetricFilter.go new file mode 100644 index 00000000000..6fd1a90367e --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteMetricFilter.go @@ -0,0 +1,154 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes the specified metric filter. +func (c *Client) DeleteMetricFilter(ctx context.Context, params *DeleteMetricFilterInput, optFns ...func(*Options)) (*DeleteMetricFilterOutput, error) { + if params == nil { + params = &DeleteMetricFilterInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteMetricFilter", params, optFns, c.addOperationDeleteMetricFilterMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteMetricFilterOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteMetricFilterInput struct { + + // The name of the metric filter. + // + // This member is required. + FilterName *string + + // The name of the log group. + // + // This member is required. + LogGroupName *string + + noSmithyDocumentSerde +} + +type DeleteMetricFilterOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteMetricFilterMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteMetricFilter{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteMetricFilter{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteMetricFilter"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeleteMetricFilterValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteMetricFilter(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteMetricFilter(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteMetricFilter", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteQueryDefinition.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteQueryDefinition.go new file mode 100644 index 00000000000..6876c4608f8 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteQueryDefinition.go @@ -0,0 +1,163 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a saved CloudWatch Logs Insights query definition. A query definition +// contains details about a saved CloudWatch Logs Insights query. +// +// Each DeleteQueryDefinition operation can delete one query definition. +// +// You must have the logs:DeleteQueryDefinition permission to be able to perform +// this operation. +func (c *Client) DeleteQueryDefinition(ctx context.Context, params *DeleteQueryDefinitionInput, optFns ...func(*Options)) (*DeleteQueryDefinitionOutput, error) { + if params == nil { + params = &DeleteQueryDefinitionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteQueryDefinition", params, optFns, c.addOperationDeleteQueryDefinitionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteQueryDefinitionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteQueryDefinitionInput struct { + + // The ID of the query definition that you want to delete. You can use [DescribeQueryDefinitions] to + // retrieve the IDs of your saved query definitions. + // + // [DescribeQueryDefinitions]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeQueryDefinitions.html + // + // This member is required. + QueryDefinitionId *string + + noSmithyDocumentSerde +} + +type DeleteQueryDefinitionOutput struct { + + // A value of TRUE indicates that the operation succeeded. FALSE indicates that + // the operation failed. + Success bool + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteQueryDefinitionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteQueryDefinition{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteQueryDefinition{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteQueryDefinition"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeleteQueryDefinitionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteQueryDefinition(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteQueryDefinition(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteQueryDefinition", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteResourcePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteResourcePolicy.go new file mode 100644 index 00000000000..b99e52a2d94 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteResourcePolicy.go @@ -0,0 +1,153 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a resource policy from this account. This revokes the access of the +// identities in that policy to put log events to this account. +func (c *Client) DeleteResourcePolicy(ctx context.Context, params *DeleteResourcePolicyInput, optFns ...func(*Options)) (*DeleteResourcePolicyOutput, error) { + if params == nil { + params = &DeleteResourcePolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteResourcePolicy", params, optFns, c.addOperationDeleteResourcePolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteResourcePolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteResourcePolicyInput struct { + + // The expected revision ID of the resource policy. Required when deleting a + // resource-scoped policy to prevent concurrent modifications. + ExpectedRevisionId *string + + // The name of the policy to be revoked. This parameter is required. + PolicyName *string + + // The ARN of the CloudWatch Logs resource for which the resource policy needs to + // be deleted + ResourceArn *string + + noSmithyDocumentSerde +} + +type DeleteResourcePolicyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteResourcePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteResourcePolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteResourcePolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteResourcePolicy"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteResourcePolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteResourcePolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteResourcePolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteRetentionPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteRetentionPolicy.go new file mode 100644 index 00000000000..d241bda74d5 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteRetentionPolicy.go @@ -0,0 +1,152 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes the specified retention policy. +// +// Log events do not expire if they belong to log groups without a retention +// policy. +func (c *Client) DeleteRetentionPolicy(ctx context.Context, params *DeleteRetentionPolicyInput, optFns ...func(*Options)) (*DeleteRetentionPolicyOutput, error) { + if params == nil { + params = &DeleteRetentionPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteRetentionPolicy", params, optFns, c.addOperationDeleteRetentionPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteRetentionPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteRetentionPolicyInput struct { + + // The name of the log group. + // + // This member is required. + LogGroupName *string + + noSmithyDocumentSerde +} + +type DeleteRetentionPolicyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteRetentionPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteRetentionPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteRetentionPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteRetentionPolicy"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeleteRetentionPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteRetentionPolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteRetentionPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteRetentionPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteScheduledQuery.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteScheduledQuery.go new file mode 100644 index 00000000000..29ca4673a10 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteScheduledQuery.go @@ -0,0 +1,150 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a scheduled query and stops all future executions. This operation also +// removes any configured actions and associated resources. +func (c *Client) DeleteScheduledQuery(ctx context.Context, params *DeleteScheduledQueryInput, optFns ...func(*Options)) (*DeleteScheduledQueryOutput, error) { + if params == nil { + params = &DeleteScheduledQueryInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteScheduledQuery", params, optFns, c.addOperationDeleteScheduledQueryMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteScheduledQueryOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteScheduledQueryInput struct { + + // The ARN or name of the scheduled query to delete. + // + // This member is required. + Identifier *string + + noSmithyDocumentSerde +} + +type DeleteScheduledQueryOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteScheduledQueryMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteScheduledQuery{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteScheduledQuery{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteScheduledQuery"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeleteScheduledQueryValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteScheduledQuery(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteScheduledQuery(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteScheduledQuery", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteSubscriptionFilter.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteSubscriptionFilter.go new file mode 100644 index 00000000000..f9b6bb28d47 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteSubscriptionFilter.go @@ -0,0 +1,154 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes the specified subscription filter. +func (c *Client) DeleteSubscriptionFilter(ctx context.Context, params *DeleteSubscriptionFilterInput, optFns ...func(*Options)) (*DeleteSubscriptionFilterOutput, error) { + if params == nil { + params = &DeleteSubscriptionFilterInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteSubscriptionFilter", params, optFns, c.addOperationDeleteSubscriptionFilterMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteSubscriptionFilterOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteSubscriptionFilterInput struct { + + // The name of the subscription filter. + // + // This member is required. + FilterName *string + + // The name of the log group. + // + // This member is required. + LogGroupName *string + + noSmithyDocumentSerde +} + +type DeleteSubscriptionFilterOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteSubscriptionFilterMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteSubscriptionFilter{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteSubscriptionFilter{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteSubscriptionFilter"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeleteSubscriptionFilterValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteSubscriptionFilter(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteSubscriptionFilter(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteSubscriptionFilter", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteTransformer.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteTransformer.go new file mode 100644 index 00000000000..cf1912b8430 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DeleteTransformer.go @@ -0,0 +1,158 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes the log transformer for the specified log group. As soon as you do +// this, the transformation of incoming log events according to that transformer +// stops. If this account has an account-level transformer that applies to this log +// group, the log group begins using that account-level transformer when this +// log-group level transformer is deleted. +// +// After you delete a transformer, be sure to edit any metric filters or +// subscription filters that relied on the transformed versions of the log events. +func (c *Client) DeleteTransformer(ctx context.Context, params *DeleteTransformerInput, optFns ...func(*Options)) (*DeleteTransformerOutput, error) { + if params == nil { + params = &DeleteTransformerInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteTransformer", params, optFns, c.addOperationDeleteTransformerMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteTransformerOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteTransformerInput struct { + + // Specify either the name or ARN of the log group to delete the transformer for. + // If the log group is in a source account and you are using a monitoring account, + // you must use the log group ARN. + // + // This member is required. + LogGroupIdentifier *string + + noSmithyDocumentSerde +} + +type DeleteTransformerOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteTransformerMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteTransformer{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteTransformer{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteTransformer"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeleteTransformerValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteTransformer(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteTransformer(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteTransformer", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeAccountPolicies.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeAccountPolicies.go new file mode 100644 index 00000000000..db184fd7433 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeAccountPolicies.go @@ -0,0 +1,192 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a list of all CloudWatch Logs account policies in the account. +// +// To use this operation, you must be signed on with the correct permissions +// depending on the type of policy that you are retrieving information for. +// +// - To see data protection policies, you must have the +// logs:GetDataProtectionPolicy and logs:DescribeAccountPolicies permissions. +// +// - To see subscription filter policies, you must have the +// logs:DescribeSubscriptionFilters and logs:DescribeAccountPolicies permissions. +// +// - To see transformer policies, you must have the logs:GetTransformer and +// logs:DescribeAccountPolicies permissions. +// +// - To see field index policies, you must have the logs:DescribeIndexPolicies +// and logs:DescribeAccountPolicies permissions. +func (c *Client) DescribeAccountPolicies(ctx context.Context, params *DescribeAccountPoliciesInput, optFns ...func(*Options)) (*DescribeAccountPoliciesOutput, error) { + if params == nil { + params = &DescribeAccountPoliciesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeAccountPolicies", params, optFns, c.addOperationDescribeAccountPoliciesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeAccountPoliciesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeAccountPoliciesInput struct { + + // Use this parameter to limit the returned policies to only the policies that + // match the policy type that you specify. + // + // This member is required. + PolicyType types.PolicyType + + // If you are using an account that is set up as a monitoring account for + // CloudWatch unified cross-account observability, you can use this to specify the + // account ID of a source account. If you do, the operation returns the account + // policy for the specified account. Currently, you can specify only one account ID + // in this parameter. + // + // If you omit this parameter, only the policy in the current account is returned. + AccountIdentifiers []string + + // The token for the next set of items to return. (You received this token from a + // previous call.) + NextToken *string + + // Use this parameter to limit the returned policies to only the policy with the + // name that you specify. + PolicyName *string + + noSmithyDocumentSerde +} + +type DescribeAccountPoliciesOutput struct { + + // An array of structures that contain information about the CloudWatch Logs + // account policies that match the specified filters. + AccountPolicies []types.AccountPolicy + + // The token to use when requesting the next set of items. The token expires after + // 24 hours. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeAccountPoliciesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeAccountPolicies{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeAccountPolicies{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeAccountPolicies"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDescribeAccountPoliciesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAccountPolicies(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDescribeAccountPolicies(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeAccountPolicies", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeConfigurationTemplates.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeConfigurationTemplates.go new file mode 100644 index 00000000000..015965ca8e7 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeConfigurationTemplates.go @@ -0,0 +1,274 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Use this operation to return the valid and default values that are used when +// creating delivery sources, delivery destinations, and deliveries. For more +// information about deliveries, see [CreateDelivery]. +// +// [CreateDelivery]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CreateDelivery.html +func (c *Client) DescribeConfigurationTemplates(ctx context.Context, params *DescribeConfigurationTemplatesInput, optFns ...func(*Options)) (*DescribeConfigurationTemplatesOutput, error) { + if params == nil { + params = &DescribeConfigurationTemplatesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeConfigurationTemplates", params, optFns, c.addOperationDescribeConfigurationTemplatesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeConfigurationTemplatesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeConfigurationTemplatesInput struct { + + // Use this parameter to filter the response to include only the configuration + // templates that apply to the delivery destination types that you specify here. + DeliveryDestinationTypes []types.DeliveryDestinationType + + // Use this parameter to limit the number of configuration templates that are + // returned in the response. + Limit *int32 + + // Use this parameter to filter the response to include only the configuration + // templates that apply to the log types that you specify here. + LogTypes []string + + // The token for the next set of items to return. The token expires after 24 hours. + NextToken *string + + // Use this parameter to filter the response to include only the configuration + // templates that apply to the resource types that you specify here. + ResourceTypes []string + + // Use this parameter to filter the response to include only the configuration + // templates that apply to the Amazon Web Services service that you specify here. + Service *string + + noSmithyDocumentSerde +} + +type DescribeConfigurationTemplatesOutput struct { + + // An array of objects, where each object describes one configuration template + // that matches the filters that you specified in the request. + ConfigurationTemplates []types.ConfigurationTemplate + + // The token for the next set of items to return. The token expires after 24 hours. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeConfigurationTemplatesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeConfigurationTemplates{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeConfigurationTemplates{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeConfigurationTemplates"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeConfigurationTemplates(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// DescribeConfigurationTemplatesPaginatorOptions is the paginator options for +// DescribeConfigurationTemplates +type DescribeConfigurationTemplatesPaginatorOptions struct { + // Use this parameter to limit the number of configuration templates that are + // returned in the response. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeConfigurationTemplatesPaginator is a paginator for +// DescribeConfigurationTemplates +type DescribeConfigurationTemplatesPaginator struct { + options DescribeConfigurationTemplatesPaginatorOptions + client DescribeConfigurationTemplatesAPIClient + params *DescribeConfigurationTemplatesInput + nextToken *string + firstPage bool +} + +// NewDescribeConfigurationTemplatesPaginator returns a new +// DescribeConfigurationTemplatesPaginator +func NewDescribeConfigurationTemplatesPaginator(client DescribeConfigurationTemplatesAPIClient, params *DescribeConfigurationTemplatesInput, optFns ...func(*DescribeConfigurationTemplatesPaginatorOptions)) *DescribeConfigurationTemplatesPaginator { + if params == nil { + params = &DescribeConfigurationTemplatesInput{} + } + + options := DescribeConfigurationTemplatesPaginatorOptions{} + if params.Limit != nil { + options.Limit = *params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeConfigurationTemplatesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeConfigurationTemplatesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeConfigurationTemplates page. +func (p *DescribeConfigurationTemplatesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeConfigurationTemplatesOutput, 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.Limit = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeConfigurationTemplates(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 +} + +// DescribeConfigurationTemplatesAPIClient is a client that implements the +// DescribeConfigurationTemplates operation. +type DescribeConfigurationTemplatesAPIClient interface { + DescribeConfigurationTemplates(context.Context, *DescribeConfigurationTemplatesInput, ...func(*Options)) (*DescribeConfigurationTemplatesOutput, error) +} + +var _ DescribeConfigurationTemplatesAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opDescribeConfigurationTemplates(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeConfigurationTemplates", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeDeliveries.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeDeliveries.go new file mode 100644 index 00000000000..8111c6830a1 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeDeliveries.go @@ -0,0 +1,261 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves a list of the deliveries that have been created in the account. +// +// A delivery is a connection between a [delivery source] and a [delivery destination]. +// +// A delivery source represents an Amazon Web Services resource that sends logs to +// an logs delivery destination. The destination can be CloudWatch Logs, Amazon S3, +// Firehose or X-Ray. Only some Amazon Web Services services support being +// configured as a delivery source. These services are listed in [Enable logging from Amazon Web Services services.] +// +// [delivery destination]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestination.html +// [delivery source]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliverySource.html +// [Enable logging from Amazon Web Services services.]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AWS-logs-and-resource-policy.html +func (c *Client) DescribeDeliveries(ctx context.Context, params *DescribeDeliveriesInput, optFns ...func(*Options)) (*DescribeDeliveriesOutput, error) { + if params == nil { + params = &DescribeDeliveriesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeDeliveries", params, optFns, c.addOperationDescribeDeliveriesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeDeliveriesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeDeliveriesInput struct { + + // Optionally specify the maximum number of deliveries to return in the response. + Limit *int32 + + // The token for the next set of items to return. The token expires after 24 hours. + NextToken *string + + noSmithyDocumentSerde +} + +type DescribeDeliveriesOutput struct { + + // An array of structures. Each structure contains information about one delivery + // in the account. + Deliveries []types.Delivery + + // The token for the next set of items to return. The token expires after 24 hours. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeDeliveriesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeDeliveries{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeDeliveries{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeDeliveries"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDeliveries(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// DescribeDeliveriesPaginatorOptions is the paginator options for +// DescribeDeliveries +type DescribeDeliveriesPaginatorOptions struct { + // Optionally specify the maximum number of deliveries to return in the response. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeDeliveriesPaginator is a paginator for DescribeDeliveries +type DescribeDeliveriesPaginator struct { + options DescribeDeliveriesPaginatorOptions + client DescribeDeliveriesAPIClient + params *DescribeDeliveriesInput + nextToken *string + firstPage bool +} + +// NewDescribeDeliveriesPaginator returns a new DescribeDeliveriesPaginator +func NewDescribeDeliveriesPaginator(client DescribeDeliveriesAPIClient, params *DescribeDeliveriesInput, optFns ...func(*DescribeDeliveriesPaginatorOptions)) *DescribeDeliveriesPaginator { + if params == nil { + params = &DescribeDeliveriesInput{} + } + + options := DescribeDeliveriesPaginatorOptions{} + if params.Limit != nil { + options.Limit = *params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeDeliveriesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeDeliveriesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeDeliveries page. +func (p *DescribeDeliveriesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeDeliveriesOutput, 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.Limit = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeDeliveries(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 +} + +// DescribeDeliveriesAPIClient is a client that implements the DescribeDeliveries +// operation. +type DescribeDeliveriesAPIClient interface { + DescribeDeliveries(context.Context, *DescribeDeliveriesInput, ...func(*Options)) (*DescribeDeliveriesOutput, error) +} + +var _ DescribeDeliveriesAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opDescribeDeliveries(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeDeliveries", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeDeliveryDestinations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeDeliveryDestinations.go new file mode 100644 index 00000000000..bd78f42a8fb --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeDeliveryDestinations.go @@ -0,0 +1,255 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves a list of the delivery destinations that have been created in the +// account. +func (c *Client) DescribeDeliveryDestinations(ctx context.Context, params *DescribeDeliveryDestinationsInput, optFns ...func(*Options)) (*DescribeDeliveryDestinationsOutput, error) { + if params == nil { + params = &DescribeDeliveryDestinationsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeDeliveryDestinations", params, optFns, c.addOperationDescribeDeliveryDestinationsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeDeliveryDestinationsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeDeliveryDestinationsInput struct { + + // Optionally specify the maximum number of delivery destinations to return in the + // response. + Limit *int32 + + // The token for the next set of items to return. The token expires after 24 hours. + NextToken *string + + noSmithyDocumentSerde +} + +type DescribeDeliveryDestinationsOutput struct { + + // An array of structures. Each structure contains information about one delivery + // destination in the account. + DeliveryDestinations []types.DeliveryDestination + + // The token for the next set of items to return. The token expires after 24 hours. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeDeliveryDestinationsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeDeliveryDestinations{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeDeliveryDestinations{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeDeliveryDestinations"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDeliveryDestinations(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// DescribeDeliveryDestinationsPaginatorOptions is the paginator options for +// DescribeDeliveryDestinations +type DescribeDeliveryDestinationsPaginatorOptions struct { + // Optionally specify the maximum number of delivery destinations to return in the + // response. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeDeliveryDestinationsPaginator is a paginator for +// DescribeDeliveryDestinations +type DescribeDeliveryDestinationsPaginator struct { + options DescribeDeliveryDestinationsPaginatorOptions + client DescribeDeliveryDestinationsAPIClient + params *DescribeDeliveryDestinationsInput + nextToken *string + firstPage bool +} + +// NewDescribeDeliveryDestinationsPaginator returns a new +// DescribeDeliveryDestinationsPaginator +func NewDescribeDeliveryDestinationsPaginator(client DescribeDeliveryDestinationsAPIClient, params *DescribeDeliveryDestinationsInput, optFns ...func(*DescribeDeliveryDestinationsPaginatorOptions)) *DescribeDeliveryDestinationsPaginator { + if params == nil { + params = &DescribeDeliveryDestinationsInput{} + } + + options := DescribeDeliveryDestinationsPaginatorOptions{} + if params.Limit != nil { + options.Limit = *params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeDeliveryDestinationsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeDeliveryDestinationsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeDeliveryDestinations page. +func (p *DescribeDeliveryDestinationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeDeliveryDestinationsOutput, 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.Limit = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeDeliveryDestinations(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 +} + +// DescribeDeliveryDestinationsAPIClient is a client that implements the +// DescribeDeliveryDestinations operation. +type DescribeDeliveryDestinationsAPIClient interface { + DescribeDeliveryDestinations(context.Context, *DescribeDeliveryDestinationsInput, ...func(*Options)) (*DescribeDeliveryDestinationsOutput, error) +} + +var _ DescribeDeliveryDestinationsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opDescribeDeliveryDestinations(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeDeliveryDestinations", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeDeliverySources.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeDeliverySources.go new file mode 100644 index 00000000000..6ae69794029 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeDeliverySources.go @@ -0,0 +1,253 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves a list of the delivery sources that have been created in the account. +func (c *Client) DescribeDeliverySources(ctx context.Context, params *DescribeDeliverySourcesInput, optFns ...func(*Options)) (*DescribeDeliverySourcesOutput, error) { + if params == nil { + params = &DescribeDeliverySourcesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeDeliverySources", params, optFns, c.addOperationDescribeDeliverySourcesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeDeliverySourcesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeDeliverySourcesInput struct { + + // Optionally specify the maximum number of delivery sources to return in the + // response. + Limit *int32 + + // The token for the next set of items to return. The token expires after 24 hours. + NextToken *string + + noSmithyDocumentSerde +} + +type DescribeDeliverySourcesOutput struct { + + // An array of structures. Each structure contains information about one delivery + // source in the account. + DeliverySources []types.DeliverySource + + // The token for the next set of items to return. The token expires after 24 hours. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeDeliverySourcesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeDeliverySources{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeDeliverySources{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeDeliverySources"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDeliverySources(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// DescribeDeliverySourcesPaginatorOptions is the paginator options for +// DescribeDeliverySources +type DescribeDeliverySourcesPaginatorOptions struct { + // Optionally specify the maximum number of delivery sources to return in the + // response. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeDeliverySourcesPaginator is a paginator for DescribeDeliverySources +type DescribeDeliverySourcesPaginator struct { + options DescribeDeliverySourcesPaginatorOptions + client DescribeDeliverySourcesAPIClient + params *DescribeDeliverySourcesInput + nextToken *string + firstPage bool +} + +// NewDescribeDeliverySourcesPaginator returns a new +// DescribeDeliverySourcesPaginator +func NewDescribeDeliverySourcesPaginator(client DescribeDeliverySourcesAPIClient, params *DescribeDeliverySourcesInput, optFns ...func(*DescribeDeliverySourcesPaginatorOptions)) *DescribeDeliverySourcesPaginator { + if params == nil { + params = &DescribeDeliverySourcesInput{} + } + + options := DescribeDeliverySourcesPaginatorOptions{} + if params.Limit != nil { + options.Limit = *params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeDeliverySourcesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeDeliverySourcesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeDeliverySources page. +func (p *DescribeDeliverySourcesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeDeliverySourcesOutput, 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.Limit = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeDeliverySources(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 +} + +// DescribeDeliverySourcesAPIClient is a client that implements the +// DescribeDeliverySources operation. +type DescribeDeliverySourcesAPIClient interface { + DescribeDeliverySources(context.Context, *DescribeDeliverySourcesInput, ...func(*Options)) (*DescribeDeliverySourcesOutput, error) +} + +var _ DescribeDeliverySourcesAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opDescribeDeliverySources(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeDeliverySources", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeDestinations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeDestinations.go new file mode 100644 index 00000000000..c22de80a2cc --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeDestinations.go @@ -0,0 +1,255 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists all your destinations. The results are ASCII-sorted by destination name. +func (c *Client) DescribeDestinations(ctx context.Context, params *DescribeDestinationsInput, optFns ...func(*Options)) (*DescribeDestinationsOutput, error) { + if params == nil { + params = &DescribeDestinationsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeDestinations", params, optFns, c.addOperationDescribeDestinationsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeDestinationsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeDestinationsInput struct { + + // The prefix to match. If you don't specify a value, no prefix filter is applied. + DestinationNamePrefix *string + + // The maximum number of items returned. If you don't specify a value, the default + // maximum value of 50 items is used. + Limit *int32 + + // The token for the next set of items to return. (You received this token from a + // previous call.) + NextToken *string + + noSmithyDocumentSerde +} + +type DescribeDestinationsOutput struct { + + // The destinations. + Destinations []types.Destination + + // The token for the next set of items to return. The token expires after 24 hours. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeDestinationsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeDestinations{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeDestinations{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeDestinations"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDestinations(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// DescribeDestinationsPaginatorOptions is the paginator options for +// DescribeDestinations +type DescribeDestinationsPaginatorOptions struct { + // The maximum number of items returned. If you don't specify a value, the default + // maximum value of 50 items is used. + 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 +} + +// DescribeDestinationsPaginator is a paginator for DescribeDestinations +type DescribeDestinationsPaginator struct { + options DescribeDestinationsPaginatorOptions + client DescribeDestinationsAPIClient + params *DescribeDestinationsInput + nextToken *string + firstPage bool +} + +// NewDescribeDestinationsPaginator returns a new DescribeDestinationsPaginator +func NewDescribeDestinationsPaginator(client DescribeDestinationsAPIClient, params *DescribeDestinationsInput, optFns ...func(*DescribeDestinationsPaginatorOptions)) *DescribeDestinationsPaginator { + if params == nil { + params = &DescribeDestinationsInput{} + } + + options := DescribeDestinationsPaginatorOptions{} + if params.Limit != nil { + options.Limit = *params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeDestinationsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeDestinationsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeDestinations page. +func (p *DescribeDestinationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeDestinationsOutput, 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.Limit = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeDestinations(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 +} + +// DescribeDestinationsAPIClient is a client that implements the +// DescribeDestinations operation. +type DescribeDestinationsAPIClient interface { + DescribeDestinations(context.Context, *DescribeDestinationsInput, ...func(*Options)) (*DescribeDestinationsOutput, error) +} + +var _ DescribeDestinationsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opDescribeDestinations(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeDestinations", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeExportTasks.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeExportTasks.go new file mode 100644 index 00000000000..66a1cfb9df2 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeExportTasks.go @@ -0,0 +1,166 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the specified export tasks. You can list all your export tasks or filter +// the results based on task ID or task status. +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 maximum number of items returned. If you don't specify a value, the default + // is up to 50 items. + Limit *int32 + + // The token for the next set of items to return. (You received this token from a + // previous call.) + NextToken *string + + // The status code of the export task. Specifying a status code filters the + // results to zero or more export tasks. + StatusCode types.ExportTaskStatusCode + + // The ID of the export task. Specifying a task ID filters the results to one or + // zero export tasks. + TaskId *string + + noSmithyDocumentSerde +} + +type DescribeExportTasksOutput struct { + + // The export tasks. + ExportTasks []types.ExportTask + + // The token for the next set of items to return. The token expires after 24 hours. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeExportTasksMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeExportTasks{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeExportTasks{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeExportTasks"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeExportTasks(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDescribeExportTasks(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeExportTasks", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeFieldIndexes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeFieldIndexes.go new file mode 100644 index 00000000000..2ed1f8c2da7 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeFieldIndexes.go @@ -0,0 +1,164 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a list of custom and default field indexes which are discovered in log +// data. For more information about field index policies, see [PutIndexPolicy]. +// +// [PutIndexPolicy]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutIndexPolicy.html +func (c *Client) DescribeFieldIndexes(ctx context.Context, params *DescribeFieldIndexesInput, optFns ...func(*Options)) (*DescribeFieldIndexesOutput, error) { + if params == nil { + params = &DescribeFieldIndexesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeFieldIndexes", params, optFns, c.addOperationDescribeFieldIndexesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeFieldIndexesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeFieldIndexesInput struct { + + // An array containing the names or ARNs of the log groups that you want to + // retrieve field indexes for. + // + // This member is required. + LogGroupIdentifiers []string + + // The token for the next set of items to return. The token expires after 24 hours. + NextToken *string + + noSmithyDocumentSerde +} + +type DescribeFieldIndexesOutput struct { + + // An array containing the field index information. + FieldIndexes []types.FieldIndex + + // The token for the next set of items to return. The token expires after 24 hours. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeFieldIndexesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeFieldIndexes{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeFieldIndexes{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeFieldIndexes"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDescribeFieldIndexesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeFieldIndexes(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDescribeFieldIndexes(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeFieldIndexes", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeImportTaskBatches.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeImportTaskBatches.go new file mode 100644 index 00000000000..9dba40fedd9 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeImportTaskBatches.go @@ -0,0 +1,176 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets detailed information about the individual batches within an import task, +// including their status and any error messages. For CloudTrail Event Data Store +// sources, a batch refers to a subset of stored events grouped by their eventTime. +func (c *Client) DescribeImportTaskBatches(ctx context.Context, params *DescribeImportTaskBatchesInput, optFns ...func(*Options)) (*DescribeImportTaskBatchesOutput, error) { + if params == nil { + params = &DescribeImportTaskBatchesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeImportTaskBatches", params, optFns, c.addOperationDescribeImportTaskBatchesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeImportTaskBatchesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeImportTaskBatchesInput struct { + + // The ID of the import task to get batch information for. + // + // This member is required. + ImportId *string + + // Optional filter to list import batches by their status. Accepts multiple status + // values: IN_PROGRESS, CANCELLED, COMPLETED and FAILED. + BatchImportStatus []types.ImportStatus + + // The maximum number of import batches to return in the response. Default: 10 + Limit *int32 + + // The pagination token for the next set of results. + NextToken *string + + noSmithyDocumentSerde +} + +type DescribeImportTaskBatchesOutput struct { + + // The list of import batches that match the request filters. + ImportBatches []types.ImportBatch + + // The ID of the import task. + ImportId *string + + // The ARN of the source being imported from. + ImportSourceArn *string + + // The token to use when requesting the next set of results. Not present if there + // are no additional results to retrieve. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeImportTaskBatchesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeImportTaskBatches{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeImportTaskBatches{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeImportTaskBatches"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDescribeImportTaskBatchesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeImportTaskBatches(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDescribeImportTaskBatches(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeImportTaskBatches", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeImportTasks.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeImportTasks.go new file mode 100644 index 00000000000..7479f5c4e81 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeImportTasks.go @@ -0,0 +1,167 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists and describes import tasks, with optional filtering by import status and +// source ARN. +func (c *Client) DescribeImportTasks(ctx context.Context, params *DescribeImportTasksInput, optFns ...func(*Options)) (*DescribeImportTasksOutput, error) { + if params == nil { + params = &DescribeImportTasksInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeImportTasks", params, optFns, c.addOperationDescribeImportTasksMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeImportTasksOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeImportTasksInput struct { + + // Optional filter to describe a specific import task by its ID. + ImportId *string + + // Optional filter to list imports from a specific source + ImportSourceArn *string + + // Optional filter to list imports by their status. Valid values are IN_PROGRESS, + // CANCELLED, COMPLETED and FAILED. + ImportStatus types.ImportStatus + + // The maximum number of import tasks to return in the response. Default: 50 + Limit *int32 + + // The pagination token for the next set of results. + NextToken *string + + noSmithyDocumentSerde +} + +type DescribeImportTasksOutput struct { + + // The list of import tasks that match the request filters. + Imports []types.Import + + // The token to use when requesting the next set of results. Not present if there + // are no additional results to retrieve. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeImportTasksMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeImportTasks{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeImportTasks{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeImportTasks"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeImportTasks(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDescribeImportTasks(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeImportTasks", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeIndexPolicies.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeIndexPolicies.go new file mode 100644 index 00000000000..5eac3b496e6 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeIndexPolicies.go @@ -0,0 +1,174 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns the field index policies of the specified log group. For more +// information about field index policies, see [PutIndexPolicy]. +// +// If a specified log group has a log-group level index policy, that policy is +// returned by this operation. +// +// If a specified log group doesn't have a log-group level index policy, but an +// account-wide index policy applies to it, that account-wide policy is returned by +// this operation. +// +// To find information about only account-level policies, use [DescribeAccountPolicies] instead. +// +// [PutIndexPolicy]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutIndexPolicy.html +// [DescribeAccountPolicies]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeAccountPolicies.html +func (c *Client) DescribeIndexPolicies(ctx context.Context, params *DescribeIndexPoliciesInput, optFns ...func(*Options)) (*DescribeIndexPoliciesOutput, error) { + if params == nil { + params = &DescribeIndexPoliciesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeIndexPolicies", params, optFns, c.addOperationDescribeIndexPoliciesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeIndexPoliciesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeIndexPoliciesInput struct { + + // An array containing the name or ARN of the log group that you want to retrieve + // field index policies for. + // + // This member is required. + LogGroupIdentifiers []string + + // The token for the next set of items to return. The token expires after 24 hours. + NextToken *string + + noSmithyDocumentSerde +} + +type DescribeIndexPoliciesOutput struct { + + // An array containing the field index policies. + IndexPolicies []types.IndexPolicy + + // The token for the next set of items to return. The token expires after 24 hours. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeIndexPoliciesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeIndexPolicies{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeIndexPolicies{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeIndexPolicies"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDescribeIndexPoliciesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeIndexPolicies(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDescribeIndexPolicies(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeIndexPolicies", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeLogGroups.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeLogGroups.go new file mode 100644 index 00000000000..b81dc3ca179 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeLogGroups.go @@ -0,0 +1,333 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns information about log groups, including data sources that ingest into +// each log group. You can return all your log groups or filter the results by +// prefix. The results are ASCII-sorted by log group name. +// +// CloudWatch Logs doesn't support IAM policies that control access to the +// DescribeLogGroups action by using the aws:ResourceTag/key-name condition key. +// Other CloudWatch Logs actions do support the use of the +// aws:ResourceTag/key-name condition key to control access. For more information +// about using tags to control access, see [Controlling access to Amazon Web Services resources using tags]. +// +// If you are using CloudWatch cross-account observability, you can use this +// operation in a monitoring account and view data from the linked source accounts. +// For more information, see [CloudWatch cross-account observability]. +// +// [CloudWatch cross-account observability]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html +// [Controlling access to Amazon Web Services resources using tags]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html +func (c *Client) DescribeLogGroups(ctx context.Context, params *DescribeLogGroupsInput, optFns ...func(*Options)) (*DescribeLogGroupsOutput, error) { + if params == nil { + params = &DescribeLogGroupsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeLogGroups", params, optFns, c.addOperationDescribeLogGroupsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeLogGroupsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeLogGroupsInput struct { + + // When includeLinkedAccounts is set to true , use this parameter to specify the + // list of accounts to search. You can specify as many as 20 account IDs in the + // array. + AccountIdentifiers []string + + // If you are using a monitoring account, set this to true to have the operation + // return log groups in the accounts listed in accountIdentifiers . + // + // If this parameter is set to true and accountIdentifiers contains a null value, + // the operation returns all log groups in the monitoring account and all log + // groups in all source accounts that are linked to the monitoring account. + // + // The default for this parameter is false . + IncludeLinkedAccounts *bool + + // The maximum number of items returned. If you don't specify a value, the default + // is up to 50 items. + Limit *int32 + + // Use this parameter to limit the results to only those log groups in the + // specified log group class. If you omit this parameter, log groups of all classes + // can be returned. + // + // Specifies the log group class for this log group. There are three classes: + // + // - The Standard log class supports all CloudWatch Logs features. + // + // - The Infrequent Access log class supports a subset of CloudWatch Logs + // features and incurs lower costs. + // + // - Use the Delivery log class only for delivering Lambda logs to store in + // Amazon S3 or Amazon Data Firehose. Log events in log groups in the Delivery + // class are kept in CloudWatch Logs for only one day. This log class doesn't offer + // rich CloudWatch Logs capabilities such as CloudWatch Logs Insights queries. + // + // For details about the features supported by each class, see [Log classes] + // + // [Log classes]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch_Logs_Log_Classes.html + LogGroupClass types.LogGroupClass + + // Use this array to filter the list of log groups returned. If you specify this + // parameter, the only other filter that you can choose to specify is + // includeLinkedAccounts . + // + // If you are using this operation in a monitoring account, you can specify the + // ARNs of log groups in source accounts and in the monitoring account itself. If + // you are using this operation in an account that is not a cross-account + // monitoring account, you can specify only log group names in the same account as + // the operation. + LogGroupIdentifiers []string + + // If you specify a string for this parameter, the operation returns only log + // groups that have names that match the string based on a case-sensitive substring + // search. For example, if you specify DataLogs , log groups named DataLogs , + // aws/DataLogs , and GroupDataLogs would match, but datalogs , Data/log/s and + // Groupdata would not match. + // + // If you specify logGroupNamePattern in your request, then only arn , creationTime + // , and logGroupName are included in the response. + // + // logGroupNamePattern and logGroupNamePrefix are mutually exclusive. Only one of + // these parameters can be passed. + LogGroupNamePattern *string + + // The prefix to match. + // + // logGroupNamePrefix and logGroupNamePattern are mutually exclusive. Only one of + // these parameters can be passed. + LogGroupNamePrefix *string + + // The token for the next set of items to return. (You received this token from a + // previous call.) + NextToken *string + + noSmithyDocumentSerde +} + +type DescribeLogGroupsOutput struct { + + // An array of structures, where each structure contains the information about one + // log group. + LogGroups []types.LogGroup + + // The token for the next set of items to return. The token expires after 24 hours. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeLogGroupsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeLogGroups{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeLogGroups{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeLogGroups"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeLogGroups(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// DescribeLogGroupsPaginatorOptions is the paginator options for DescribeLogGroups +type DescribeLogGroupsPaginatorOptions struct { + // The maximum number of items returned. If you don't specify a value, the default + // is up to 50 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 +} + +// DescribeLogGroupsPaginator is a paginator for DescribeLogGroups +type DescribeLogGroupsPaginator struct { + options DescribeLogGroupsPaginatorOptions + client DescribeLogGroupsAPIClient + params *DescribeLogGroupsInput + nextToken *string + firstPage bool +} + +// NewDescribeLogGroupsPaginator returns a new DescribeLogGroupsPaginator +func NewDescribeLogGroupsPaginator(client DescribeLogGroupsAPIClient, params *DescribeLogGroupsInput, optFns ...func(*DescribeLogGroupsPaginatorOptions)) *DescribeLogGroupsPaginator { + if params == nil { + params = &DescribeLogGroupsInput{} + } + + options := DescribeLogGroupsPaginatorOptions{} + if params.Limit != nil { + options.Limit = *params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeLogGroupsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeLogGroupsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeLogGroups page. +func (p *DescribeLogGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeLogGroupsOutput, 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.Limit = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeLogGroups(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 +} + +// DescribeLogGroupsAPIClient is a client that implements the DescribeLogGroups +// operation. +type DescribeLogGroupsAPIClient interface { + DescribeLogGroups(context.Context, *DescribeLogGroupsInput, ...func(*Options)) (*DescribeLogGroupsOutput, error) +} + +var _ DescribeLogGroupsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opDescribeLogGroups(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeLogGroups", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeLogStreams.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeLogStreams.go new file mode 100644 index 00000000000..89198ba59c6 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeLogStreams.go @@ -0,0 +1,302 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the log streams for the specified log group. You can list all the log +// streams or filter the results by prefix. You can also control how the results +// are ordered. +// +// You can specify the log group to search by using either logGroupIdentifier or +// logGroupName . You must include one of these two parameters, but you can't +// include both. +// +// This operation has a limit of 25 transactions per second, after which +// transactions are throttled. +// +// If you are using CloudWatch cross-account observability, you can use this +// operation in a monitoring account and view data from the linked source accounts. +// For more information, see [CloudWatch cross-account observability]. +// +// [CloudWatch cross-account observability]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html +func (c *Client) DescribeLogStreams(ctx context.Context, params *DescribeLogStreamsInput, optFns ...func(*Options)) (*DescribeLogStreamsOutput, error) { + if params == nil { + params = &DescribeLogStreamsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeLogStreams", params, optFns, c.addOperationDescribeLogStreamsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeLogStreamsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeLogStreamsInput struct { + + // If the value is true, results are returned in descending order. If the value is + // to false, results are returned in ascending order. The default value is false. + Descending *bool + + // The maximum number of items returned. If you don't specify a value, the default + // is up to 50 items. + Limit *int32 + + // Specify either the name or ARN of the log group to view. If the log group is in + // a source account and you are using a monitoring account, you must use the log + // group ARN. + // + // You must include either logGroupIdentifier or logGroupName , but not both. + LogGroupIdentifier *string + + // The name of the log group. + // + // You must include either logGroupIdentifier or logGroupName , but not both. + LogGroupName *string + + // The prefix to match. + // + // If orderBy is LastEventTime , you cannot specify this parameter. + LogStreamNamePrefix *string + + // The token for the next set of items to return. (You received this token from a + // previous call.) + NextToken *string + + // If the value is LogStreamName , the results are ordered by log stream name. If + // the value is LastEventTime , the results are ordered by the event time. The + // default value is LogStreamName . + // + // If you order the results by event time, you cannot specify the + // logStreamNamePrefix parameter. + // + // lastEventTimestamp represents the time of the most recent log event in the log + // stream in CloudWatch Logs. This number is expressed as the number of + // milliseconds after Jan 1, 1970 00:00:00 UTC . lastEventTimestamp updates on an + // eventual consistency basis. It typically updates in less than an hour from + // ingestion, but in rare situations might take longer. + OrderBy types.OrderBy + + noSmithyDocumentSerde +} + +type DescribeLogStreamsOutput struct { + + // The log streams. + LogStreams []types.LogStream + + // The token for the next set of items to return. The token expires after 24 hours. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeLogStreamsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeLogStreams{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeLogStreams{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeLogStreams"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeLogStreams(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// DescribeLogStreamsPaginatorOptions is the paginator options for +// DescribeLogStreams +type DescribeLogStreamsPaginatorOptions struct { + // The maximum number of items returned. If you don't specify a value, the default + // is up to 50 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 +} + +// DescribeLogStreamsPaginator is a paginator for DescribeLogStreams +type DescribeLogStreamsPaginator struct { + options DescribeLogStreamsPaginatorOptions + client DescribeLogStreamsAPIClient + params *DescribeLogStreamsInput + nextToken *string + firstPage bool +} + +// NewDescribeLogStreamsPaginator returns a new DescribeLogStreamsPaginator +func NewDescribeLogStreamsPaginator(client DescribeLogStreamsAPIClient, params *DescribeLogStreamsInput, optFns ...func(*DescribeLogStreamsPaginatorOptions)) *DescribeLogStreamsPaginator { + if params == nil { + params = &DescribeLogStreamsInput{} + } + + options := DescribeLogStreamsPaginatorOptions{} + if params.Limit != nil { + options.Limit = *params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeLogStreamsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeLogStreamsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeLogStreams page. +func (p *DescribeLogStreamsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeLogStreamsOutput, 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.Limit = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeLogStreams(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 +} + +// DescribeLogStreamsAPIClient is a client that implements the DescribeLogStreams +// operation. +type DescribeLogStreamsAPIClient interface { + DescribeLogStreams(context.Context, *DescribeLogStreamsInput, ...func(*Options)) (*DescribeLogStreamsOutput, error) +} + +var _ DescribeLogStreamsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opDescribeLogStreams(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeLogStreams", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeLookupTables.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeLookupTables.go new file mode 100644 index 00000000000..b798a2e9f56 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeLookupTables.go @@ -0,0 +1,165 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves metadata about lookup tables in your account. You can optionally +// filter the results by table name prefix. Results are sorted by table name in +// ascending order. +func (c *Client) DescribeLookupTables(ctx context.Context, params *DescribeLookupTablesInput, optFns ...func(*Options)) (*DescribeLookupTablesOutput, error) { + if params == nil { + params = &DescribeLookupTablesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeLookupTables", params, optFns, c.addOperationDescribeLookupTablesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeLookupTablesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeLookupTablesInput struct { + + // A prefix to filter lookup tables by name. Only tables whose names start with + // this prefix are returned. If you don't specify a prefix, all tables in the + // account and Region are returned. + LookupTableNamePrefix *string + + // The maximum number of lookup tables to return in the response. The default + // value is 50 and the maximum value is 100. + MaxResults int32 + + // The token for the next set of items to return. (You received this token from a + // previous call.) + NextToken *string + + noSmithyDocumentSerde +} + +type DescribeLookupTablesOutput struct { + + // An array of structures, where each structure contains metadata about one lookup + // table. + LookupTables []types.LookupTable + + // The token to use when requesting the next set of items. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeLookupTablesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeLookupTables{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeLookupTables{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeLookupTables"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeLookupTables(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDescribeLookupTables(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeLookupTables", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeMetricFilters.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeMetricFilters.go new file mode 100644 index 00000000000..c6a074b4e56 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeMetricFilters.go @@ -0,0 +1,271 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the specified metric filters. You can list all of the metric filters or +// filter the results by log name, prefix, metric name, or metric namespace. The +// results are ASCII-sorted by filter name. +func (c *Client) DescribeMetricFilters(ctx context.Context, params *DescribeMetricFiltersInput, optFns ...func(*Options)) (*DescribeMetricFiltersOutput, error) { + if params == nil { + params = &DescribeMetricFiltersInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeMetricFilters", params, optFns, c.addOperationDescribeMetricFiltersMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeMetricFiltersOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeMetricFiltersInput struct { + + // The prefix to match. CloudWatch Logs uses the value that you set here only if + // you also include the logGroupName parameter in your request. + FilterNamePrefix *string + + // The maximum number of items returned. If you don't specify a value, the default + // is up to 50 items. + Limit *int32 + + // The name of the log group. + LogGroupName *string + + // Filters results to include only those with the specified metric name. If you + // include this parameter in your request, you must also include the + // metricNamespace parameter. + MetricName *string + + // Filters results to include only those in the specified namespace. If you + // include this parameter in your request, you must also include the metricName + // parameter. + MetricNamespace *string + + // The token for the next set of items to return. (You received this token from a + // previous call.) + NextToken *string + + noSmithyDocumentSerde +} + +type DescribeMetricFiltersOutput struct { + + // The metric filters. + MetricFilters []types.MetricFilter + + // The token for the next set of items to return. The token expires after 24 hours. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeMetricFiltersMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeMetricFilters{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeMetricFilters{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeMetricFilters"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeMetricFilters(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// DescribeMetricFiltersPaginatorOptions is the paginator options for +// DescribeMetricFilters +type DescribeMetricFiltersPaginatorOptions struct { + // The maximum number of items returned. If you don't specify a value, the default + // is up to 50 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 +} + +// DescribeMetricFiltersPaginator is a paginator for DescribeMetricFilters +type DescribeMetricFiltersPaginator struct { + options DescribeMetricFiltersPaginatorOptions + client DescribeMetricFiltersAPIClient + params *DescribeMetricFiltersInput + nextToken *string + firstPage bool +} + +// NewDescribeMetricFiltersPaginator returns a new DescribeMetricFiltersPaginator +func NewDescribeMetricFiltersPaginator(client DescribeMetricFiltersAPIClient, params *DescribeMetricFiltersInput, optFns ...func(*DescribeMetricFiltersPaginatorOptions)) *DescribeMetricFiltersPaginator { + if params == nil { + params = &DescribeMetricFiltersInput{} + } + + options := DescribeMetricFiltersPaginatorOptions{} + if params.Limit != nil { + options.Limit = *params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeMetricFiltersPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeMetricFiltersPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeMetricFilters page. +func (p *DescribeMetricFiltersPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeMetricFiltersOutput, 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.Limit = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeMetricFilters(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 +} + +// DescribeMetricFiltersAPIClient is a client that implements the +// DescribeMetricFilters operation. +type DescribeMetricFiltersAPIClient interface { + DescribeMetricFilters(context.Context, *DescribeMetricFiltersInput, ...func(*Options)) (*DescribeMetricFiltersOutput, error) +} + +var _ DescribeMetricFiltersAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opDescribeMetricFilters(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeMetricFilters", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeQueries.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeQueries.go new file mode 100644 index 00000000000..c221ad745f0 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeQueries.go @@ -0,0 +1,173 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a list of CloudWatch Logs Insights queries that are scheduled, running, +// or have been run recently in this account. You can request all queries or limit +// it to queries of a specific log group or queries with a certain status. +// +// This operation includes both interactive queries started directly by users and +// automated queries executed by scheduled query configurations. Scheduled query +// executions appear in the results alongside manually initiated queries, providing +// visibility into all query activity in your account. +func (c *Client) DescribeQueries(ctx context.Context, params *DescribeQueriesInput, optFns ...func(*Options)) (*DescribeQueriesOutput, error) { + if params == nil { + params = &DescribeQueriesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeQueries", params, optFns, c.addOperationDescribeQueriesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeQueriesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeQueriesInput struct { + + // Limits the returned queries to only those for the specified log group. + LogGroupName *string + + // Limits the number of returned queries to the specified number. + MaxResults *int32 + + // The token for the next set of items to return. The token expires after 24 hours. + NextToken *string + + // Limits the returned queries to only the queries that use the specified query + // language. + QueryLanguage types.QueryLanguage + + // Limits the returned queries to only those that have the specified status. Valid + // values are Cancelled , Complete , Failed , Running , and Scheduled . + Status types.QueryStatus + + noSmithyDocumentSerde +} + +type DescribeQueriesOutput struct { + + // The token for the next set of items to return. The token expires after 24 hours. + NextToken *string + + // The list of queries that match the request. + Queries []types.QueryInfo + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeQueriesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeQueries{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeQueries{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeQueries"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeQueries(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDescribeQueries(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeQueries", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeQueryDefinitions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeQueryDefinitions.go new file mode 100644 index 00000000000..5039e68604f --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeQueryDefinitions.go @@ -0,0 +1,170 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// This operation returns a paginated list of your saved CloudWatch Logs Insights +// query definitions. You can retrieve query definitions from the current account +// or from a source account that is linked to the current account. +// +// You can use the queryDefinitionNamePrefix parameter to limit the results to +// only the query definitions that have names that start with a certain string. +func (c *Client) DescribeQueryDefinitions(ctx context.Context, params *DescribeQueryDefinitionsInput, optFns ...func(*Options)) (*DescribeQueryDefinitionsOutput, error) { + if params == nil { + params = &DescribeQueryDefinitionsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeQueryDefinitions", params, optFns, c.addOperationDescribeQueryDefinitionsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeQueryDefinitionsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeQueryDefinitionsInput struct { + + // Limits the number of returned query definitions to the specified number. + MaxResults *int32 + + // The token for the next set of items to return. The token expires after 24 hours. + NextToken *string + + // Use this parameter to filter your results to only the query definitions that + // have names that start with the prefix you specify. + QueryDefinitionNamePrefix *string + + // The query language used for this query. For more information about the query + // languages that CloudWatch Logs supports, see [Supported query languages]. + // + // [Supported query languages]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_AnalyzeLogData_Languages.html + QueryLanguage types.QueryLanguage + + noSmithyDocumentSerde +} + +type DescribeQueryDefinitionsOutput struct { + + // The token for the next set of items to return. The token expires after 24 hours. + NextToken *string + + // The list of query definitions that match your request. + QueryDefinitions []types.QueryDefinition + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeQueryDefinitionsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeQueryDefinitions{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeQueryDefinitions{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeQueryDefinitions"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeQueryDefinitions(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDescribeQueryDefinitions(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeQueryDefinitions", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeResourcePolicies.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeResourcePolicies.go new file mode 100644 index 00000000000..0113a06eb01 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeResourcePolicies.go @@ -0,0 +1,163 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the resource policies in this account. +func (c *Client) DescribeResourcePolicies(ctx context.Context, params *DescribeResourcePoliciesInput, optFns ...func(*Options)) (*DescribeResourcePoliciesOutput, error) { + if params == nil { + params = &DescribeResourcePoliciesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeResourcePolicies", params, optFns, c.addOperationDescribeResourcePoliciesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeResourcePoliciesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeResourcePoliciesInput struct { + + // The maximum number of resource policies to be displayed with one call of this + // API. + Limit *int32 + + // The token for the next set of items to return. The token expires after 24 hours. + NextToken *string + + // Specifies the scope of the resource policy. Valid values are ACCOUNT or RESOURCE + // . When not specified, defaults to ACCOUNT . + PolicyScope types.PolicyScope + + // The ARN of the CloudWatch Logs resource for which to query the resource policy. + ResourceArn *string + + noSmithyDocumentSerde +} + +type DescribeResourcePoliciesOutput struct { + + // The token for the next set of items to return. The token expires after 24 hours. + NextToken *string + + // The resource policies that exist in this account. + ResourcePolicies []types.ResourcePolicy + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeResourcePoliciesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeResourcePolicies{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeResourcePolicies{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeResourcePolicies"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeResourcePolicies(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDescribeResourcePolicies(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeResourcePolicies", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeSubscriptionFilters.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeSubscriptionFilters.go new file mode 100644 index 00000000000..8da7e0deefb --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DescribeSubscriptionFilters.go @@ -0,0 +1,267 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the subscription filters for the specified log group. You can list all +// the subscription filters or filter the results by prefix. The results are +// ASCII-sorted by filter name. +func (c *Client) DescribeSubscriptionFilters(ctx context.Context, params *DescribeSubscriptionFiltersInput, optFns ...func(*Options)) (*DescribeSubscriptionFiltersOutput, error) { + if params == nil { + params = &DescribeSubscriptionFiltersInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeSubscriptionFilters", params, optFns, c.addOperationDescribeSubscriptionFiltersMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeSubscriptionFiltersOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeSubscriptionFiltersInput struct { + + // The name of the log group. + // + // This member is required. + LogGroupName *string + + // The prefix to match. If you don't specify a value, no prefix filter is applied. + FilterNamePrefix *string + + // The maximum number of items returned. If you don't specify a value, the default + // is up to 50 items. + Limit *int32 + + // The token for the next set of items to return. (You received this token from a + // previous call.) + NextToken *string + + noSmithyDocumentSerde +} + +type DescribeSubscriptionFiltersOutput struct { + + // The token for the next set of items to return. The token expires after 24 hours. + NextToken *string + + // The subscription filters. + SubscriptionFilters []types.SubscriptionFilter + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeSubscriptionFiltersMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeSubscriptionFilters{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeSubscriptionFilters{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeSubscriptionFilters"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDescribeSubscriptionFiltersValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSubscriptionFilters(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// DescribeSubscriptionFiltersPaginatorOptions is the paginator options for +// DescribeSubscriptionFilters +type DescribeSubscriptionFiltersPaginatorOptions struct { + // The maximum number of items returned. If you don't specify a value, the default + // is up to 50 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 +} + +// DescribeSubscriptionFiltersPaginator is a paginator for +// DescribeSubscriptionFilters +type DescribeSubscriptionFiltersPaginator struct { + options DescribeSubscriptionFiltersPaginatorOptions + client DescribeSubscriptionFiltersAPIClient + params *DescribeSubscriptionFiltersInput + nextToken *string + firstPage bool +} + +// NewDescribeSubscriptionFiltersPaginator returns a new +// DescribeSubscriptionFiltersPaginator +func NewDescribeSubscriptionFiltersPaginator(client DescribeSubscriptionFiltersAPIClient, params *DescribeSubscriptionFiltersInput, optFns ...func(*DescribeSubscriptionFiltersPaginatorOptions)) *DescribeSubscriptionFiltersPaginator { + if params == nil { + params = &DescribeSubscriptionFiltersInput{} + } + + options := DescribeSubscriptionFiltersPaginatorOptions{} + if params.Limit != nil { + options.Limit = *params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeSubscriptionFiltersPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeSubscriptionFiltersPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeSubscriptionFilters page. +func (p *DescribeSubscriptionFiltersPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeSubscriptionFiltersOutput, 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.Limit = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeSubscriptionFilters(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 +} + +// DescribeSubscriptionFiltersAPIClient is a client that implements the +// DescribeSubscriptionFilters operation. +type DescribeSubscriptionFiltersAPIClient interface { + DescribeSubscriptionFilters(context.Context, *DescribeSubscriptionFiltersInput, ...func(*Options)) (*DescribeSubscriptionFiltersOutput, error) +} + +var _ DescribeSubscriptionFiltersAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opDescribeSubscriptionFilters(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeSubscriptionFilters", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DisassociateKmsKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DisassociateKmsKey.go new file mode 100644 index 00000000000..436bca8e85d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DisassociateKmsKey.go @@ -0,0 +1,194 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Disassociates the specified KMS key from the specified log group or from all +// CloudWatch Logs Insights query results in the account. +// +// When you use DisassociateKmsKey , you specify either the logGroupName parameter +// or the resourceIdentifier parameter. You can't specify both of those parameters +// in the same operation. +// +// - Specify the logGroupName parameter to stop using the KMS key to encrypt +// future log events ingested and stored in the log group. Instead, they will be +// encrypted with the default CloudWatch Logs method. The log events that were +// ingested while the key was associated with the log group are still encrypted +// with that key. Therefore, CloudWatch Logs will need permissions for the key +// whenever that data is accessed. +// +// - Specify the resourceIdentifier parameter with the query-result resource to +// stop using the KMS key to encrypt the results of all future [StartQuery]operations in the +// account. They will instead be encrypted with the default CloudWatch Logs method. +// The results from queries that ran while the key was associated with the account +// are still encrypted with that key. Therefore, CloudWatch Logs will need +// permissions for the key whenever that data is accessed. +// +// It can take up to 5 minutes for this operation to take effect. +// +// [StartQuery]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_StartQuery.html +func (c *Client) DisassociateKmsKey(ctx context.Context, params *DisassociateKmsKeyInput, optFns ...func(*Options)) (*DisassociateKmsKeyOutput, error) { + if params == nil { + params = &DisassociateKmsKeyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DisassociateKmsKey", params, optFns, c.addOperationDisassociateKmsKeyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DisassociateKmsKeyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DisassociateKmsKeyInput struct { + + // The name of the log group. + // + // In your DisassociateKmsKey operation, you must specify either the + // resourceIdentifier parameter or the logGroup parameter, but you can't specify + // both. + LogGroupName *string + + // Specifies the target for this operation. You must specify one of the following: + // + // - Specify the ARN of a log group to stop having CloudWatch Logs use the KMS + // key to encrypt log events that are ingested and stored by that log group. After + // you run this operation, CloudWatch Logs encrypts ingested log events with the + // default CloudWatch Logs method. The log group ARN must be in the following + // format. Replace REGION and ACCOUNT_ID with your Region and account ID. + // + // arn:aws:logs:REGION:ACCOUNT_ID:log-group:LOG_GROUP_NAME + // + // - Specify the following ARN to stop using this key to encrypt the results of + // future [StartQuery]operations in this account. Replace REGION and ACCOUNT_ID with your + // Region and account ID. + // + // arn:aws:logs:REGION:ACCOUNT_ID:query-result:* + // + // In your DisssociateKmsKey operation, you must specify either the + // resourceIdentifier parameter or the logGroup parameter, but you can't specify + // both. + // + // [StartQuery]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_StartQuery.html + ResourceIdentifier *string + + noSmithyDocumentSerde +} + +type DisassociateKmsKeyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDisassociateKmsKeyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDisassociateKmsKey{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDisassociateKmsKey{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DisassociateKmsKey"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateKmsKey(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDisassociateKmsKey(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DisassociateKmsKey", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DisassociateSourceFromS3TableIntegration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DisassociateSourceFromS3TableIntegration.go new file mode 100644 index 00000000000..a3d555cb909 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_DisassociateSourceFromS3TableIntegration.go @@ -0,0 +1,155 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Disassociates a data source from an S3 Table Integration, removing query access +// and deleting all associated data from the integration. +func (c *Client) DisassociateSourceFromS3TableIntegration(ctx context.Context, params *DisassociateSourceFromS3TableIntegrationInput, optFns ...func(*Options)) (*DisassociateSourceFromS3TableIntegrationOutput, error) { + if params == nil { + params = &DisassociateSourceFromS3TableIntegrationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DisassociateSourceFromS3TableIntegration", params, optFns, c.addOperationDisassociateSourceFromS3TableIntegrationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DisassociateSourceFromS3TableIntegrationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DisassociateSourceFromS3TableIntegrationInput struct { + + // The unique identifier of the association to remove between the data source and + // S3 Table Integration. + // + // This member is required. + Identifier *string + + noSmithyDocumentSerde +} + +type DisassociateSourceFromS3TableIntegrationOutput struct { + + // The unique identifier of the association that was removed. + Identifier *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDisassociateSourceFromS3TableIntegrationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDisassociateSourceFromS3TableIntegration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDisassociateSourceFromS3TableIntegration{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DisassociateSourceFromS3TableIntegration"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDisassociateSourceFromS3TableIntegrationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateSourceFromS3TableIntegration(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDisassociateSourceFromS3TableIntegration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DisassociateSourceFromS3TableIntegration", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_FilterLogEvents.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_FilterLogEvents.go new file mode 100644 index 00000000000..981a0d70a54 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_FilterLogEvents.go @@ -0,0 +1,366 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists log events from the specified log group. You can list all the log events +// or filter the results using one or more of the following: +// +// - A filter pattern +// +// - A time range +// +// - The log stream name, or a log stream name prefix that matches multiple log +// streams +// +// You must have the logs:FilterLogEvents permission to perform this operation. +// +// You can specify the log group to search by using either logGroupIdentifier or +// logGroupName . You must include one of these two parameters, but you can't +// include both. +// +// FilterLogEvents is a paginated operation. Each page returned can contain up to +// 1 MB of log events or up to 10,000 log events. A returned page might only be +// partially full, or even empty. For example, if the result of a query would +// return 15,000 log events, the first page isn't guaranteed to have 10,000 log +// events even if they all fit into 1 MB. +// +// Partially full or empty pages don't necessarily mean that pagination is +// finished. If the results include a nextToken , there might be more log events +// available. You can return these additional log events by providing the nextToken +// in a subsequent FilterLogEvents operation. If the results don't include a +// nextToken , then pagination is finished. +// +// Specifying the limit parameter only guarantees that a single page doesn't +// return more log events than the specified limit, but it might return fewer +// events than the limit. This is the expected API behavior. +// +// The returned log events are sorted by event timestamp, the timestamp when the +// event was ingested by CloudWatch Logs, and the ID of the PutLogEvents request. +// +// If you are using CloudWatch cross-account observability, you can use this +// operation in a monitoring account and view data from the linked source accounts. +// For more information, see [CloudWatch cross-account observability]. +// +// If you are using [log transformation], the FilterLogEvents operation returns only the original +// versions of log events, before they were transformed. To view the transformed +// versions, you must use a [CloudWatch Logs query.] +// +// [log transformation]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html +// [CloudWatch cross-account observability]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html +// [CloudWatch Logs query.]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AnalyzingLogData.html +func (c *Client) FilterLogEvents(ctx context.Context, params *FilterLogEventsInput, optFns ...func(*Options)) (*FilterLogEventsOutput, error) { + if params == nil { + params = &FilterLogEventsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "FilterLogEvents", params, optFns, c.addOperationFilterLogEventsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*FilterLogEventsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type FilterLogEventsInput struct { + + // The end of the time range, expressed as the number of milliseconds after Jan 1, + // 1970 00:00:00 UTC . Events with a timestamp later than this time are not + // returned. + EndTime *int64 + + // The filter pattern to use. For more information, see [Filter and Pattern Syntax]. + // + // If not provided, all the events are matched. + // + // [Filter and Pattern Syntax]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html + FilterPattern *string + + // If the value is true, the operation attempts to provide responses that contain + // events from multiple log streams within the log group, interleaved in a single + // response. If the value is false, all the matched log events in the first log + // stream are searched first, then those in the next log stream, and so on. + // + // Important As of June 17, 2019, this parameter is ignored and the value is + // assumed to be true. The response from this operation always interleaves events + // from multiple log streams within a log group. + // + // Deprecated: Starting on June 17, 2019, this parameter will be ignored and the + // value will be assumed to be true. The response from this operation will always + // interleave events from multiple log streams within a log group. + Interleaved *bool + + // The maximum number of events to return. The default is 10,000 events. + Limit *int32 + + // Specify either the name or ARN of the log group to view log events from. If the + // log group is in a source account and you are using a monitoring account, you + // must use the log group ARN. + // + // You must include either logGroupIdentifier or logGroupName , but not both. + LogGroupIdentifier *string + + // The name of the log group to search. + // + // You must include either logGroupIdentifier or logGroupName , but not both. + LogGroupName *string + + // Filters the results to include only events from log streams that have names + // starting with this prefix. + // + // If you specify a value for both logStreamNamePrefix and logStreamNames , the + // action returns an InvalidParameterException error. + LogStreamNamePrefix *string + + // Filters the results to only logs from the log streams in this list. + // + // If you specify a value for both logStreamNames and logStreamNamePrefix , the + // action returns an InvalidParameterException error. + LogStreamNames []string + + // The token for the next set of events to return. (You received this token from a + // previous call.) + NextToken *string + + // The start of the time range, expressed as the number of milliseconds after Jan + // 1, 1970 00:00:00 UTC . Events with a timestamp before this time are not returned. + StartTime *int64 + + // Specify true to display the log event fields with all sensitive data unmasked + // and visible. The default is false . + // + // To use this operation with this parameter, you must be signed into an account + // with the logs:Unmask permission. + Unmask bool + + noSmithyDocumentSerde +} + +type FilterLogEventsOutput struct { + + // The matched events. + Events []types.FilteredLogEvent + + // The token to use when requesting the next set of items. The token expires after + // 24 hours. + // + // If the results don't include a nextToken , then pagination is finished. + NextToken *string + + // Important As of May 15, 2020, this parameter is no longer supported. This + // parameter returns an empty list. + // + // Indicates which log streams have been searched and whether each has been + // searched completely. + SearchedLogStreams []types.SearchedLogStream + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationFilterLogEventsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpFilterLogEvents{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpFilterLogEvents{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "FilterLogEvents"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opFilterLogEvents(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// FilterLogEventsPaginatorOptions is the paginator options for FilterLogEvents +type FilterLogEventsPaginatorOptions struct { + // The maximum number of events to return. The default is 10,000 events. + 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 +} + +// FilterLogEventsPaginator is a paginator for FilterLogEvents +type FilterLogEventsPaginator struct { + options FilterLogEventsPaginatorOptions + client FilterLogEventsAPIClient + params *FilterLogEventsInput + nextToken *string + firstPage bool +} + +// NewFilterLogEventsPaginator returns a new FilterLogEventsPaginator +func NewFilterLogEventsPaginator(client FilterLogEventsAPIClient, params *FilterLogEventsInput, optFns ...func(*FilterLogEventsPaginatorOptions)) *FilterLogEventsPaginator { + if params == nil { + params = &FilterLogEventsInput{} + } + + options := FilterLogEventsPaginatorOptions{} + if params.Limit != nil { + options.Limit = *params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &FilterLogEventsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *FilterLogEventsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next FilterLogEvents page. +func (p *FilterLogEventsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*FilterLogEventsOutput, 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.Limit = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.FilterLogEvents(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 +} + +// FilterLogEventsAPIClient is a client that implements the FilterLogEvents +// operation. +type FilterLogEventsAPIClient interface { + FilterLogEvents(context.Context, *FilterLogEventsInput, ...func(*Options)) (*FilterLogEventsOutput, error) +} + +var _ FilterLogEventsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opFilterLogEvents(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "FilterLogEvents", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_GetDataProtectionPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_GetDataProtectionPolicy.go new file mode 100644 index 00000000000..f36aec539de --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_GetDataProtectionPolicy.go @@ -0,0 +1,160 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns information about a log group data protection policy. +func (c *Client) GetDataProtectionPolicy(ctx context.Context, params *GetDataProtectionPolicyInput, optFns ...func(*Options)) (*GetDataProtectionPolicyOutput, error) { + if params == nil { + params = &GetDataProtectionPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetDataProtectionPolicy", params, optFns, c.addOperationGetDataProtectionPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetDataProtectionPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetDataProtectionPolicyInput struct { + + // The name or ARN of the log group that contains the data protection policy that + // you want to see. + // + // This member is required. + LogGroupIdentifier *string + + noSmithyDocumentSerde +} + +type GetDataProtectionPolicyOutput struct { + + // The date and time that this policy was most recently updated. + LastUpdatedTime *int64 + + // The log group name or ARN that you specified in your request. + LogGroupIdentifier *string + + // The data protection policy document for this log group. + PolicyDocument *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetDataProtectionPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetDataProtectionPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetDataProtectionPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetDataProtectionPolicy"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetDataProtectionPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDataProtectionPolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetDataProtectionPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetDataProtectionPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_GetDelivery.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_GetDelivery.go new file mode 100644 index 00000000000..8b17c7141e6 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_GetDelivery.go @@ -0,0 +1,168 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns complete information about one logical delivery. A delivery is a +// connection between a [delivery source]and a [delivery destination]. +// +// A delivery source represents an Amazon Web Services resource that sends logs to +// an logs delivery destination. The destination can be CloudWatch Logs, Amazon S3, +// or Firehose. Only some Amazon Web Services services support being configured as +// a delivery source. These services are listed in [Enable logging from Amazon Web Services services.] +// +// You need to specify the delivery id in this operation. You can find the IDs of +// the deliveries in your account with the [DescribeDeliveries]operation. +// +// [delivery destination]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestination.html +// [delivery source]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliverySource.html +// [Enable logging from Amazon Web Services services.]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AWS-logs-and-resource-policy.html +// [DescribeDeliveries]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeDeliveries.html +func (c *Client) GetDelivery(ctx context.Context, params *GetDeliveryInput, optFns ...func(*Options)) (*GetDeliveryOutput, error) { + if params == nil { + params = &GetDeliveryInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetDelivery", params, optFns, c.addOperationGetDeliveryMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetDeliveryOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetDeliveryInput struct { + + // The ID of the delivery that you want to retrieve. + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +type GetDeliveryOutput struct { + + // A structure that contains information about the delivery. + Delivery *types.Delivery + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetDeliveryMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetDelivery{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetDelivery{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetDelivery"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetDeliveryValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDelivery(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetDelivery(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetDelivery", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_GetDeliveryDestination.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_GetDeliveryDestination.go new file mode 100644 index 00000000000..31047dfe012 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_GetDeliveryDestination.go @@ -0,0 +1,154 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves complete information about one delivery destination. +func (c *Client) GetDeliveryDestination(ctx context.Context, params *GetDeliveryDestinationInput, optFns ...func(*Options)) (*GetDeliveryDestinationOutput, error) { + if params == nil { + params = &GetDeliveryDestinationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetDeliveryDestination", params, optFns, c.addOperationGetDeliveryDestinationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetDeliveryDestinationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetDeliveryDestinationInput struct { + + // The name of the delivery destination that you want to retrieve. + // + // This member is required. + Name *string + + noSmithyDocumentSerde +} + +type GetDeliveryDestinationOutput struct { + + // A structure containing information about the delivery destination. + DeliveryDestination *types.DeliveryDestination + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetDeliveryDestinationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetDeliveryDestination{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetDeliveryDestination{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetDeliveryDestination"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetDeliveryDestinationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDeliveryDestination(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetDeliveryDestination(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetDeliveryDestination", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_GetDeliveryDestinationPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_GetDeliveryDestinationPolicy.go new file mode 100644 index 00000000000..83f389bfa37 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_GetDeliveryDestinationPolicy.go @@ -0,0 +1,158 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves the delivery destination policy assigned to the delivery destination +// that you specify. For more information about delivery destinations and their +// policies, see [PutDeliveryDestinationPolicy]. +// +// [PutDeliveryDestinationPolicy]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestinationPolicy.html +func (c *Client) GetDeliveryDestinationPolicy(ctx context.Context, params *GetDeliveryDestinationPolicyInput, optFns ...func(*Options)) (*GetDeliveryDestinationPolicyOutput, error) { + if params == nil { + params = &GetDeliveryDestinationPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetDeliveryDestinationPolicy", params, optFns, c.addOperationGetDeliveryDestinationPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetDeliveryDestinationPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetDeliveryDestinationPolicyInput struct { + + // The name of the delivery destination that you want to retrieve the policy of. + // + // This member is required. + DeliveryDestinationName *string + + noSmithyDocumentSerde +} + +type GetDeliveryDestinationPolicyOutput struct { + + // The IAM policy for this delivery destination. + Policy *types.Policy + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetDeliveryDestinationPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetDeliveryDestinationPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetDeliveryDestinationPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetDeliveryDestinationPolicy"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetDeliveryDestinationPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDeliveryDestinationPolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetDeliveryDestinationPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetDeliveryDestinationPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_GetDeliverySource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_GetDeliverySource.go new file mode 100644 index 00000000000..e12bc718d41 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_GetDeliverySource.go @@ -0,0 +1,154 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves complete information about one delivery source. +func (c *Client) GetDeliverySource(ctx context.Context, params *GetDeliverySourceInput, optFns ...func(*Options)) (*GetDeliverySourceOutput, error) { + if params == nil { + params = &GetDeliverySourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetDeliverySource", params, optFns, c.addOperationGetDeliverySourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetDeliverySourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetDeliverySourceInput struct { + + // The name of the delivery source that you want to retrieve. + // + // This member is required. + Name *string + + noSmithyDocumentSerde +} + +type GetDeliverySourceOutput struct { + + // A structure containing information about the delivery source. + DeliverySource *types.DeliverySource + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetDeliverySourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetDeliverySource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetDeliverySource{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetDeliverySource"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetDeliverySourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDeliverySource(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetDeliverySource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetDeliverySource", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_GetIntegration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_GetIntegration.go new file mode 100644 index 00000000000..fd1212b61a6 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_GetIntegration.go @@ -0,0 +1,171 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns information about one integration between CloudWatch Logs and +// OpenSearch Service. +func (c *Client) GetIntegration(ctx context.Context, params *GetIntegrationInput, optFns ...func(*Options)) (*GetIntegrationOutput, error) { + if params == nil { + params = &GetIntegrationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetIntegration", params, optFns, c.addOperationGetIntegrationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetIntegrationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetIntegrationInput struct { + + // The name of the integration that you want to find information about. To find + // the name of your integration, use [ListIntegrations] + // + // [ListIntegrations]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_ListIntegrations.html + // + // This member is required. + IntegrationName *string + + noSmithyDocumentSerde +} + +type GetIntegrationOutput struct { + + // A structure that contains information about the integration configuration. For + // an integration with OpenSearch Service, this includes information about + // OpenSearch Service resources such as the collection, the workspace, and + // policies. + IntegrationDetails types.IntegrationDetails + + // The name of the integration. + IntegrationName *string + + // The current status of this integration. + IntegrationStatus types.IntegrationStatus + + // The type of integration. Integrations with OpenSearch Service have the type + // OPENSEARCH . + IntegrationType types.IntegrationType + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetIntegrationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetIntegration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetIntegration{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetIntegration"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetIntegrationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetIntegration(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetIntegration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetIntegration", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_GetLogAnomalyDetector.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_GetLogAnomalyDetector.go new file mode 100644 index 00000000000..c0c356ab82f --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_GetLogAnomalyDetector.go @@ -0,0 +1,194 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves information about the log anomaly detector that you specify. The KMS +// key ARN detected is valid. +func (c *Client) GetLogAnomalyDetector(ctx context.Context, params *GetLogAnomalyDetectorInput, optFns ...func(*Options)) (*GetLogAnomalyDetectorOutput, error) { + if params == nil { + params = &GetLogAnomalyDetectorInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetLogAnomalyDetector", params, optFns, c.addOperationGetLogAnomalyDetectorMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetLogAnomalyDetectorOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetLogAnomalyDetectorInput struct { + + // The ARN of the anomaly detector to retrieve information about. You can find the + // ARNs of log anomaly detectors in your account by using the [ListLogAnomalyDetectors]operation. + // + // [ListLogAnomalyDetectors]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_ListLogAnomalyDetectors.html + // + // This member is required. + AnomalyDetectorArn *string + + noSmithyDocumentSerde +} + +type GetLogAnomalyDetectorOutput struct { + + // Specifies whether the anomaly detector is currently active. To change its + // status, use the enabled parameter in the [UpdateLogAnomalyDetector] operation. + // + // [UpdateLogAnomalyDetector]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_UpdateLogAnomalyDetector.html + AnomalyDetectorStatus types.AnomalyDetectorStatus + + // The number of days used as the life cycle of anomalies. After this time, + // anomalies are automatically baselined and the anomaly detector model will treat + // new occurrences of similar event as normal. + AnomalyVisibilityTime *int64 + + // The date and time when this anomaly detector was created. + CreationTimeStamp int64 + + // The name of the log anomaly detector + DetectorName *string + + // Specifies how often the anomaly detector runs and look for anomalies. Set this + // value according to the frequency that the log group receives new logs. For + // example, if the log group receives new log events every 10 minutes, then setting + // evaluationFrequency to FIFTEEN_MIN might be appropriate. + EvaluationFrequency types.EvaluationFrequency + + // A symbolic description of how CloudWatch Logs should interpret the data in each + // log event. For example, a log event can contain timestamps, IP addresses, + // strings, and so on. You use the filter pattern to specify what to look for in + // the log event message. + FilterPattern *string + + // The ARN of the KMS key assigned to this anomaly detector, if any. + KmsKeyId *string + + // The date and time when this anomaly detector was most recently modified. + LastModifiedTimeStamp int64 + + // An array of structures, where each structure contains the ARN of a log group + // associated with this anomaly detector. + LogGroupArnList []string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetLogAnomalyDetectorMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetLogAnomalyDetector{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetLogAnomalyDetector{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetLogAnomalyDetector"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetLogAnomalyDetectorValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetLogAnomalyDetector(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetLogAnomalyDetector(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetLogAnomalyDetector", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_GetLogEvents.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_GetLogEvents.go new file mode 100644 index 00000000000..411c488b954 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_GetLogEvents.go @@ -0,0 +1,340 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists log events from the specified log stream. You can list all of the log +// events or filter using a time range. +// +// GetLogEvents is a paginated operation. Each page returned can contain up to 1 +// MB of log events or up to 10,000 log events. A returned page might only be +// partially full, or even empty. For example, if the result of a query would +// return 15,000 log events, the first page isn't guaranteed to have 10,000 log +// events even if they all fit into 1 MB. +// +// Partially full or empty pages don't necessarily mean that pagination is +// finished. As long as the nextBackwardToken or nextForwardToken returned is NOT +// equal to the nextToken that you passed into the API call, there might be more +// log events available. The token that you use depends on the direction you want +// to move in along the log stream. The returned tokens are never null. +// +// If you set startFromHead to true and you don’t include endTime in your request, +// you can end up in a situation where the pagination doesn't terminate. This can +// happen when the new log events are being added to the target log streams faster +// than they are being read. This situation is a good use case for the CloudWatch +// Logs [Live Tail]feature. +// +// If you are using CloudWatch cross-account observability, you can use this +// operation in a monitoring account and view data from the linked source accounts. +// For more information, see [CloudWatch cross-account observability]. +// +// You can specify the log group to search by using either logGroupIdentifier or +// logGroupName . You must include one of these two parameters, but you can't +// include both. +// +// If you are using [log transformation], the GetLogEvents operation returns only the original +// versions of log events, before they were transformed. To view the transformed +// versions, you must use a [CloudWatch Logs query.] +// +// [log transformation]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html +// [CloudWatch cross-account observability]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html +// [CloudWatch Logs query.]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AnalyzingLogData.html +// [Live Tail]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatchLogs_LiveTail.html +func (c *Client) GetLogEvents(ctx context.Context, params *GetLogEventsInput, optFns ...func(*Options)) (*GetLogEventsOutput, error) { + if params == nil { + params = &GetLogEventsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetLogEvents", params, optFns, c.addOperationGetLogEventsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetLogEventsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetLogEventsInput struct { + + // The name of the log stream. + // + // This member is required. + LogStreamName *string + + // The end of the time range, expressed as the number of milliseconds after Jan 1, + // 1970 00:00:00 UTC . Events with a timestamp equal to or later than this time are + // not included. + EndTime *int64 + + // The maximum number of log events returned. If you don't specify a limit, the + // default is as many log events as can fit in a response size of 1 MB (up to + // 10,000 log events). + Limit *int32 + + // Specify either the name or ARN of the log group to view events from. If the log + // group is in a source account and you are using a monitoring account, you must + // use the log group ARN. + // + // You must include either logGroupIdentifier or logGroupName , but not both. + LogGroupIdentifier *string + + // The name of the log group. + // + // You must include either logGroupIdentifier or logGroupName , but not both. + LogGroupName *string + + // The token for the next set of items to return. (You received this token from a + // previous call.) + NextToken *string + + // If the value is true, the earliest log events are returned first. If the value + // is false, the latest log events are returned first. The default value is false. + // + // If you are using a previous nextForwardToken value as the nextToken in this + // operation, you must specify true for startFromHead . + StartFromHead *bool + + // The start of the time range, expressed as the number of milliseconds after Jan + // 1, 1970 00:00:00 UTC . Events with a timestamp equal to this time or later than + // this time are included. Events with a timestamp earlier than this time are not + // included. + StartTime *int64 + + // Specify true to display the log event fields with all sensitive data unmasked + // and visible. The default is false . + // + // To use this operation with this parameter, you must be signed into an account + // with the logs:Unmask permission. + Unmask bool + + noSmithyDocumentSerde +} + +type GetLogEventsOutput struct { + + // The events. + Events []types.OutputLogEvent + + // The token for the next set of items in the backward direction. The token + // expires after 24 hours. This token is not null. If you have reached the end of + // the stream, it returns the same token you passed in. + NextBackwardToken *string + + // The token for the next set of items in the forward direction. The token expires + // after 24 hours. If you have reached the end of the stream, it returns the same + // token you passed in. + NextForwardToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetLogEventsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetLogEvents{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetLogEvents{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetLogEvents"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetLogEventsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetLogEvents(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// GetLogEventsPaginatorOptions is the paginator options for GetLogEvents +type GetLogEventsPaginatorOptions struct { + // The maximum number of log events returned. If you don't specify a limit, the + // default is as many log events as can fit in a response size of 1 MB (up to + // 10,000 log events). + 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 +} + +// GetLogEventsPaginator is a paginator for GetLogEvents +type GetLogEventsPaginator struct { + options GetLogEventsPaginatorOptions + client GetLogEventsAPIClient + params *GetLogEventsInput + nextToken *string + firstPage bool +} + +// NewGetLogEventsPaginator returns a new GetLogEventsPaginator +func NewGetLogEventsPaginator(client GetLogEventsAPIClient, params *GetLogEventsInput, optFns ...func(*GetLogEventsPaginatorOptions)) *GetLogEventsPaginator { + if params == nil { + params = &GetLogEventsInput{} + } + + options := GetLogEventsPaginatorOptions{} + if params.Limit != nil { + options.Limit = *params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &GetLogEventsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *GetLogEventsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next GetLogEvents page. +func (p *GetLogEventsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetLogEventsOutput, 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.Limit = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.GetLogEvents(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextForwardToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// GetLogEventsAPIClient is a client that implements the GetLogEvents operation. +type GetLogEventsAPIClient interface { + GetLogEvents(context.Context, *GetLogEventsInput, ...func(*Options)) (*GetLogEventsOutput, error) +} + +var _ GetLogEventsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opGetLogEvents(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetLogEvents", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_GetLogFields.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_GetLogFields.go new file mode 100644 index 00000000000..61b5e4dc12f --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_GetLogFields.go @@ -0,0 +1,162 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Discovers available fields for a specific data source and type. The response +// includes any field modifications introduced through pipelines, such as new +// fields or changed field types. +func (c *Client) GetLogFields(ctx context.Context, params *GetLogFieldsInput, optFns ...func(*Options)) (*GetLogFieldsOutput, error) { + if params == nil { + params = &GetLogFieldsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetLogFields", params, optFns, c.addOperationGetLogFieldsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetLogFieldsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetLogFieldsInput struct { + + // The name of the data source to retrieve log fields for. + // + // This member is required. + DataSourceName *string + + // The type of the data source to retrieve log fields for. + // + // This member is required. + DataSourceType *string + + noSmithyDocumentSerde +} + +type GetLogFieldsOutput struct { + + // The list of log fields for the specified data source, including field names and + // their data types. + LogFields []types.LogFieldsListItem + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetLogFieldsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetLogFields{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetLogFields{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetLogFields"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetLogFieldsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetLogFields(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetLogFields(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetLogFields", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_GetLogGroupFields.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_GetLogGroupFields.go new file mode 100644 index 00000000000..b5d83453549 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_GetLogGroupFields.go @@ -0,0 +1,191 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a list of the fields that are included in log events in the specified +// log group. Includes the percentage of log events that contain each field. The +// search is limited to a time period that you specify. +// +// This operation is used for discovering fields within log group events. For +// discovering fields across data sources, use the GetLogFields operation. +// +// You can specify the log group to search by using either logGroupIdentifier or +// logGroupName . You must specify one of these parameters, but you can't specify +// both. +// +// In the results, fields that start with @ are fields generated by CloudWatch +// Logs. For example, @timestamp is the timestamp of each log event. For more +// information about the fields that are generated by CloudWatch logs, see [Supported Logs and Discovered Fields]. +// +// The response results are sorted by the frequency percentage, starting with the +// highest percentage. +// +// If you are using CloudWatch cross-account observability, you can use this +// operation in a monitoring account and view data from the linked source accounts. +// For more information, see [CloudWatch cross-account observability]. +// +// [CloudWatch cross-account observability]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html +// [Supported Logs and Discovered Fields]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_AnalyzeLogData-discoverable-fields.html +func (c *Client) GetLogGroupFields(ctx context.Context, params *GetLogGroupFieldsInput, optFns ...func(*Options)) (*GetLogGroupFieldsOutput, error) { + if params == nil { + params = &GetLogGroupFieldsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetLogGroupFields", params, optFns, c.addOperationGetLogGroupFieldsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetLogGroupFieldsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetLogGroupFieldsInput struct { + + // Specify either the name or ARN of the log group to view. If the log group is in + // a source account and you are using a monitoring account, you must specify the + // ARN. + // + // You must include either logGroupIdentifier or logGroupName , but not both. + LogGroupIdentifier *string + + // The name of the log group to search. + // + // You must include either logGroupIdentifier or logGroupName , but not both. + LogGroupName *string + + // The time to set as the center of the query. If you specify time , the 8 minutes + // before and 8 minutes after this time are searched. If you omit time , the most + // recent 15 minutes up to the current time are searched. + // + // The time value is specified as epoch time, which is the number of seconds since + // January 1, 1970, 00:00:00 UTC . + Time *int64 + + noSmithyDocumentSerde +} + +type GetLogGroupFieldsOutput struct { + + // The array of fields found in the query. Each object in the array contains the + // name of the field, along with the percentage of time it appeared in the log + // events that were queried. + LogGroupFields []types.LogGroupField + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetLogGroupFieldsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetLogGroupFields{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetLogGroupFields{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetLogGroupFields"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetLogGroupFields(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetLogGroupFields(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetLogGroupFields", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_GetLogObject.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_GetLogObject.go new file mode 100644 index 00000000000..7de48b59095 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_GetLogObject.go @@ -0,0 +1,315 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithysync "github.com/aws/smithy-go/sync" + smithyhttp "github.com/aws/smithy-go/transport/http" + "sync" +) + +// Retrieves a large logging object (LLO) and streams it back. This API is used to +// fetch the content of large portions of log events that have been ingested +// through the PutOpenTelemetryLogs API. When log events contain fields that would +// cause the total event size to exceed 1MB, CloudWatch Logs automatically +// processes up to 10 fields, starting with the largest fields. Each field is +// truncated as needed to keep the total event size as close to 1MB as possible. +// The excess portions are stored as Large Log Objects (LLOs) and these fields are +// processed separately and LLO reference system fields (in the format +// @ptr.$[path.to.field] ) are added. The path in the reference field reflects the +// original JSON structure where the large field was located. For example, this +// could be @ptr.$['input']['message'] , @ptr.$['AAA']['BBB']['CCC']['DDD'] , +// @ptr.$['AAA'] , or any other path matching your log structure. +// +// The GetLogObject API routes requests using SDK host prefix injection. SDK +// versions released before April 1, 2026 route to +// streaming-logs.Region.amazonaws.com , which does not support VPC endpoints. SDK +// versions released on or after April 1, 2026 route to +// stream-logs.Region.amazonaws.com , which supports VPC endpoints. To set up a VPC +// endpoint for this API, see [Creating a VPC endpoint for CloudWatch Logs]. +// +// [Creating a VPC endpoint for CloudWatch Logs]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/cloudwatch-logs-and-interface-VPC.html#create-VPC-endpoint-for-CloudWatchLogs +func (c *Client) GetLogObject(ctx context.Context, params *GetLogObjectInput, optFns ...func(*Options)) (*GetLogObjectOutput, error) { + if params == nil { + params = &GetLogObjectInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetLogObject", params, optFns, c.addOperationGetLogObjectMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetLogObjectOutput) + out.ResultMetadata = metadata + return out, nil +} + +// The parameters for the GetLogObject operation. +type GetLogObjectInput struct { + + // A pointer to the specific log object to retrieve. This is a required parameter + // that uniquely identifies the log object within CloudWatch Logs. The pointer is + // typically obtained from a previous query or filter operation. + // + // This member is required. + LogObjectPointer *string + + // A boolean flag that indicates whether to unmask sensitive log data. When set to + // true, any masked or redacted data in the log object will be displayed in its + // original form. Default is false. + Unmask bool + + noSmithyDocumentSerde +} + +// The response from the GetLogObject operation. +type GetLogObjectOutput struct { + eventStream *GetLogObjectEventStream + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +// GetStream returns the type to interact with the event stream. +func (o *GetLogObjectOutput) GetStream() *GetLogObjectEventStream { + return o.eventStream +} + +func (c *Client) addOperationGetLogObjectMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetLogObject{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetLogObject{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetLogObject"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addEventStreamGetLogObjectMiddleware(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addEndpointPrefix_opGetLogObjectMiddleware(stack); err != nil { + return err + } + if err = addOpGetLogObjectValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetLogObject(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +type endpointPrefix_opGetLogObjectMiddleware struct { +} + +func (*endpointPrefix_opGetLogObjectMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opGetLogObjectMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "streaming-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opGetLogObjectMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opGetLogObjectMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +func newServiceMetadataMiddleware_opGetLogObject(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetLogObject", + } +} + +// GetLogObjectEventStream provides the event stream handling for the GetLogObject operation. +// +// For testing and mocking the event stream this type should be initialized via +// the NewGetLogObjectEventStream constructor function. Using the functional options +// to pass in nested mock behavior. +type GetLogObjectEventStream struct { + // GetLogObjectResponseStreamReader is the EventStream reader for the + // GetLogObjectResponseStream events. This value is automatically set by the SDK + // when the API call is made Use this member when unit testing your code with the + // SDK to mock out the EventStream Reader. + // + // Must not be nil. + Reader GetLogObjectResponseStreamReader + + done chan struct{} + closeOnce sync.Once + err *smithysync.OnceErr +} + +// NewGetLogObjectEventStream initializes an GetLogObjectEventStream. +// This function should only be used for testing and mocking the GetLogObjectEventStream +// stream within your application. +// +// The Reader member must be set before reading events from the stream. +func NewGetLogObjectEventStream(optFns ...func(*GetLogObjectEventStream)) *GetLogObjectEventStream { + es := &GetLogObjectEventStream{ + done: make(chan struct{}), + err: smithysync.NewOnceErr(), + } + for _, fn := range optFns { + fn(es) + } + return es +} + +// Events returns a channel to read events from. +func (es *GetLogObjectEventStream) Events() <-chan types.GetLogObjectResponseStream { + return es.Reader.Events() +} + +// Close closes the stream. This will also cause the stream to be closed. +// Close must be called when done using the stream API. Not calling Close +// may result in resource leaks. +// +// Will close the underlying EventStream writer and reader, and no more events can be +// sent or received. +func (es *GetLogObjectEventStream) Close() error { + es.closeOnce.Do(es.safeClose) + return es.Err() +} + +func (es *GetLogObjectEventStream) safeClose() { + close(es.done) + + es.Reader.Close() +} + +// Err returns any error that occurred while reading or writing EventStream Events +// from the service API's response. Returns nil if there were no errors. +func (es *GetLogObjectEventStream) Err() error { + if err := es.err.Err(); err != nil { + return err + } + + if err := es.Reader.Err(); err != nil { + return err + } + + return nil +} + +func (es *GetLogObjectEventStream) waitStreamClose() { + type errorSet interface { + ErrorSet() <-chan struct{} + } + + var outputErrCh <-chan struct{} + if v, ok := es.Reader.(errorSet); ok { + outputErrCh = v.ErrorSet() + } + var outputClosedCh <-chan struct{} + if v, ok := es.Reader.(interface{ Closed() <-chan struct{} }); ok { + outputClosedCh = v.Closed() + } + + select { + case <-es.done: + case <-outputErrCh: + es.err.SetError(es.Reader.Err()) + es.Close() + + case <-outputClosedCh: + if err := es.Reader.Err(); err != nil { + es.err.SetError(es.Reader.Err()) + } + es.Close() + + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_GetLogRecord.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_GetLogRecord.go new file mode 100644 index 00000000000..1a22e788e2c --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_GetLogRecord.go @@ -0,0 +1,168 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves all of the fields and values of a single log event. All fields are +// retrieved, even if the original query that produced the logRecordPointer +// retrieved only a subset of fields. Fields are returned as field name/field value +// pairs. +// +// The full unparsed log event is returned within @message . +func (c *Client) GetLogRecord(ctx context.Context, params *GetLogRecordInput, optFns ...func(*Options)) (*GetLogRecordOutput, error) { + if params == nil { + params = &GetLogRecordInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetLogRecord", params, optFns, c.addOperationGetLogRecordMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetLogRecordOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetLogRecordInput struct { + + // The pointer corresponding to the log event record you want to retrieve. You get + // this from the response of a GetQueryResults operation. In that response, the + // value of the @ptr field for a log event is the value to use as logRecordPointer + // to retrieve that complete log event record. + // + // This member is required. + LogRecordPointer *string + + // Specify true to display the log event fields with all sensitive data unmasked + // and visible. The default is false . + // + // To use this operation with this parameter, you must be signed into an account + // with the logs:Unmask permission. + Unmask bool + + noSmithyDocumentSerde +} + +type GetLogRecordOutput struct { + + // The requested log event, as a JSON string. + LogRecord map[string]string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetLogRecordMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetLogRecord{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetLogRecord{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetLogRecord"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetLogRecordValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetLogRecord(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetLogRecord(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetLogRecord", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_GetLookupTable.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_GetLookupTable.go new file mode 100644 index 00000000000..653315d0b21 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_GetLookupTable.go @@ -0,0 +1,172 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves the full content of a lookup table, including the CSV data. +func (c *Client) GetLookupTable(ctx context.Context, params *GetLookupTableInput, optFns ...func(*Options)) (*GetLookupTableOutput, error) { + if params == nil { + params = &GetLookupTableInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetLookupTable", params, optFns, c.addOperationGetLookupTableMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetLookupTableOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetLookupTableInput struct { + + // The ARN of the lookup table to retrieve. + // + // This member is required. + LookupTableArn *string + + noSmithyDocumentSerde +} + +type GetLookupTableOutput struct { + + // The description of the lookup table. + Description *string + + // The ARN of the KMS key used to encrypt the lookup table data, if applicable. + KmsKeyId *string + + // The time when the lookup table was last updated, expressed as the number of + // milliseconds after Jan 1, 1970 00:00:00 UTC . + LastUpdatedTime *int64 + + // The ARN of the lookup table. + LookupTableArn *string + + // The name of the lookup table. + LookupTableName *string + + // The size of the lookup table in bytes. + SizeBytes *int64 + + // The full CSV content of the lookup table. + TableBody *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetLookupTableMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetLookupTable{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetLookupTable{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetLookupTable"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetLookupTableValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetLookupTable(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetLookupTable(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetLookupTable", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_GetQueryResults.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_GetQueryResults.go new file mode 100644 index 00000000000..2e61addbbe7 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_GetQueryResults.go @@ -0,0 +1,210 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns the results from the specified query. +// +// Only the fields requested in the query are returned, along with a @ptr field, +// which is the identifier for the log record. You can use the value of @ptr in a [GetLogRecord] +// operation to get the full log record. +// +// GetQueryResults does not start running a query. To run a query, use [StartQuery]. For more +// information about how long results of previous queries are available, see [CloudWatch Logs quotas]. +// +// If the value of the Status field in the output is Running , this operation +// returns only partial results. If you see a value of Scheduled or Running for +// the status, you can retry the operation later to see the final results. +// +// This operation is used both for retrieving results from interactive queries and +// from automated scheduled query executions. Scheduled queries use GetQueryResults +// internally to retrieve query results for processing and delivery to configured +// destinations. +// +// If you are using CloudWatch cross-account observability, you can use this +// operation in a monitoring account to start queries in linked source accounts. +// For more information, see [CloudWatch cross-account observability]. +// +// [CloudWatch cross-account observability]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html +// [GetLogRecord]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetLogRecord.html +// [CloudWatch Logs quotas]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/cloudwatch_limits_cwl.html +// [StartQuery]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_StartQuery.html +func (c *Client) GetQueryResults(ctx context.Context, params *GetQueryResultsInput, optFns ...func(*Options)) (*GetQueryResultsOutput, error) { + if params == nil { + params = &GetQueryResultsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetQueryResults", params, optFns, c.addOperationGetQueryResultsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetQueryResultsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetQueryResultsInput struct { + + // The ID number of the query. + // + // This member is required. + QueryId *string + + noSmithyDocumentSerde +} + +type GetQueryResultsOutput struct { + + // If you associated an KMS key with the CloudWatch Logs Insights query results in + // this account, this field displays the ARN of the key that's used to encrypt the + // query results when [StartQuery]stores them. + // + // [StartQuery]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_StartQuery.html + EncryptionKey *string + + // The query language used for this query. For more information about the query + // languages that CloudWatch Logs supports, see [Supported query languages]. + // + // [Supported query languages]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_AnalyzeLogData_Languages.html + QueryLanguage types.QueryLanguage + + // The log events that matched the query criteria during the most recent time it + // ran. + // + // The results value is an array of arrays. Each log event is one object in the + // top-level array. Each of these log event objects is an array of field / value + // pairs. + Results [][]types.ResultField + + // Includes the number of log events scanned by the query, the number of log + // events that matched the query criteria, and the total number of bytes in the + // scanned log events. These values reflect the full raw results of the query. + Statistics *types.QueryStatistics + + // The status of the most recent running of the query. Possible values are + // Cancelled , Complete , Failed , Running , Scheduled , Timeout , and Unknown . + // + // Queries time out after 60 minutes of runtime. To avoid having your queries time + // out, reduce the time range being searched or partition your query into a number + // of queries. + Status types.QueryStatus + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetQueryResultsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetQueryResults{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetQueryResults{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetQueryResults"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetQueryResultsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetQueryResults(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetQueryResults(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetQueryResults", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_GetScheduledQuery.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_GetScheduledQuery.go new file mode 100644 index 00000000000..4e5d7371aab --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_GetScheduledQuery.go @@ -0,0 +1,206 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves details about a specific scheduled query, including its +// configuration, execution status, and metadata. +func (c *Client) GetScheduledQuery(ctx context.Context, params *GetScheduledQueryInput, optFns ...func(*Options)) (*GetScheduledQueryOutput, error) { + if params == nil { + params = &GetScheduledQueryInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetScheduledQuery", params, optFns, c.addOperationGetScheduledQueryMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetScheduledQueryOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetScheduledQueryInput struct { + + // The ARN or name of the scheduled query to retrieve. + // + // This member is required. + Identifier *string + + noSmithyDocumentSerde +} + +type GetScheduledQueryOutput struct { + + // The timestamp when the scheduled query was created. + CreationTime *int64 + + // The description of the scheduled query. + Description *string + + // Configuration for where query results are delivered. + DestinationConfiguration *types.DestinationConfiguration + + // The ARN of the IAM role used to execute the query and deliver results. + ExecutionRoleArn *string + + // The status of the most recent execution of the scheduled query. + LastExecutionStatus types.ExecutionStatus + + // The timestamp when the scheduled query was last executed. + LastTriggeredTime *int64 + + // The timestamp when the scheduled query was last updated. + LastUpdatedTime *int64 + + // The log groups queried by the scheduled query. + LogGroupIdentifiers []string + + // The name of the scheduled query. + Name *string + + // The query language used by the scheduled query. + QueryLanguage types.QueryLanguage + + // The query string executed by the scheduled query. + QueryString *string + + // The end time for the scheduled query in Unix epoch format. + ScheduleEndTime *int64 + + // The cron expression that defines when the scheduled query runs. + ScheduleExpression *string + + // The start time for the scheduled query in Unix epoch format. + ScheduleStartTime *int64 + + // The ARN of the scheduled query. + ScheduledQueryArn *string + + // The time offset in seconds that defines the lookback period for the query. + StartTimeOffset *int64 + + // The current state of the scheduled query. + State types.ScheduledQueryState + + // The timezone used for evaluating the schedule expression. + Timezone *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetScheduledQueryMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetScheduledQuery{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetScheduledQuery{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetScheduledQuery"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetScheduledQueryValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetScheduledQuery(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetScheduledQuery(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetScheduledQuery", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_GetScheduledQueryHistory.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_GetScheduledQueryHistory.go new file mode 100644 index 00000000000..902a5e4f836 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_GetScheduledQueryHistory.go @@ -0,0 +1,279 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves the execution history of a scheduled query within a specified time +// range, including query results and destination processing status. +func (c *Client) GetScheduledQueryHistory(ctx context.Context, params *GetScheduledQueryHistoryInput, optFns ...func(*Options)) (*GetScheduledQueryHistoryOutput, error) { + if params == nil { + params = &GetScheduledQueryHistoryInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetScheduledQueryHistory", params, optFns, c.addOperationGetScheduledQueryHistoryMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetScheduledQueryHistoryOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetScheduledQueryHistoryInput struct { + + // The end time for the history query in Unix epoch format. + // + // This member is required. + EndTime *int64 + + // The ARN or name of the scheduled query to retrieve history for. + // + // This member is required. + Identifier *string + + // The start time for the history query in Unix epoch format. + // + // This member is required. + StartTime *int64 + + // An array of execution statuses to filter the history results. Only executions + // with the specified statuses are returned. + ExecutionStatuses []types.ExecutionStatus + + // The maximum number of history records to return. Valid range is 1 to 1000. + MaxResults *int32 + + // The token for the next set of items to return. The token expires after 24 hours. + NextToken *string + + noSmithyDocumentSerde +} + +type GetScheduledQueryHistoryOutput struct { + + // The name of the scheduled query. + Name *string + + // The token for the next set of items to return. The token expires after 24 hours. + NextToken *string + + // The ARN of the scheduled query. + ScheduledQueryArn *string + + // An array of execution history records for the scheduled query. + TriggerHistory []types.TriggerHistoryRecord + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetScheduledQueryHistoryMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetScheduledQueryHistory{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetScheduledQueryHistory{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetScheduledQueryHistory"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetScheduledQueryHistoryValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetScheduledQueryHistory(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// GetScheduledQueryHistoryPaginatorOptions is the paginator options for +// GetScheduledQueryHistory +type GetScheduledQueryHistoryPaginatorOptions struct { + // The maximum number of history records to return. Valid range is 1 to 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 +} + +// GetScheduledQueryHistoryPaginator is a paginator for GetScheduledQueryHistory +type GetScheduledQueryHistoryPaginator struct { + options GetScheduledQueryHistoryPaginatorOptions + client GetScheduledQueryHistoryAPIClient + params *GetScheduledQueryHistoryInput + nextToken *string + firstPage bool +} + +// NewGetScheduledQueryHistoryPaginator returns a new +// GetScheduledQueryHistoryPaginator +func NewGetScheduledQueryHistoryPaginator(client GetScheduledQueryHistoryAPIClient, params *GetScheduledQueryHistoryInput, optFns ...func(*GetScheduledQueryHistoryPaginatorOptions)) *GetScheduledQueryHistoryPaginator { + if params == nil { + params = &GetScheduledQueryHistoryInput{} + } + + options := GetScheduledQueryHistoryPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &GetScheduledQueryHistoryPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *GetScheduledQueryHistoryPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next GetScheduledQueryHistory page. +func (p *GetScheduledQueryHistoryPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetScheduledQueryHistoryOutput, 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 + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.GetScheduledQueryHistory(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 +} + +// GetScheduledQueryHistoryAPIClient is a client that implements the +// GetScheduledQueryHistory operation. +type GetScheduledQueryHistoryAPIClient interface { + GetScheduledQueryHistory(context.Context, *GetScheduledQueryHistoryInput, ...func(*Options)) (*GetScheduledQueryHistoryOutput, error) +} + +var _ GetScheduledQueryHistoryAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opGetScheduledQueryHistory(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetScheduledQueryHistory", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_GetTransformer.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_GetTransformer.go new file mode 100644 index 00000000000..d20cb9557b0 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_GetTransformer.go @@ -0,0 +1,173 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns the information about the log transformer associated with this log +// group. +// +// This operation returns data only for transformers created at the log group +// level. To get information for an account-level transformer, use [DescribeAccountPolicies]. +// +// [DescribeAccountPolicies]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeAccountPolicies.html +func (c *Client) GetTransformer(ctx context.Context, params *GetTransformerInput, optFns ...func(*Options)) (*GetTransformerOutput, error) { + if params == nil { + params = &GetTransformerInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetTransformer", params, optFns, c.addOperationGetTransformerMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetTransformerOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetTransformerInput struct { + + // Specify either the name or ARN of the log group to return transformer + // information for. If the log group is in a source account and you are using a + // monitoring account, you must use the log group ARN. + // + // This member is required. + LogGroupIdentifier *string + + noSmithyDocumentSerde +} + +type GetTransformerOutput struct { + + // The creation time of the transformer, expressed as the number of milliseconds + // after Jan 1, 1970 00:00:00 UTC. + CreationTime *int64 + + // The date and time when this transformer was most recently modified, expressed + // as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. + LastModifiedTime *int64 + + // The ARN of the log group that you specified in your request. + LogGroupIdentifier *string + + // This sructure contains the configuration of the requested transformer. + TransformerConfig []types.Processor + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetTransformerMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetTransformer{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetTransformer{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetTransformer"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetTransformerValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetTransformer(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetTransformer(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetTransformer", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_ListAggregateLogGroupSummaries.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_ListAggregateLogGroupSummaries.go new file mode 100644 index 00000000000..976809e3871 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_ListAggregateLogGroupSummaries.go @@ -0,0 +1,316 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns an aggregate summary of all log groups in the Region grouped by +// specified data source characteristics. Supports optional filtering by log group +// class, name patterns, and data sources. If you perform this action in a +// monitoring account, you can also return aggregated summaries of log groups from +// source accounts that are linked to the monitoring account. For more information +// about using cross-account observability to set up monitoring accounts and source +// accounts, see [CloudWatch cross-account observability]. +// +// The operation aggregates log groups by data source name and type and optionally +// format, providing counts of log groups that share these characteristics. The +// operation paginates results. By default, it returns up to 50 results and +// includes a token to retrieve more results. +// +// [CloudWatch cross-account observability]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html +func (c *Client) ListAggregateLogGroupSummaries(ctx context.Context, params *ListAggregateLogGroupSummariesInput, optFns ...func(*Options)) (*ListAggregateLogGroupSummariesOutput, error) { + if params == nil { + params = &ListAggregateLogGroupSummariesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListAggregateLogGroupSummaries", params, optFns, c.addOperationListAggregateLogGroupSummariesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListAggregateLogGroupSummariesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListAggregateLogGroupSummariesInput struct { + + // Specifies how to group the log groups in the summary. + // + // This member is required. + GroupBy types.ListAggregateLogGroupSummariesGroupBy + + // When includeLinkedAccounts is set to true , use this parameter to specify the + // list of accounts to search. You can specify as many as 20 account IDs in the + // array. + AccountIdentifiers []string + + // Filters the results by data source characteristics to include only log groups + // associated with the specified data sources. + DataSources []types.DataSourceFilter + + // If you are using a monitoring account, set this to true to have the operation + // return log groups in the accounts listed in accountIdentifiers . + // + // If this parameter is set to true and accountIdentifiers contains a null value, + // the operation returns all log groups in the monitoring account and all log + // groups in all source accounts that are linked to the monitoring account. + // + // The default for this parameter is false . + IncludeLinkedAccounts *bool + + // The maximum number of aggregated summaries to return. If you omit this + // parameter, the default is up to 50 aggregated summaries. + Limit *int32 + + // Filters the results by log group class to include only log groups of the + // specified class. + LogGroupClass types.LogGroupClass + + // Use this parameter to limit the returned log groups to only those with names + // that match the pattern that you specify. This parameter is a regular expression + // that can match prefixes and substrings, and supports wildcard matching and + // matching multiple patterns, as in the following examples. + // + // - Use ^ to match log group names by prefix. + // + // - For a substring match, specify the string to match. All matches are case + // sensitive + // + // - To match multiple patterns, separate them with a | as in the example + // ^/aws/lambda|discovery + // + // You can specify as many as five different regular expression patterns in this + // field, each of which must be between 3 and 24 characters. You can include the ^ + // symbol as many as five times, and include the | symbol as many as four times. + LogGroupNamePattern *string + + // The token for the next set of items to return. The token expires after 24 hours. + NextToken *string + + noSmithyDocumentSerde +} + +type ListAggregateLogGroupSummariesOutput struct { + + // The list of aggregate log group summaries grouped by the specified data source + // characteristics. + AggregateLogGroupSummaries []types.AggregateLogGroupSummary + + // The token for the next set of items to return. The token expires after 24 hours. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListAggregateLogGroupSummariesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListAggregateLogGroupSummaries{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListAggregateLogGroupSummaries{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListAggregateLogGroupSummaries"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpListAggregateLogGroupSummariesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAggregateLogGroupSummaries(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// ListAggregateLogGroupSummariesPaginatorOptions is the paginator options for +// ListAggregateLogGroupSummaries +type ListAggregateLogGroupSummariesPaginatorOptions struct { + // The maximum number of aggregated summaries to return. If you omit this + // parameter, the default is up to 50 aggregated summaries. + 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 +} + +// ListAggregateLogGroupSummariesPaginator is a paginator for +// ListAggregateLogGroupSummaries +type ListAggregateLogGroupSummariesPaginator struct { + options ListAggregateLogGroupSummariesPaginatorOptions + client ListAggregateLogGroupSummariesAPIClient + params *ListAggregateLogGroupSummariesInput + nextToken *string + firstPage bool +} + +// NewListAggregateLogGroupSummariesPaginator returns a new +// ListAggregateLogGroupSummariesPaginator +func NewListAggregateLogGroupSummariesPaginator(client ListAggregateLogGroupSummariesAPIClient, params *ListAggregateLogGroupSummariesInput, optFns ...func(*ListAggregateLogGroupSummariesPaginatorOptions)) *ListAggregateLogGroupSummariesPaginator { + if params == nil { + params = &ListAggregateLogGroupSummariesInput{} + } + + options := ListAggregateLogGroupSummariesPaginatorOptions{} + if params.Limit != nil { + options.Limit = *params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListAggregateLogGroupSummariesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListAggregateLogGroupSummariesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListAggregateLogGroupSummaries page. +func (p *ListAggregateLogGroupSummariesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAggregateLogGroupSummariesOutput, 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.Limit = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListAggregateLogGroupSummaries(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 +} + +// ListAggregateLogGroupSummariesAPIClient is a client that implements the +// ListAggregateLogGroupSummaries operation. +type ListAggregateLogGroupSummariesAPIClient interface { + ListAggregateLogGroupSummaries(context.Context, *ListAggregateLogGroupSummariesInput, ...func(*Options)) (*ListAggregateLogGroupSummariesOutput, error) +} + +var _ ListAggregateLogGroupSummariesAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListAggregateLogGroupSummaries(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListAggregateLogGroupSummaries", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_ListAnomalies.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_ListAnomalies.go new file mode 100644 index 00000000000..f14ae641557 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_ListAnomalies.go @@ -0,0 +1,260 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a list of anomalies that log anomaly detectors have found. For details +// about the structure format of each anomaly object that is returned, see the +// example in this section. +func (c *Client) ListAnomalies(ctx context.Context, params *ListAnomaliesInput, optFns ...func(*Options)) (*ListAnomaliesOutput, error) { + if params == nil { + params = &ListAnomaliesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListAnomalies", params, optFns, c.addOperationListAnomaliesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListAnomaliesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListAnomaliesInput struct { + + // Use this to optionally limit the results to only the anomalies found by a + // certain anomaly detector. + AnomalyDetectorArn *string + + // The maximum number of items to return. If you don't specify a value, the + // default maximum value of 50 items is used. + Limit *int32 + + // The token for the next set of items to return. The token expires after 24 hours. + NextToken *string + + // You can specify this parameter if you want to the operation to return only + // anomalies that are currently either suppressed or unsuppressed. + SuppressionState types.SuppressionState + + noSmithyDocumentSerde +} + +type ListAnomaliesOutput struct { + + // An array of structures, where each structure contains information about one + // anomaly that a log anomaly detector has found. + Anomalies []types.Anomaly + + // The token for the next set of items to return. The token expires after 24 hours. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListAnomaliesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListAnomalies{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListAnomalies{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListAnomalies"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAnomalies(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// ListAnomaliesPaginatorOptions is the paginator options for ListAnomalies +type ListAnomaliesPaginatorOptions struct { + // The maximum number of items to return. If you don't specify a value, the + // default maximum value of 50 items is used. + 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 +} + +// ListAnomaliesPaginator is a paginator for ListAnomalies +type ListAnomaliesPaginator struct { + options ListAnomaliesPaginatorOptions + client ListAnomaliesAPIClient + params *ListAnomaliesInput + nextToken *string + firstPage bool +} + +// NewListAnomaliesPaginator returns a new ListAnomaliesPaginator +func NewListAnomaliesPaginator(client ListAnomaliesAPIClient, params *ListAnomaliesInput, optFns ...func(*ListAnomaliesPaginatorOptions)) *ListAnomaliesPaginator { + if params == nil { + params = &ListAnomaliesInput{} + } + + options := ListAnomaliesPaginatorOptions{} + if params.Limit != nil { + options.Limit = *params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListAnomaliesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListAnomaliesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListAnomalies page. +func (p *ListAnomaliesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAnomaliesOutput, 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.Limit = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListAnomalies(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 +} + +// ListAnomaliesAPIClient is a client that implements the ListAnomalies operation. +type ListAnomaliesAPIClient interface { + ListAnomalies(context.Context, *ListAnomaliesInput, ...func(*Options)) (*ListAnomaliesOutput, error) +} + +var _ ListAnomaliesAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListAnomalies(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListAnomalies", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_ListIntegrations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_ListIntegrations.go new file mode 100644 index 00000000000..ffa2fc80fda --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_ListIntegrations.go @@ -0,0 +1,160 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a list of integrations between CloudWatch Logs and other services in +// this account. Currently, only one integration can be created in an account, and +// this integration must be with OpenSearch Service. +func (c *Client) ListIntegrations(ctx context.Context, params *ListIntegrationsInput, optFns ...func(*Options)) (*ListIntegrationsOutput, error) { + if params == nil { + params = &ListIntegrationsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListIntegrations", params, optFns, c.addOperationListIntegrationsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListIntegrationsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListIntegrationsInput struct { + + // To limit the results to integrations that start with a certain name prefix, + // specify that name prefix here. + IntegrationNamePrefix *string + + // To limit the results to integrations with a certain status, specify that status + // here. + IntegrationStatus types.IntegrationStatus + + // To limit the results to integrations of a certain type, specify that type here. + IntegrationType types.IntegrationType + + noSmithyDocumentSerde +} + +type ListIntegrationsOutput struct { + + // An array, where each object in the array contains information about one + // CloudWatch Logs integration in this account. + IntegrationSummaries []types.IntegrationSummary + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListIntegrationsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListIntegrations{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListIntegrations{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListIntegrations"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListIntegrations(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListIntegrations(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListIntegrations", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_ListLogAnomalyDetectors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_ListLogAnomalyDetectors.go new file mode 100644 index 00000000000..99abaefd981 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_ListLogAnomalyDetectors.go @@ -0,0 +1,257 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves a list of the log anomaly detectors in the account. +func (c *Client) ListLogAnomalyDetectors(ctx context.Context, params *ListLogAnomalyDetectorsInput, optFns ...func(*Options)) (*ListLogAnomalyDetectorsOutput, error) { + if params == nil { + params = &ListLogAnomalyDetectorsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListLogAnomalyDetectors", params, optFns, c.addOperationListLogAnomalyDetectorsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListLogAnomalyDetectorsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListLogAnomalyDetectorsInput struct { + + // Use this to optionally filter the results to only include anomaly detectors + // that are associated with the specified log group. + FilterLogGroupArn *string + + // The maximum number of items to return. If you don't specify a value, the + // default maximum value of 50 items is used. + Limit *int32 + + // The token for the next set of items to return. The token expires after 24 hours. + NextToken *string + + noSmithyDocumentSerde +} + +type ListLogAnomalyDetectorsOutput struct { + + // An array of structures, where each structure in the array contains information + // about one anomaly detector. + AnomalyDetectors []types.AnomalyDetector + + // The token for the next set of items to return. The token expires after 24 hours. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListLogAnomalyDetectorsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListLogAnomalyDetectors{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListLogAnomalyDetectors{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListLogAnomalyDetectors"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListLogAnomalyDetectors(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// ListLogAnomalyDetectorsPaginatorOptions is the paginator options for +// ListLogAnomalyDetectors +type ListLogAnomalyDetectorsPaginatorOptions struct { + // The maximum number of items to return. If you don't specify a value, the + // default maximum value of 50 items is used. + 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 +} + +// ListLogAnomalyDetectorsPaginator is a paginator for ListLogAnomalyDetectors +type ListLogAnomalyDetectorsPaginator struct { + options ListLogAnomalyDetectorsPaginatorOptions + client ListLogAnomalyDetectorsAPIClient + params *ListLogAnomalyDetectorsInput + nextToken *string + firstPage bool +} + +// NewListLogAnomalyDetectorsPaginator returns a new +// ListLogAnomalyDetectorsPaginator +func NewListLogAnomalyDetectorsPaginator(client ListLogAnomalyDetectorsAPIClient, params *ListLogAnomalyDetectorsInput, optFns ...func(*ListLogAnomalyDetectorsPaginatorOptions)) *ListLogAnomalyDetectorsPaginator { + if params == nil { + params = &ListLogAnomalyDetectorsInput{} + } + + options := ListLogAnomalyDetectorsPaginatorOptions{} + if params.Limit != nil { + options.Limit = *params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListLogAnomalyDetectorsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListLogAnomalyDetectorsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListLogAnomalyDetectors page. +func (p *ListLogAnomalyDetectorsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListLogAnomalyDetectorsOutput, 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.Limit = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListLogAnomalyDetectors(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 +} + +// ListLogAnomalyDetectorsAPIClient is a client that implements the +// ListLogAnomalyDetectors operation. +type ListLogAnomalyDetectorsAPIClient interface { + ListLogAnomalyDetectors(context.Context, *ListLogAnomalyDetectorsInput, ...func(*Options)) (*ListLogAnomalyDetectorsOutput, error) +} + +var _ ListLogAnomalyDetectorsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListLogAnomalyDetectors(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListLogAnomalyDetectors", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_ListLogGroups.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_ListLogGroups.go new file mode 100644 index 00000000000..7adc191d61b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_ListLogGroups.go @@ -0,0 +1,226 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a list of log groups in the Region in your account. If you are +// performing this action in a monitoring account, you can choose to also return +// log groups from source accounts that are linked to the monitoring account. For +// more information about using cross-account observability to set up monitoring +// accounts and source accounts, see [CloudWatch cross-account observability]. +// +// You can optionally filter the list by log group class, by using regular +// expressions in your request to match strings in the log group names, by using +// the fieldIndexes parameter to filter log groups based on which field indexes are +// configured, by using the dataSources parameter to filter log groups by data +// source types, and by using the fieldIndexNames parameter to filter by specific +// field index names. +// +// This operation is paginated. By default, your first use of this operation +// returns 50 results, and includes a token to use in a subsequent operation to +// return more results. +// +// [CloudWatch cross-account observability]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html +func (c *Client) ListLogGroups(ctx context.Context, params *ListLogGroupsInput, optFns ...func(*Options)) (*ListLogGroupsOutput, error) { + if params == nil { + params = &ListLogGroupsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListLogGroups", params, optFns, c.addOperationListLogGroupsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListLogGroupsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListLogGroupsInput struct { + + // When includeLinkedAccounts is set to true , use this parameter to specify the + // list of accounts to search. You can specify as many as 20 account IDs in the + // array. + AccountIdentifiers []string + + // An array of data source filters to filter log groups by their associated data + // sources. You can filter by data source name, type, or both. Multiple filters + // within the same dimension are combined with OR logic, while filters across + // different dimensions are combined with AND logic. + DataSources []types.DataSourceFilter + + // An array of field index names to filter log groups that have specific field + // indexes. Only log groups containing all specified field indexes are returned. + // You can specify 1 to 20 field index names, each with 1 to 512 characters. + FieldIndexNames []string + + // If you are using a monitoring account, set this to true to have the operation + // return log groups in the accounts listed in accountIdentifiers . + // + // If this parameter is set to true and accountIdentifiers contains a null value, + // the operation returns all log groups in the monitoring account and all log + // groups in all source accounts that are linked to the monitoring account. + // + // The default for this parameter is false . + IncludeLinkedAccounts *bool + + // The maximum number of log groups to return. If you omit this parameter, the + // default is up to 50 log groups. + Limit *int32 + + // Use this parameter to limit the results to only those log groups in the + // specified log group class. If you omit this parameter, log groups of all classes + // can be returned. + LogGroupClass types.LogGroupClass + + // Use this parameter to limit the returned log groups to only those with names + // that match the pattern that you specify. This parameter is a regular expression + // that can match prefixes and substrings, and supports wildcard matching and + // matching multiple patterns, as in the following examples. + // + // - Use ^ to match log group names by prefix. + // + // - For a substring match, specify the string to match. All matches are case + // sensitive + // + // - To match multiple patterns, separate them with a | as in the example + // ^/aws/lambda|discovery + // + // You can specify as many as five different regular expression patterns in this + // field, each of which must be between 3 and 24 characters. You can include the ^ + // symbol as many as five times, and include the | symbol as many as four times. + LogGroupNamePattern *string + + // The token for the next set of items to return. The token expires after 24 hours. + NextToken *string + + noSmithyDocumentSerde +} + +type ListLogGroupsOutput struct { + + // An array of structures, where each structure contains the information about one + // log group. + LogGroups []types.LogGroupSummary + + // The token for the next set of items to return. The token expires after 24 hours. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListLogGroupsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListLogGroups{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListLogGroups{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListLogGroups"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpListLogGroupsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListLogGroups(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListLogGroups(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListLogGroups", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_ListLogGroupsForQuery.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_ListLogGroupsForQuery.go new file mode 100644 index 00000000000..e8edc981898 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_ListLogGroupsForQuery.go @@ -0,0 +1,267 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a list of the log groups that were analyzed during a single CloudWatch +// Logs Insights query. This can be useful for queries that use log group name +// prefixes or the filterIndex command, because the log groups are dynamically +// selected in these cases. +// +// For more information about field indexes, see [Create field indexes to improve query performance and reduce costs]. +// +// [Create field indexes to improve query performance and reduce costs]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatchLogs-Field-Indexing.html +func (c *Client) ListLogGroupsForQuery(ctx context.Context, params *ListLogGroupsForQueryInput, optFns ...func(*Options)) (*ListLogGroupsForQueryOutput, error) { + if params == nil { + params = &ListLogGroupsForQueryInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListLogGroupsForQuery", params, optFns, c.addOperationListLogGroupsForQueryMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListLogGroupsForQueryOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListLogGroupsForQueryInput struct { + + // The ID of the query to use. This query ID is from the response to your [StartQuery] + // operation. + // + // [StartQuery]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_StartQuery.html + // + // This member is required. + QueryId *string + + // Limits the number of returned log groups to the specified number. + MaxResults *int32 + + // The token for the next set of items to return. The token expires after 24 hours. + NextToken *string + + noSmithyDocumentSerde +} + +type ListLogGroupsForQueryOutput struct { + + // An array of the names and ARNs of the log groups that were processed in the + // query. + LogGroupIdentifiers []string + + // The token for the next set of items to return. The token expires after 24 hours. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListLogGroupsForQueryMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListLogGroupsForQuery{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListLogGroupsForQuery{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListLogGroupsForQuery"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpListLogGroupsForQueryValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListLogGroupsForQuery(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// ListLogGroupsForQueryPaginatorOptions is the paginator options for +// ListLogGroupsForQuery +type ListLogGroupsForQueryPaginatorOptions struct { + // Limits the number of returned log groups to the specified number. + 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 +} + +// ListLogGroupsForQueryPaginator is a paginator for ListLogGroupsForQuery +type ListLogGroupsForQueryPaginator struct { + options ListLogGroupsForQueryPaginatorOptions + client ListLogGroupsForQueryAPIClient + params *ListLogGroupsForQueryInput + nextToken *string + firstPage bool +} + +// NewListLogGroupsForQueryPaginator returns a new ListLogGroupsForQueryPaginator +func NewListLogGroupsForQueryPaginator(client ListLogGroupsForQueryAPIClient, params *ListLogGroupsForQueryInput, optFns ...func(*ListLogGroupsForQueryPaginatorOptions)) *ListLogGroupsForQueryPaginator { + if params == nil { + params = &ListLogGroupsForQueryInput{} + } + + options := ListLogGroupsForQueryPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListLogGroupsForQueryPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListLogGroupsForQueryPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListLogGroupsForQuery page. +func (p *ListLogGroupsForQueryPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListLogGroupsForQueryOutput, 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 + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListLogGroupsForQuery(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 +} + +// ListLogGroupsForQueryAPIClient is a client that implements the +// ListLogGroupsForQuery operation. +type ListLogGroupsForQueryAPIClient interface { + ListLogGroupsForQuery(context.Context, *ListLogGroupsForQueryInput, ...func(*Options)) (*ListLogGroupsForQueryOutput, error) +} + +var _ ListLogGroupsForQueryAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListLogGroupsForQuery(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListLogGroupsForQuery", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_ListScheduledQueries.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_ListScheduledQueries.go new file mode 100644 index 00000000000..daf9b76233f --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_ListScheduledQueries.go @@ -0,0 +1,254 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists all scheduled queries in your account and region. You can filter results +// by state to show only enabled or disabled queries. +func (c *Client) ListScheduledQueries(ctx context.Context, params *ListScheduledQueriesInput, optFns ...func(*Options)) (*ListScheduledQueriesOutput, error) { + if params == nil { + params = &ListScheduledQueriesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListScheduledQueries", params, optFns, c.addOperationListScheduledQueriesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListScheduledQueriesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListScheduledQueriesInput struct { + + // The maximum number of scheduled queries to return. Valid range is 1 to 1000. + MaxResults *int32 + + // The token for the next set of items to return. The token expires after 24 hours. + NextToken *string + + // Filter scheduled queries by state. Valid values are ENABLED and DISABLED . If + // not specified, all scheduled queries are returned. + State types.ScheduledQueryState + + noSmithyDocumentSerde +} + +type ListScheduledQueriesOutput struct { + + // The token for the next set of items to return. The token expires after 24 hours. + NextToken *string + + // An array of scheduled query summary information. + ScheduledQueries []types.ScheduledQuerySummary + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListScheduledQueriesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListScheduledQueries{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListScheduledQueries{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListScheduledQueries"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListScheduledQueries(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// ListScheduledQueriesPaginatorOptions is the paginator options for +// ListScheduledQueries +type ListScheduledQueriesPaginatorOptions struct { + // The maximum number of scheduled queries to return. Valid range is 1 to 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 +} + +// ListScheduledQueriesPaginator is a paginator for ListScheduledQueries +type ListScheduledQueriesPaginator struct { + options ListScheduledQueriesPaginatorOptions + client ListScheduledQueriesAPIClient + params *ListScheduledQueriesInput + nextToken *string + firstPage bool +} + +// NewListScheduledQueriesPaginator returns a new ListScheduledQueriesPaginator +func NewListScheduledQueriesPaginator(client ListScheduledQueriesAPIClient, params *ListScheduledQueriesInput, optFns ...func(*ListScheduledQueriesPaginatorOptions)) *ListScheduledQueriesPaginator { + if params == nil { + params = &ListScheduledQueriesInput{} + } + + options := ListScheduledQueriesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListScheduledQueriesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListScheduledQueriesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListScheduledQueries page. +func (p *ListScheduledQueriesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListScheduledQueriesOutput, 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 + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListScheduledQueries(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 +} + +// ListScheduledQueriesAPIClient is a client that implements the +// ListScheduledQueries operation. +type ListScheduledQueriesAPIClient interface { + ListScheduledQueries(context.Context, *ListScheduledQueriesInput, ...func(*Options)) (*ListScheduledQueriesOutput, error) +} + +var _ ListScheduledQueriesAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListScheduledQueries(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListScheduledQueries", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_ListSourcesForS3TableIntegration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_ListSourcesForS3TableIntegration.go new file mode 100644 index 00000000000..7c13bdf09d8 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_ListSourcesForS3TableIntegration.go @@ -0,0 +1,264 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a list of data source associations for a specified S3 Table +// Integration, showing which data sources are currently associated for query +// access. +func (c *Client) ListSourcesForS3TableIntegration(ctx context.Context, params *ListSourcesForS3TableIntegrationInput, optFns ...func(*Options)) (*ListSourcesForS3TableIntegrationOutput, error) { + if params == nil { + params = &ListSourcesForS3TableIntegrationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListSourcesForS3TableIntegration", params, optFns, c.addOperationListSourcesForS3TableIntegrationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListSourcesForS3TableIntegrationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListSourcesForS3TableIntegrationInput struct { + + // The Amazon Resource Name (ARN) of the S3 Table Integration to list associations + // for. + // + // This member is required. + IntegrationArn *string + + // The maximum number of associations to return in a single call. Valid range is 1 + // to 100. + MaxResults *int32 + + // The token for the next set of items to return. The token expires after 24 hours. + NextToken *string + + noSmithyDocumentSerde +} + +type ListSourcesForS3TableIntegrationOutput struct { + + // The token for the next set of items to return. The token expires after 24 hours. + NextToken *string + + // The list of data source associations for the specified S3 Table Integration. + Sources []types.S3TableIntegrationSource + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListSourcesForS3TableIntegrationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListSourcesForS3TableIntegration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListSourcesForS3TableIntegration{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListSourcesForS3TableIntegration"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpListSourcesForS3TableIntegrationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSourcesForS3TableIntegration(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// ListSourcesForS3TableIntegrationPaginatorOptions is the paginator options for +// ListSourcesForS3TableIntegration +type ListSourcesForS3TableIntegrationPaginatorOptions struct { + // The maximum number of associations to return in a single call. Valid range is 1 + // to 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 +} + +// ListSourcesForS3TableIntegrationPaginator is a paginator for +// ListSourcesForS3TableIntegration +type ListSourcesForS3TableIntegrationPaginator struct { + options ListSourcesForS3TableIntegrationPaginatorOptions + client ListSourcesForS3TableIntegrationAPIClient + params *ListSourcesForS3TableIntegrationInput + nextToken *string + firstPage bool +} + +// NewListSourcesForS3TableIntegrationPaginator returns a new +// ListSourcesForS3TableIntegrationPaginator +func NewListSourcesForS3TableIntegrationPaginator(client ListSourcesForS3TableIntegrationAPIClient, params *ListSourcesForS3TableIntegrationInput, optFns ...func(*ListSourcesForS3TableIntegrationPaginatorOptions)) *ListSourcesForS3TableIntegrationPaginator { + if params == nil { + params = &ListSourcesForS3TableIntegrationInput{} + } + + options := ListSourcesForS3TableIntegrationPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListSourcesForS3TableIntegrationPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListSourcesForS3TableIntegrationPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListSourcesForS3TableIntegration page. +func (p *ListSourcesForS3TableIntegrationPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListSourcesForS3TableIntegrationOutput, 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 + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListSourcesForS3TableIntegration(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 +} + +// ListSourcesForS3TableIntegrationAPIClient is a client that implements the +// ListSourcesForS3TableIntegration operation. +type ListSourcesForS3TableIntegrationAPIClient interface { + ListSourcesForS3TableIntegration(context.Context, *ListSourcesForS3TableIntegrationInput, ...func(*Options)) (*ListSourcesForS3TableIntegrationOutput, error) +} + +var _ ListSourcesForS3TableIntegrationAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListSourcesForS3TableIntegration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListSourcesForS3TableIntegration", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_ListTagsForResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_ListTagsForResource.go new file mode 100644 index 00000000000..e35a314a541 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_ListTagsForResource.go @@ -0,0 +1,164 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Displays the tags associated with a CloudWatch Logs resource. Currently, log +// groups and destinations support tagging. +func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, optFns ...func(*Options)) (*ListTagsForResourceOutput, error) { + if params == nil { + params = &ListTagsForResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListTagsForResource", params, optFns, c.addOperationListTagsForResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListTagsForResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListTagsForResourceInput struct { + + // The ARN of the resource that you want to view tags for. + // + // The ARN format of a log group is + // arn:aws:logs:Region:account-id:log-group:log-group-name + // + // The ARN format of a destination is + // arn:aws:logs:Region:account-id:destination:destination-name + // + // For more information about ARN format, see [CloudWatch Logs resources and operations]. + // + // [CloudWatch Logs resources and operations]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html + // + // This member is required. + ResourceArn *string + + noSmithyDocumentSerde +} + +type ListTagsForResourceOutput struct { + + // The list of tags associated with the requested resource.> + Tags map[string]string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListTagsForResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListTagsForResource{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListTagsForResource"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTagsForResource(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListTagsForResource", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_ListTagsLogGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_ListTagsLogGroup.go new file mode 100644 index 00000000000..1f005e5b76a --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_ListTagsLogGroup.go @@ -0,0 +1,160 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// The ListTagsLogGroup operation is on the path to deprecation. We recommend that +// you use [ListTagsForResource]instead. +// +// Lists the tags for the specified log group. +// +// Deprecated: Please use the generic tagging API ListTagsForResource +// +// [ListTagsForResource]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_ListTagsForResource.html +func (c *Client) ListTagsLogGroup(ctx context.Context, params *ListTagsLogGroupInput, optFns ...func(*Options)) (*ListTagsLogGroupOutput, error) { + if params == nil { + params = &ListTagsLogGroupInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListTagsLogGroup", params, optFns, c.addOperationListTagsLogGroupMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListTagsLogGroupOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListTagsLogGroupInput struct { + + // The name of the log group. + // + // This member is required. + LogGroupName *string + + noSmithyDocumentSerde +} + +type ListTagsLogGroupOutput struct { + + // The tags for the log group. + Tags map[string]string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListTagsLogGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListTagsLogGroup{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListTagsLogGroup{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListTagsLogGroup"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpListTagsLogGroupValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTagsLogGroup(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListTagsLogGroup(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListTagsLogGroup", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutAccountPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutAccountPolicy.go new file mode 100644 index 00000000000..ac71c68fe94 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutAccountPolicy.go @@ -0,0 +1,636 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates an account-level data protection policy, subscription filter policy, +// field index policy, transformer policy, or metric extraction policy that applies +// to all log groups, a subset of log groups, or a data source name and type +// combination in the account. +// +// For field index policies, you can configure indexed fields as facets to enable +// interactive exploration of your logs. Facets provide value distributions and +// counts for indexed fields in the CloudWatch Logs Insights console without +// requiring query execution. For more information, see [Use facets to group and explore logs]. +// +// To use this operation, you must be signed on with the correct permissions +// depending on the type of policy that you are creating. +// +// - To create a data protection policy, you must have the +// logs:PutDataProtectionPolicy and logs:PutAccountPolicy permissions. +// +// - To create a subscription filter policy, you must have the +// logs:PutSubscriptionFilter and logs:PutAccountPolicy permissions. +// +// - To create a transformer policy, you must have the logs:PutTransformer and +// logs:PutAccountPolicy permissions. +// +// - To create a field index policy, you must have the logs:PutIndexPolicy and +// logs:PutAccountPolicy permissions. +// +// - To configure facets for field index policies, you must have the +// logs:PutIndexPolicy and logs:PutAccountPolicy permissions. +// +// - To create a metric extraction policy, you must have the +// logs:PutMetricExtractionPolicy and logs:PutAccountPolicy permissions. +// +// # Data protection policy +// +// A data protection policy can help safeguard sensitive data that's ingested by +// your log groups by auditing and masking the sensitive log data. Each account can +// have only one account-level data protection policy. +// +// Sensitive data is detected and masked when it is ingested into a log group. +// When you set a data protection policy, log events ingested into the log groups +// before that time are not masked. +// +// If you use PutAccountPolicy to create a data protection policy for your whole +// account, it applies to both existing log groups and all log groups that are +// created later in this account. The account-level policy is applied to existing +// log groups with eventual consistency. It might take up to 5 minutes before +// sensitive data in existing log groups begins to be masked. +// +// By default, when a user views a log event that includes masked data, the +// sensitive data is replaced by asterisks. A user who has the logs:Unmask +// permission can use a [GetLogEvents]or [FilterLogEvents] operation with the unmask parameter set to true to +// view the unmasked log events. Users with the logs:Unmask can also view unmasked +// data in the CloudWatch Logs console by running a CloudWatch Logs Insights query +// with the unmask query command. +// +// For more information, including a list of types of data that can be audited and +// masked, see [Protect sensitive log data with masking]. +// +// To use the PutAccountPolicy operation for a data protection policy, you must be +// signed on with the logs:PutDataProtectionPolicy and logs:PutAccountPolicy +// permissions. +// +// The PutAccountPolicy operation applies to all log groups in the account. You +// can use [PutDataProtectionPolicy]to create a data protection policy that applies to just one log group. +// If a log group has its own data protection policy and the account also has an +// account-level data protection policy, then the two policies are cumulative. Any +// sensitive term specified in either policy is masked. +// +// # Subscription filter policy +// +// A subscription filter policy sets up a real-time feed of log events from +// CloudWatch Logs to other Amazon Web Services services. Account-level +// subscription filter policies apply to both existing log groups and log groups +// that are created later in this account. Supported destinations are Kinesis Data +// Streams, Firehose, and Lambda. When log events are sent to the receiving +// service, they are Base64 encoded and compressed with the GZIP format. +// +// The following destinations are supported for subscription filters: +// +// - An Kinesis Data Streams data stream in the same account as the subscription +// policy, for same-account delivery. +// +// - An Firehose data stream in the same account as the subscription policy, for +// same-account delivery. +// +// - A Lambda function in the same account as the subscription policy, for +// same-account delivery. +// +// - A logical destination in a different account created with [PutDestination], for +// cross-account delivery. Kinesis Data Streams and Firehose are supported as +// logical destinations. +// +// Each account can have one account-level subscription filter policy per Region. +// If you are updating an existing filter, you must specify the correct name in +// PolicyName . To perform a PutAccountPolicy subscription filter operation for +// any destination except a Lambda function, you must also have the iam:PassRole +// permission. +// +// # Transformer policy +// +// Creates or updates a log transformer policy for your account. You use log +// transformers to transform log events into a different format, making them easier +// for you to process and analyze. You can also transform logs from different +// sources into standardized formats that contain relevant, source-specific +// information. After you have created a transformer, CloudWatch Logs performs this +// transformation at the time of log ingestion. You can then refer to the +// transformed versions of the logs during operations such as querying with +// CloudWatch Logs Insights or creating metric filters or subscription filters. +// +// You can also use a transformer to copy metadata from metadata keys into the log +// events themselves. This metadata can include log group name, log stream name, +// account ID and Region. +// +// A transformer for a log group is a series of processors, where each processor +// applies one type of transformation to the log events ingested into this log +// group. For more information about the available processors to use in a +// transformer, see [Processors that you can use]. +// +// Having log events in standardized format enables visibility across your +// applications for your log analysis, reporting, and alarming needs. CloudWatch +// Logs provides transformation for common log types with out-of-the-box +// transformation templates for major Amazon Web Services log sources such as VPC +// flow logs, Lambda, and Amazon RDS. You can use pre-built transformation +// templates or create custom transformation policies. +// +// You can create transformers only for the log groups in the Standard log class. +// +// You can have one account-level transformer policy that applies to all log +// groups in the account. Or you can create as many as 20 account-level transformer +// policies that are each scoped to a subset of log groups with the +// selectionCriteria parameter. If you have multiple account-level transformer +// policies with selection criteria, no two of them can use the same or overlapping +// log group name prefixes. For example, if you have one policy filtered to log +// groups that start with my-log , you can't have another transformer policy +// filtered to my-logpprod or my-logging . +// +// You can also set up a transformer at the log-group level. For more information, +// see [PutTransformer]. If there is both a log-group level transformer created with PutTransformer +// and an account-level transformer that could apply to the same log group, the log +// group uses only the log-group level transformer. It ignores the account-level +// transformer. +// +// # Field index policy +// +// You can use field index policies to create indexes on fields found in log +// events for a log group or data source name and type combination. Creating field +// indexes can help lower the scan volume for CloudWatch Logs Insights queries that +// reference those fields, because these queries attempt to skip the processing of +// log events that are known to not match the indexed field. Good fields to index +// are fields that you often need to query for and fields or values that match only +// a small fraction of the total log events. Common examples of indexes include +// request ID, session ID, user IDs, or instance IDs. For more information, see [Create field indexes to improve query performance and reduce costs] +// +// To find the fields that are in your log group events, use the [GetLogGroupFields] operation. To +// find the fields for a data source use the [GetLogFields]operation. +// +// For example, suppose you have created a field index for requestId . Then, any +// CloudWatch Logs Insights query on that log group that includes requestId = +// value or requestId in [value, value, ...] will attempt to process only the log +// events where the indexed field matches the specified value. +// +// Matches of log events to the names of indexed fields are case-sensitive. For +// example, an indexed field of RequestId won't match a log event containing +// requestId . +// +// You can have one account-level field index policy that applies to all log +// groups in the account. Or you can create as many as 20 account-level field index +// policies that are each scoped to a subset of log groups using LogGroupNamePrefix +// with the selectionCriteria parameter. You can have another 20 account-level +// field index policies using DataSourceName and DataSourceType for the +// selectionCriteria parameter. If you have multiple account-level index policies +// with LogGroupNamePrefix selection criteria, no two of them can use the same or +// overlapping log group name prefixes. For example, if you have one policy +// filtered to log groups that start with my-log, you can't have another field +// index policy filtered to my-logpprod or my-logging. Similarly, if you have +// multiple account-level index policies with DataSourceName and DataSourceType +// selection criteria, no two of them can use the same data source name and type +// combination. For example, if you have one policy filtered to the data source +// name amazon_vpc and data source type flow you cannot create another policy with +// this combination. +// +// If you create an account-level field index policy in a monitoring account in +// cross-account observability, the policy is applied only to the monitoring +// account and not to any source accounts. +// +// CloudWatch Logs provides default field indexes for all log groups in the +// Standard log class. Default field indexes are automatically available for the +// following fields: +// +// - @logStream +// +// - @aws.region +// +// - @aws.account +// +// - @source.log +// +// - @data_source_name +// +// - @data_source_type +// +// - @data_format +// +// - traceId +// +// - severityText +// +// - attributes.session.id +// +// CloudWatch Logs provides default field indexes for certain data source name and +// type combinations as well. Default field indexes are automatically available for +// the following data source name and type combinations as identified in the +// following list: +// +// amazon_vpc.flow +// +// - action +// +// - logStatus +// +// - region +// +// - flowDirection +// +// - type +// +// amazon_route53.resolver_query +// +// - transport +// +// - rcode +// +// aws_waf.access +// +// - action +// +// - httpRequest.country +// +// aws_cloudtrail.data , aws_cloudtrail.management +// +// - eventSource +// +// - eventName +// +// - awsRegion +// +// - userAgent +// +// - errorCode +// +// - eventType +// +// - managementEvent +// +// - readOnly +// +// - eventCategory +// +// - requestId +// +// Default field indexes are in addition to any custom field indexes you define +// within your policy. Default field indexes are not counted towards your [field index quota]. +// +// If you want to create a field index policy for a single log group, you can use [PutIndexPolicy] +// instead of PutAccountPolicy . If you do so, that log group will use that +// log-group level policy and any account-level policies that match at the data +// source level; any account-level policy that matches at the log group level (for +// example, no selection criteria or log group name prefix selection criteria) will +// be ignored. +// +// # Metric extraction policy +// +// A metric extraction policy controls whether CloudWatch Metrics can be created +// through the Embedded Metrics Format (EMF) for log groups in your account. By +// default, EMF metric creation is enabled for all log groups. You can use metric +// extraction policies to disable EMF metric creation for your entire account or +// specific log groups. +// +// When a policy disables EMF metric creation for a log group, log events in the +// EMF format are still ingested, but no CloudWatch Metrics are created from them. +// +// Creating a policy disables metrics for Amazon Web Services features that use +// EMF to create metrics, such as CloudWatch Container Insights and CloudWatch +// Application Signals. To prevent turning off those features by accident, we +// recommend that you exclude the underlying log-groups through a +// selection-criteria such as LogGroupNamePrefix NOT IN ["/aws/containerinsights", +// "/aws/ecs/containerinsights", "/aws/application-signals/data"] . +// +// Each account can have either one account-level metric extraction policy that +// applies to all log groups, or up to 5 policies that are each scoped to a subset +// of log groups with the selectionCriteria parameter. The selection criteria +// supports filtering by LogGroupName and LogGroupNamePrefix using the operators IN +// and NOT IN . You can specify up to 50 values in each IN or NOT IN list. +// +// The selection criteria can be specified in these formats: +// +// LogGroupName IN ["log-group-1", "log-group-2"] +// +// LogGroupNamePrefix NOT IN ["/aws/prefix1", "/aws/prefix2"] +// +// If you have multiple account-level metric extraction policies with selection +// criteria, no two of them can have overlapping criteria. For example, if you have +// one policy with selection criteria LogGroupNamePrefix IN ["my-log"] , you can't +// have another metric extraction policy with selection criteria +// LogGroupNamePrefix IN ["/my-log-prod"] or LogGroupNamePrefix IN ["/my-logging"] +// , as the set of log groups matching these prefixes would be a subset of the log +// groups matching the first policy's prefix, creating an overlap. +// +// When using NOT IN , only one policy with this operator is allowed per account. +// +// When combining policies with IN and NOT IN operators, the overlap check ensures +// that policies don't have conflicting effects. Two policies with IN and NOT IN +// operators do not overlap if and only if every value in the IN policy is +// completely contained within some value in the NOT IN policy. For example: +// +// - If you have a NOT IN policy for prefix "/aws/lambda" , you can create an IN +// policy for the exact log group name "/aws/lambda/function1" because the set of +// log groups matching "/aws/lambda/function1" is a subset of the log groups +// matching "/aws/lambda" . +// +// - If you have a NOT IN policy for prefix "/aws/lambda" , you cannot create an +// IN policy for prefix "/aws" because the set of log groups matching "/aws" is +// not a subset of the log groups matching "/aws/lambda" . +// +// [PutDestination]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDestination.html +// [PutTransformer]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutTransformer.html +// [GetLogFields]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetLogFields.html +// [PutDataProtectionPolicy]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDataProtectionPolicy.html +// [FilterLogEvents]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_FilterLogEvents.html +// [Processors that you can use]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-Processors +// [GetLogEvents]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetLogEvents.html +// [field index quota]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatchLogs-Field-Indexing-Syntax +// [PutIndexPolicy]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutIndexPolicy.html +// [Protect sensitive log data with masking]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/mask-sensitive-log-data.html +// [GetLogGroupFields]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetLogGroupFields.html +// [Use facets to group and explore logs]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatchLogs-Facets.html +// [Create field indexes to improve query performance and reduce costs]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatchLogs-Field-Indexing.html +func (c *Client) PutAccountPolicy(ctx context.Context, params *PutAccountPolicyInput, optFns ...func(*Options)) (*PutAccountPolicyOutput, error) { + if params == nil { + params = &PutAccountPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutAccountPolicy", params, optFns, c.addOperationPutAccountPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutAccountPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutAccountPolicyInput struct { + + // Specify the policy, in JSON. + // + // Data protection policy + // + // A data protection policy must include two JSON blocks: + // + // - The first block must include both a DataIdentifer array and an Operation + // property with an Audit action. The DataIdentifer array lists the types of + // sensitive data that you want to mask. For more information about the available + // options, see [Types of data that you can mask]. + // + // The Operation property with an Audit action is required to find the sensitive + // data terms. This Audit action must contain a FindingsDestination object. You + // can optionally use that FindingsDestination object to list one or more + // destinations to send audit findings to. If you specify destinations such as log + // groups, Firehose streams, and S3 buckets, they must already exist. + // + // - The second block must include both a DataIdentifer array and an Operation + // property with an Deidentify action. The DataIdentifer array must exactly match + // the DataIdentifer array in the first block of the policy. + // + // The Operation property with the Deidentify action is what actually masks the + // data, and it must contain the "MaskConfig": {} object. The "MaskConfig": {} + // object must be empty. + // + // For an example data protection policy, see the Examples section on this page. + // + // The contents of the two DataIdentifer arrays must match exactly. + // + // In addition to the two JSON blocks, the policyDocument can also include Name , + // Description , and Version fields. The Name is different than the operation's + // policyName parameter, and is used as a dimension when CloudWatch Logs reports + // audit findings metrics to CloudWatch. + // + // The JSON specified in policyDocument can be up to 30,720 characters long. + // + // Subscription filter policy + // + // A subscription filter policy can include the following attributes in a JSON + // block: + // + // - DestinationArn The ARN of the destination to deliver log events to. + // Supported destinations are: + // + // - An Kinesis Data Streams data stream in the same account as the subscription + // policy, for same-account delivery. + // + // - An Firehose data stream in the same account as the subscription policy, for + // same-account delivery. + // + // - A Lambda function in the same account as the subscription policy, for + // same-account delivery. + // + // - A logical destination in a different account created with [PutDestination], for + // cross-account delivery. Kinesis Data Streams and Firehose are supported as + // logical destinations. + // + // - RoleArn The ARN of an IAM role that grants CloudWatch Logs permissions to + // deliver ingested log events to the destination stream. You don't need to provide + // the ARN when you are working with a logical destination for cross-account + // delivery. + // + // - FilterPattern A filter pattern for subscribing to a filtered stream of log + // events. + // + // - Distribution The method used to distribute log data to the destination. By + // default, log data is grouped by log stream, but the grouping can be set to + // Random for a more even distribution. This property is only applicable when the + // destination is an Kinesis Data Streams data stream. + // + // Transformer policy + // + // A transformer policy must include one JSON block with the array of processors + // and their configurations. For more information about available processors, see [Processors that you can use] + // . + // + // Field index policy + // + // A field index filter policy can include the following attribute in a JSON block: + // + // - Fields The array of field indexes to create. + // + // - FieldsV2 The object of field indexes to create along with it's type. + // + // It must contain at least one field index. + // + // The following is an example of an index policy document that creates indexes + // with different types. + // + // "policyDocument": "{ \"Fields\": [ \"TransactionId\" ], \"FieldsV2\": + // {\"RequestId\": {\"type\": \"FIELD_INDEX\"}, \"APIName\": {\"type\": \"FACET\"}, + // \"StatusCode\": {\"type\": \"FACET\"}}}" + // + // You can use FieldsV2 to specify the type for each field. Supported types are + // FIELD_INDEX and FACET . Field names within Fields and FieldsV2 must be mutually + // exclusive. + // + // [PutDestination]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDestination.html + // [Processors that you can use]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-Processors + // [Types of data that you can mask]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/mask-sensitive-log-data-types.html + // + // This member is required. + PolicyDocument *string + + // A name for the policy. This must be unique within the account and cannot start + // with aws/ . + // + // This member is required. + PolicyName *string + + // The type of policy that you're creating or updating. + // + // This member is required. + PolicyType types.PolicyType + + // Currently the only valid value for this parameter is ALL , which specifies that + // the data protection policy applies to all log groups in the account. If you omit + // this parameter, the default of ALL is used. + Scope types.Scope + + // Use this parameter to apply the new policy to a subset of log groups in the + // account or a data source name and type combination. + // + // Specifying selectionCriteria is valid only when you specify + // SUBSCRIPTION_FILTER_POLICY , FIELD_INDEX_POLICY or TRANSFORMER_POLICY for + // policyType . + // + // - If policyType is SUBSCRIPTION_FILTER_POLICY , the only supported + // selectionCriteria filter is LogGroupName NOT IN [] + // + // - If policyType is TRANSFORMER_POLICY , the only supported selectionCriteria + // filter is LogGroupNamePrefix + // + // - If policyType is FIELD_INDEX_POLICY , the supported selectionCriteria + // filters are: + // + // - LogGroupNamePrefix + // + // - DataSourceName AND DataSourceType + // + // When you specify selectionCriteria for a field index policy you can use either + // LogGroupNamePrefix by itself or DataSourceName and DataSourceType together. + // + // The selectionCriteria string can be up to 25KB in length. The length is + // determined by using its UTF-8 bytes. + // + // Using the selectionCriteria parameter with SUBSCRIPTION_FILTER_POLICY is useful + // to help prevent infinite loops. For more information, see [Log recursion prevention]. + // + // [Log recursion prevention]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Subscriptions-recursion-prevention.html + SelectionCriteria *string + + noSmithyDocumentSerde +} + +type PutAccountPolicyOutput struct { + + // The account policy that you created. + AccountPolicy *types.AccountPolicy + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutAccountPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpPutAccountPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpPutAccountPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "PutAccountPolicy"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpPutAccountPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutAccountPolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opPutAccountPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "PutAccountPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutBearerTokenAuthentication.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutBearerTokenAuthentication.go new file mode 100644 index 00000000000..484b34d9bfc --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutBearerTokenAuthentication.go @@ -0,0 +1,172 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Enables or disables bearer token authentication for the specified log group. +// When enabled on a log group, bearer token authentication is enabled on +// operations until it is explicitly disabled. +// +// For information about the parameters that are common to all actions, see [Common Parameters]. +// +// [Common Parameters]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/CommonParameters.html +func (c *Client) PutBearerTokenAuthentication(ctx context.Context, params *PutBearerTokenAuthenticationInput, optFns ...func(*Options)) (*PutBearerTokenAuthenticationOutput, error) { + if params == nil { + params = &PutBearerTokenAuthenticationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutBearerTokenAuthentication", params, optFns, c.addOperationPutBearerTokenAuthenticationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutBearerTokenAuthenticationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutBearerTokenAuthenticationInput struct { + + // Whether to enable bearer token authentication. + // + // Type: Boolean + // + // Required: Yes + // + // This member is required. + BearerTokenAuthenticationEnabled *bool + + // The name or ARN of the log group. + // + // Type: String + // + // Length Constraints: Minimum length of 1. Maximum length of 512. + // + // Pattern: [\.\-_/#A-Za-z0-9]+ + // + // Required: Yes + // + // This member is required. + LogGroupIdentifier *string + + noSmithyDocumentSerde +} + +type PutBearerTokenAuthenticationOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutBearerTokenAuthenticationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpPutBearerTokenAuthentication{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpPutBearerTokenAuthentication{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "PutBearerTokenAuthentication"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpPutBearerTokenAuthenticationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutBearerTokenAuthentication(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opPutBearerTokenAuthentication(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "PutBearerTokenAuthentication", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutDataProtectionPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutDataProtectionPolicy.go new file mode 100644 index 00000000000..86b284ccfa1 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutDataProtectionPolicy.go @@ -0,0 +1,226 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a data protection policy for the specified log group. A data protection +// policy can help safeguard sensitive data that's ingested by the log group by +// auditing and masking the sensitive log data. +// +// Sensitive data is detected and masked when it is ingested into the log group. +// When you set a data protection policy, log events ingested into the log group +// before that time are not masked. +// +// By default, when a user views a log event that includes masked data, the +// sensitive data is replaced by asterisks. A user who has the logs:Unmask +// permission can use a [GetLogEvents]or [FilterLogEvents] operation with the unmask parameter set to true to +// view the unmasked log events. Users with the logs:Unmask can also view unmasked +// data in the CloudWatch Logs console by running a CloudWatch Logs Insights query +// with the unmask query command. +// +// For more information, including a list of types of data that can be audited and +// masked, see [Protect sensitive log data with masking]. +// +// The PutDataProtectionPolicy operation applies to only the specified log group. +// You can also use [PutAccountPolicy]to create an account-level data protection policy that applies +// to all log groups in the account, including both existing log groups and log +// groups that are created level. If a log group has its own data protection policy +// and the account also has an account-level data protection policy, then the two +// policies are cumulative. Any sensitive term specified in either policy is +// masked. +// +// [Protect sensitive log data with masking]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/mask-sensitive-log-data.html +// [FilterLogEvents]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_FilterLogEvents.html +// [PutAccountPolicy]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutAccountPolicy.html +// [GetLogEvents]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetLogEvents.html +func (c *Client) PutDataProtectionPolicy(ctx context.Context, params *PutDataProtectionPolicyInput, optFns ...func(*Options)) (*PutDataProtectionPolicyOutput, error) { + if params == nil { + params = &PutDataProtectionPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutDataProtectionPolicy", params, optFns, c.addOperationPutDataProtectionPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutDataProtectionPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutDataProtectionPolicyInput struct { + + // Specify either the log group name or log group ARN. + // + // This member is required. + LogGroupIdentifier *string + + // Specify the data protection policy, in JSON. + // + // This policy must include two JSON blocks: + // + // - The first block must include both a DataIdentifer array and an Operation + // property with an Audit action. The DataIdentifer array lists the types of + // sensitive data that you want to mask. For more information about the available + // options, see [Types of data that you can mask]. + // + // The Operation property with an Audit action is required to find the sensitive + // data terms. This Audit action must contain a FindingsDestination object. You + // can optionally use that FindingsDestination object to list one or more + // destinations to send audit findings to. If you specify destinations such as log + // groups, Firehose streams, and S3 buckets, they must already exist. + // + // - The second block must include both a DataIdentifer array and an Operation + // property with an Deidentify action. The DataIdentifer array must exactly match + // the DataIdentifer array in the first block of the policy. + // + // The Operation property with the Deidentify action is what actually masks the + // data, and it must contain the "MaskConfig": {} object. The "MaskConfig": {} + // object must be empty. + // + // For an example data protection policy, see the Examples section on this page. + // + // The contents of the two DataIdentifer arrays must match exactly. + // + // In addition to the two JSON blocks, the policyDocument can also include Name , + // Description , and Version fields. The Name is used as a dimension when + // CloudWatch Logs reports audit findings metrics to CloudWatch. + // + // The JSON specified in policyDocument can be up to 30,720 characters. + // + // [Types of data that you can mask]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/mask-sensitive-log-data-types.html + // + // This member is required. + PolicyDocument *string + + noSmithyDocumentSerde +} + +type PutDataProtectionPolicyOutput struct { + + // The date and time that this policy was most recently updated. + LastUpdatedTime *int64 + + // The log group name or ARN that you specified in your request. + LogGroupIdentifier *string + + // The data protection policy used for this log group. + PolicyDocument *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutDataProtectionPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpPutDataProtectionPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpPutDataProtectionPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "PutDataProtectionPolicy"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpPutDataProtectionPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutDataProtectionPolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opPutDataProtectionPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "PutDataProtectionPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutDeliveryDestination.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutDeliveryDestination.go new file mode 100644 index 00000000000..8df5ec83f31 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutDeliveryDestination.go @@ -0,0 +1,228 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates or updates a logical delivery destination. A delivery destination is an +// Amazon Web Services resource that represents an Amazon Web Services service that +// logs can be sent to. CloudWatch Logs, Amazon S3, and Firehose are supported as +// logs delivery destinations and X-Ray as the trace delivery destination. +// +// To configure logs delivery between a supported Amazon Web Services service and +// a destination, you must do the following: +// +// - Create a delivery source, which is a logical object that represents the +// resource that is actually sending the logs. For more information, see [PutDeliverySource]. +// +// - Use PutDeliveryDestination to create a delivery destination in the same +// account of the actual delivery destination. The delivery destination that you +// create is a logical object that represents the actual delivery destination. +// +// - If you are delivering logs cross-account, you must use [PutDeliveryDestinationPolicy]in the destination +// account to assign an IAM policy to the destination. This policy allows delivery +// to that destination. +// +// - Use CreateDelivery to create a delivery by pairing exactly one delivery +// source and one delivery destination. For more information, see [CreateDelivery]. +// +// You can configure a single delivery source to send logs to multiple +// destinations by creating multiple deliveries. You can also create multiple +// deliveries to configure multiple delivery sources to send logs to the same +// delivery destination. +// +// Only some Amazon Web Services services support being configured as a delivery +// source. These services are listed as Supported [V2 Permissions] in the table at [Enabling logging from Amazon Web Services services.] +// +// If you use this operation to update an existing delivery destination, all the +// current delivery destination parameters are overwritten with the new parameter +// values that you specify. +// +// [PutDeliverySource]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliverySource.html +// [Enabling logging from Amazon Web Services services.]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AWS-logs-and-resource-policy.html +// [CreateDelivery]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CreateDelivery.html +// [PutDeliveryDestinationPolicy]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestinationPolicy.html +func (c *Client) PutDeliveryDestination(ctx context.Context, params *PutDeliveryDestinationInput, optFns ...func(*Options)) (*PutDeliveryDestinationOutput, error) { + if params == nil { + params = &PutDeliveryDestinationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutDeliveryDestination", params, optFns, c.addOperationPutDeliveryDestinationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutDeliveryDestinationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutDeliveryDestinationInput struct { + + // A name for this delivery destination. This name must be unique for all delivery + // destinations in your account. + // + // This member is required. + Name *string + + // A structure that contains the ARN of the Amazon Web Services resource that will + // receive the logs. + // + // deliveryDestinationConfiguration is required for CloudWatch Logs, Amazon S3, + // Firehose log delivery destinations and not required for X-Ray trace delivery + // destinations. deliveryDestinationType is needed for X-Ray trace delivery + // destinations but not required for other logs delivery destinations. + DeliveryDestinationConfiguration *types.DeliveryDestinationConfiguration + + // The type of delivery destination. This parameter specifies the target service + // where log data will be delivered. Valid values include: + // + // - S3 - Amazon S3 for long-term storage and analytics + // + // - CWL - CloudWatch Logs for centralized log management + // + // - FH - Amazon Kinesis Data Firehose for real-time data streaming + // + // - XRAY - Amazon Web Services X-Ray for distributed tracing and application + // monitoring + // + // The delivery destination type determines the format and configuration options + // available for log delivery. + DeliveryDestinationType types.DeliveryDestinationType + + // The format for the logs that this delivery destination will receive. + OutputFormat types.OutputFormat + + // An optional list of key-value pairs to associate with the resource. + // + // For more information about tagging, see [Tagging Amazon Web Services resources] + // + // [Tagging Amazon Web Services resources]: https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html + Tags map[string]string + + noSmithyDocumentSerde +} + +type PutDeliveryDestinationOutput struct { + + // A structure containing information about the delivery destination that you just + // created or updated. + DeliveryDestination *types.DeliveryDestination + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutDeliveryDestinationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpPutDeliveryDestination{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpPutDeliveryDestination{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "PutDeliveryDestination"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpPutDeliveryDestinationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutDeliveryDestination(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opPutDeliveryDestination(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "PutDeliveryDestination", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutDeliveryDestinationPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutDeliveryDestinationPolicy.go new file mode 100644 index 00000000000..2bde7b72fea --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutDeliveryDestinationPolicy.go @@ -0,0 +1,187 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates and assigns an IAM policy that grants permissions to CloudWatch Logs to +// deliver logs cross-account to a specified destination in this account. To +// configure the delivery of logs from an Amazon Web Services service in another +// account to a logs delivery destination in the current account, you must do the +// following: +// +// - Create a delivery source, which is a logical object that represents the +// resource that is actually sending the logs. For more information, see [PutDeliverySource]. +// +// - Create a delivery destination, which is a logical object that represents +// the actual delivery destination. For more information, see [PutDeliveryDestination]. +// +// - Use this operation in the destination account to assign an IAM policy to +// the destination. This policy allows delivery to that destination. +// +// - Create a delivery by pairing exactly one delivery source and one delivery +// destination. For more information, see [CreateDelivery]. +// +// Only some Amazon Web Services services support being configured as a delivery +// source. These services are listed as Supported [V2 Permissions] in the table at [Enabling logging from Amazon Web Services services.] +// +// The contents of the policy must include two statements. One statement enables +// general logs delivery, and the other allows delivery to the chosen destination. +// See the examples for the needed policies. +// +// [PutDeliveryDestination]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestination.html +// [PutDeliverySource]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliverySource.html +// [Enabling logging from Amazon Web Services services.]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AWS-logs-and-resource-policy.html +// [CreateDelivery]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CreateDelivery.html +func (c *Client) PutDeliveryDestinationPolicy(ctx context.Context, params *PutDeliveryDestinationPolicyInput, optFns ...func(*Options)) (*PutDeliveryDestinationPolicyOutput, error) { + if params == nil { + params = &PutDeliveryDestinationPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutDeliveryDestinationPolicy", params, optFns, c.addOperationPutDeliveryDestinationPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutDeliveryDestinationPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutDeliveryDestinationPolicyInput struct { + + // The name of the delivery destination to assign this policy to. + // + // This member is required. + DeliveryDestinationName *string + + // The contents of the policy. + // + // This member is required. + DeliveryDestinationPolicy *string + + noSmithyDocumentSerde +} + +type PutDeliveryDestinationPolicyOutput struct { + + // The contents of the policy that you just created. + Policy *types.Policy + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutDeliveryDestinationPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpPutDeliveryDestinationPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpPutDeliveryDestinationPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "PutDeliveryDestinationPolicy"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpPutDeliveryDestinationPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutDeliveryDestinationPolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opPutDeliveryDestinationPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "PutDeliveryDestinationPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutDeliverySource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutDeliverySource.go new file mode 100644 index 00000000000..a845151bea7 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutDeliverySource.go @@ -0,0 +1,281 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates or updates a logical delivery source. A delivery source represents an +// Amazon Web Services resource that sends logs to an logs delivery destination. +// The destination can be CloudWatch Logs, Amazon S3, Firehose or X-Ray for sending +// traces. +// +// To configure logs delivery between a delivery destination and an Amazon Web +// Services service that is supported as a delivery source, you must do the +// following: +// +// - Use PutDeliverySource to create a delivery source, which is a logical object +// that represents the resource that is actually sending the logs. +// +// - Use PutDeliveryDestination to create a delivery destination, which is a +// logical object that represents the actual delivery destination. For more +// information, see [PutDeliveryDestination]. +// +// - If you are delivering logs cross-account, you must use [PutDeliveryDestinationPolicy]in the destination +// account to assign an IAM policy to the destination. This policy allows delivery +// to that destination. +// +// - Use CreateDelivery to create a delivery by pairing exactly one delivery +// source and one delivery destination. For more information, see [CreateDelivery]. +// +// You can configure a single delivery source to send logs to multiple +// destinations by creating multiple deliveries. You can also create multiple +// deliveries to configure multiple delivery sources to send logs to the same +// delivery destination. +// +// Only some Amazon Web Services services support being configured as a delivery +// source. These services are listed as Supported [V2 Permissions] in the table at [Enabling logging from Amazon Web Services services.] +// +// If you use this operation to update an existing delivery source, all the +// current delivery source parameters are overwritten with the new parameter values +// that you specify. +// +// [PutDeliveryDestination]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestination.html +// [Enabling logging from Amazon Web Services services.]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AWS-logs-and-resource-policy.html +// [CreateDelivery]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CreateDelivery.html +// [PutDeliveryDestinationPolicy]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestinationPolicy.html +func (c *Client) PutDeliverySource(ctx context.Context, params *PutDeliverySourceInput, optFns ...func(*Options)) (*PutDeliverySourceOutput, error) { + if params == nil { + params = &PutDeliverySourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutDeliverySource", params, optFns, c.addOperationPutDeliverySourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutDeliverySourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutDeliverySourceInput struct { + + // Defines the type of log that the source is sending. + // + // - For Amazon Bedrock Agents, the valid values are APPLICATION_LOGS and + // EVENT_LOGS . + // + // - For Amazon Bedrock Knowledge Bases, the valid value is APPLICATION_LOGS . + // + // - For Amazon Bedrock AgentCore Runtime, the valid values are APPLICATION_LOGS + // , USAGE_LOGS and TRACES . + // + // - For Amazon Bedrock AgentCore Tools, the valid values are APPLICATION_LOGS , + // USAGE_LOGS and TRACES . + // + // - For Amazon Bedrock AgentCore Identity, the valid values are APPLICATION_LOGS + // and TRACES . + // + // - For Amazon Bedrock AgentCore Memory, the valid values are APPLICATION_LOGS + // and TRACES . + // + // - For Amazon Bedrock AgentCore Gateway, the valid values are APPLICATION_LOGS + // and TRACES . + // + // - For CloudFront, the valid value is ACCESS_LOGS . + // + // - For DevOps Agent, the valid value is APPLICATION_LOGS . + // + // - For Amazon CodeWhisperer, the valid value is EVENT_LOGS . + // + // - For Elemental MediaPackage, the valid values are EGRESS_ACCESS_LOGS and + // INGRESS_ACCESS_LOGS . + // + // - For Elemental MediaTailor, the valid values are AD_DECISION_SERVER_LOGS , + // MANIFEST_SERVICE_LOGS , and TRANSCODE_LOGS . + // + // - For Amazon EKS Auto Mode, the valid values are AUTO_MODE_BLOCK_STORAGE_LOGS + // , AUTO_MODE_COMPUTE_LOGS , AUTO_MODE_IPAM_LOGS , and + // AUTO_MODE_LOAD_BALANCING_LOGS . + // + // - For Entity Resolution, the valid value is WORKFLOW_LOGS . + // + // - For IAM Identity Center, the valid value is ERROR_LOGS . + // + // - For Network Firewall Proxy, the valid values are ALERT_LOGS , ALLOW_LOGS , + // and DENY_LOGS . + // + // - For Network Load Balancer, the valid value is NLB_ACCESS_LOGS . + // + // - For PCS, the valid values are PCS_SCHEDULER_LOGS and PCS_JOBCOMP_LOGS . + // + // - For Quick, the valid values are CHAT_LOGS and FEEDBACK_LOGS . + // + // - For Amazon Web Services RTB Fabric, the valid values is APPLICATION_LOGS . + // + // - For Amazon Q, the valid values are EVENT_LOGS and SYNC_JOB_LOGS . + // + // - For Amazon Web Services Security Hub CSPM, the valid value is + // SECURITY_FINDING_LOGS . + // + // - For Amazon SES mail manager, the valid values are APPLICATION_LOGS and + // TRAFFIC_POLICY_DEBUG_LOGS . + // + // - For Amazon WorkMail, the valid values are ACCESS_CONTROL_LOGS , + // AUTHENTICATION_LOGS , WORKMAIL_AVAILABILITY_PROVIDER_LOGS , + // WORKMAIL_MAILBOX_ACCESS_LOGS , and WORKMAIL_PERSONAL_ACCESS_TOKEN_LOGS . + // + // - For Amazon VPC Route Server, the valid value is EVENT_LOGS . + // + // This member is required. + LogType *string + + // A name for this delivery source. This name must be unique for all delivery + // sources in your account. + // + // This member is required. + Name *string + + // The ARN of the Amazon Web Services resource that is generating and sending + // logs. For example, + // arn:aws:workmail:us-east-1:123456789012:organization/m-1234EXAMPLEabcd1234abcd1234abcd1234 + // + // For the SECURITY_FINDING_LOGS logType, use a wildcard ARN for the hub resource. + // For example, arn:aws:securityhub:us-east-1:111122223333:hub/* + // + // This member is required. + ResourceArn *string + + // An optional list of key-value pairs to associate with the resource. + // + // For more information about tagging, see [Tagging Amazon Web Services resources] + // + // [Tagging Amazon Web Services resources]: https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html + Tags map[string]string + + noSmithyDocumentSerde +} + +type PutDeliverySourceOutput struct { + + // A structure containing information about the delivery source that was just + // created or updated. + DeliverySource *types.DeliverySource + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutDeliverySourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpPutDeliverySource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpPutDeliverySource{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "PutDeliverySource"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpPutDeliverySourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutDeliverySource(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opPutDeliverySource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "PutDeliverySource", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutDestination.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutDestination.go new file mode 100644 index 00000000000..0ed2432e8ea --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutDestination.go @@ -0,0 +1,189 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates or updates a destination. This operation is used only to create +// destinations for cross-account subscriptions. +// +// A destination encapsulates a physical resource (such as an Amazon Kinesis +// stream). With a destination, you can subscribe to a real-time stream of log +// events for a different account, ingested using [PutLogEvents]. +// +// Through an access policy, a destination controls what is written to it. By +// default, PutDestination does not set any access policy with the destination, +// which means a cross-account user cannot call [PutSubscriptionFilter]against this destination. To +// enable this, the destination owner must call [PutDestinationPolicy]after PutDestination . +// +// To perform a PutDestination operation, you must also have the iam:PassRole +// permission. +// +// [PutSubscriptionFilter]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutSubscriptionFilter.html +// [PutLogEvents]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutLogEvents.html +// [PutDestinationPolicy]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDestinationPolicy.html +func (c *Client) PutDestination(ctx context.Context, params *PutDestinationInput, optFns ...func(*Options)) (*PutDestinationOutput, error) { + if params == nil { + params = &PutDestinationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutDestination", params, optFns, c.addOperationPutDestinationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutDestinationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutDestinationInput struct { + + // A name for the destination. + // + // This member is required. + DestinationName *string + + // The ARN of an IAM role that grants CloudWatch Logs permissions to call the + // Amazon Kinesis PutRecord operation on the destination stream. + // + // This member is required. + RoleArn *string + + // The ARN of an Amazon Kinesis stream to which to deliver matching log events. + // + // This member is required. + TargetArn *string + + // An optional list of key-value pairs to associate with the resource. + // + // For more information about tagging, see [Tagging Amazon Web Services resources] + // + // [Tagging Amazon Web Services resources]: https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html + Tags map[string]string + + noSmithyDocumentSerde +} + +type PutDestinationOutput struct { + + // The destination. + Destination *types.Destination + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutDestinationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpPutDestination{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpPutDestination{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "PutDestination"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpPutDestinationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutDestination(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opPutDestination(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "PutDestination", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutDestinationPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutDestinationPolicy.go new file mode 100644 index 00000000000..7a35329bad0 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutDestinationPolicy.go @@ -0,0 +1,172 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates or updates an access policy associated with an existing destination. An +// access policy is an [IAM policy document]that is used to authorize claims to register a subscription +// filter against a given destination. +// +// [IAM policy document]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies_overview.html +func (c *Client) PutDestinationPolicy(ctx context.Context, params *PutDestinationPolicyInput, optFns ...func(*Options)) (*PutDestinationPolicyOutput, error) { + if params == nil { + params = &PutDestinationPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutDestinationPolicy", params, optFns, c.addOperationPutDestinationPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutDestinationPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutDestinationPolicyInput struct { + + // An IAM policy document that authorizes cross-account users to deliver their log + // events to the associated destination. This can be up to 5120 bytes. + // + // This member is required. + AccessPolicy *string + + // A name for an existing destination. + // + // This member is required. + DestinationName *string + + // Specify true if you are updating an existing destination policy to grant + // permission to an organization ID instead of granting permission to individual + // Amazon Web Services accounts. Before you update a destination policy this way, + // you must first update the subscription filters in the accounts that send logs to + // this destination. If you do not, the subscription filters might stop working. By + // specifying true for forceUpdate , you are affirming that you have already + // updated the subscription filters. For more information, see [Updating an existing cross-account subscription] + // + // If you omit this parameter, the default of false is used. + // + // [Updating an existing cross-account subscription]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Cross-Account-Log_Subscription-Update.html + ForceUpdate *bool + + noSmithyDocumentSerde +} + +type PutDestinationPolicyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutDestinationPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpPutDestinationPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpPutDestinationPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "PutDestinationPolicy"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpPutDestinationPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutDestinationPolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opPutDestinationPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "PutDestinationPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutIndexPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutIndexPolicy.go new file mode 100644 index 00000000000..784e2c674de --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutIndexPolicy.go @@ -0,0 +1,241 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates or updates a field index policy for the specified log group. Only log +// groups in the Standard log class support field index policies. For more +// information about log classes, see [Log classes]. +// +// You can use field index policies to create field indexes on fields found in log +// events in the log group. Creating field indexes speeds up and lowers the costs +// for CloudWatch Logs Insights queries that reference those field indexes, because +// these queries attempt to skip the processing of log events that are known to not +// match the indexed field. Good fields to index are fields that you often need to +// query for and fields or values that match only a small fraction of the total log +// events. Common examples of indexes include request ID, session ID, userID, and +// instance IDs. For more information, see [Create field indexes to improve query performance and reduce costs]. +// +// You can configure indexed fields as facets to enable interactive exploration +// and filtering of your logs in the CloudWatch Logs Insights console. Facets allow +// you to view value distributions and counts for indexed fields without running +// queries. When you create a field index, you can optionally set it as a facet to +// enable this interactive analysis capability. For more information, see [Use facets to group and explore logs]. +// +// To find the fields that are in your log group events, use the [GetLogGroupFields] operation. +// +// For example, suppose you have created a field index for requestId . Then, any +// CloudWatch Logs Insights query on that log group that includes requestId = +// value or requestId IN [value, value, ...] will process fewer log events to +// reduce costs, and have improved performance. +// +// CloudWatch Logs provides default field indexes for all log groups in the +// Standard log class. Default field indexes are automatically available for the +// following fields: +// +// - @logStream +// +// - @aws.region +// +// - @aws.account +// +// - @source.log +// +// - traceId +// +// Default field indexes are in addition to any custom field indexes you define +// within your policy. Default field indexes are not counted towards your field +// index quota. +// +// Each index policy has the following quotas and restrictions: +// +// - As many as 20 fields can be included in the policy. +// +// - Each field name can include as many as 100 characters. +// +// Matches of log events to the names of indexed fields are case-sensitive. For +// example, a field index of RequestId won't match a log event containing requestId +// . +// +// Log group-level field index policies created with PutIndexPolicy override +// account-level field index policies created with [PutAccountPolicy]that apply to log groups. If +// you use PutIndexPolicy to create a field index policy for a log group, that log +// group uses only that policy for log group-level indexing, including any facet +// configurations. The log group ignores any account-wide field index policy that +// applies to log groups, but data source-based account policies may still apply. +// +// [Log classes]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch_Logs_Log_Classes.html +// [GetLogGroupFields]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetLogGroupFields.html +// [PutAccountPolicy]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutAccountPolicy.html +// [Create field indexes to improve query performance and reduce costs]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatchLogs-Field-Indexing.html +// [Use facets to group and explore logs]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatchLogs-Facets.html +func (c *Client) PutIndexPolicy(ctx context.Context, params *PutIndexPolicyInput, optFns ...func(*Options)) (*PutIndexPolicyOutput, error) { + if params == nil { + params = &PutIndexPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutIndexPolicy", params, optFns, c.addOperationPutIndexPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutIndexPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutIndexPolicyInput struct { + + // Specify either the log group name or log group ARN to apply this field index + // policy to. If you specify an ARN, use the format + // arn:aws:logs:region:account-id:log-group:log_group_name Don't include an * at + // the end. + // + // This member is required. + LogGroupIdentifier *string + + // The index policy document, in JSON format. The following is an example of an + // index policy document that creates indexes with different types. + // + // "policyDocument": "{"Fields": [ "TransactionId" ], "FieldsV2": {"RequestId": + // {"type": "FIELD_INDEX"}, "APIName": {"type": "FACET"}, "StatusCode": {"type": + // "FACET"}}}" + // + // You can use FieldsV2 to specify the type for each field. Supported types are + // FIELD_INDEX and FACET . Field names within Fields and FieldsV2 must be mutually + // exclusive. + // + // The policy document must include at least one field index. For more information + // about the fields that can be included and other restrictions, see [Field index syntax and quotas]. + // + // [Field index syntax and quotas]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatchLogs-Field-Indexing-Syntax.html + // + // This member is required. + PolicyDocument *string + + noSmithyDocumentSerde +} + +type PutIndexPolicyOutput struct { + + // The index policy that you just created or updated. + IndexPolicy *types.IndexPolicy + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutIndexPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpPutIndexPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpPutIndexPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "PutIndexPolicy"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpPutIndexPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutIndexPolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opPutIndexPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "PutIndexPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutIntegration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutIntegration.go new file mode 100644 index 00000000000..c20a7ddd12a --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutIntegration.go @@ -0,0 +1,182 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates an integration between CloudWatch Logs and another service in this +// account. Currently, only integrations with OpenSearch Service are supported, and +// currently you can have only one integration in your account. +// +// Integrating with OpenSearch Service makes it possible for you to create curated +// vended logs dashboards, powered by OpenSearch Service analytics. For more +// information, see [Vended log dashboards powered by Amazon OpenSearch Service]. +// +// You can use this operation only to create a new integration. You can't modify +// an existing integration. +// +// [Vended log dashboards powered by Amazon OpenSearch Service]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatchLogs-OpenSearch-Dashboards.html +func (c *Client) PutIntegration(ctx context.Context, params *PutIntegrationInput, optFns ...func(*Options)) (*PutIntegrationOutput, error) { + if params == nil { + params = &PutIntegrationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutIntegration", params, optFns, c.addOperationPutIntegrationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutIntegrationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutIntegrationInput struct { + + // A name for the integration. + // + // This member is required. + IntegrationName *string + + // The type of integration. Currently, the only supported type is OPENSEARCH . + // + // This member is required. + IntegrationType types.IntegrationType + + // A structure that contains configuration information for the integration that + // you are creating. + // + // This member is required. + ResourceConfig types.ResourceConfig + + noSmithyDocumentSerde +} + +type PutIntegrationOutput struct { + + // The name of the integration that you just created. + IntegrationName *string + + // The status of the integration that you just created. + // + // After you create an integration, it takes a few minutes to complete. During + // this time, you'll see the status as PROVISIONING . + IntegrationStatus types.IntegrationStatus + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutIntegrationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpPutIntegration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpPutIntegration{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "PutIntegration"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpPutIntegrationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutIntegration(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opPutIntegration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "PutIntegration", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutLogEvents.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutLogEvents.go new file mode 100644 index 00000000000..4dfefefd670 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutLogEvents.go @@ -0,0 +1,233 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Uploads a batch of log events to the specified log stream. +// +// The sequence token is now ignored in PutLogEvents actions. PutLogEvents actions +// are always accepted and never return InvalidSequenceTokenException or +// DataAlreadyAcceptedException even if the sequence token is not valid. You can +// use parallel PutLogEvents actions on the same log stream. +// +// The batch of events must satisfy the following constraints: +// +// - The maximum batch size is 1,048,576 bytes. This size is calculated as the +// sum of all event messages in UTF-8, plus 26 bytes for each log event. +// +// - Events more than 2 hours in the future are rejected while processing +// remaining valid events. +// +// - Events older than 14 days or preceding the log group's retention period are +// rejected while processing remaining valid events. +// +// - The log events in the batch must be in chronological order by their +// timestamp. The timestamp is the time that the event occurred, expressed as the +// number of milliseconds after Jan 1, 1970 00:00:00 UTC . (In Amazon Web +// Services Tools for PowerShell and the Amazon Web Services SDK for .NET, the +// timestamp is specified in .NET format: yyyy-mm-ddThh:mm:ss . For example, +// 2017-09-15T13:45:30 .) +// +// - A batch of log events in a single request must be in a chronological order. +// Otherwise, the operation fails. +// +// - Each log event can be no larger than 1 MB. +// +// - The maximum number of log events in a batch is 10,000. +// +// - For valid events (within 14 days in the past to 2 hours in future), the +// time span in a single batch cannot exceed 24 hours. Otherwise, the operation +// fails. +// +// The quota of five requests per second per log stream has been removed. Instead, +// PutLogEvents actions are throttled based on a per-second per-account quota. You +// can request an increase to the per-second throttling quota by using the Service +// Quotas service. +// +// If a call to PutLogEvents returns "UnrecognizedClientException" the most likely +// cause is a non-valid Amazon Web Services access key ID or secret key. +func (c *Client) PutLogEvents(ctx context.Context, params *PutLogEventsInput, optFns ...func(*Options)) (*PutLogEventsOutput, error) { + if params == nil { + params = &PutLogEventsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutLogEvents", params, optFns, c.addOperationPutLogEventsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutLogEventsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutLogEventsInput struct { + + // The log events. + // + // This member is required. + LogEvents []types.InputLogEvent + + // The name of the log group. + // + // This member is required. + LogGroupName *string + + // The name of the log stream. + // + // This member is required. + LogStreamName *string + + // The entity associated with the log events. + Entity *types.Entity + + // The sequence token obtained from the response of the previous PutLogEvents call. + // + // The sequenceToken parameter is now ignored in PutLogEvents actions. PutLogEvents + // actions are now accepted and never return InvalidSequenceTokenException or + // DataAlreadyAcceptedException even if the sequence token is not valid. + SequenceToken *string + + noSmithyDocumentSerde +} + +type PutLogEventsOutput struct { + + // The next sequence token. + // + // This field has been deprecated. + // + // The sequence token is now ignored in PutLogEvents actions. PutLogEvents actions + // are always accepted even if the sequence token is not valid. You can use + // parallel PutLogEvents actions on the same log stream and you do not need to + // wait for the response of a previous PutLogEvents action to obtain the + // nextSequenceToken value. + NextSequenceToken *string + + // Information about why the entity is rejected when calling PutLogEvents . Only + // returned when the entity is rejected. + // + // When the entity is rejected, the events may still be accepted. + RejectedEntityInfo *types.RejectedEntityInfo + + // The rejected events. + RejectedLogEventsInfo *types.RejectedLogEventsInfo + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutLogEventsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpPutLogEvents{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpPutLogEvents{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "PutLogEvents"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpPutLogEventsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutLogEvents(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opPutLogEvents(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "PutLogEvents", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutLogGroupDeletionProtection.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutLogGroupDeletionProtection.go new file mode 100644 index 00000000000..24d31cfc39d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutLogGroupDeletionProtection.go @@ -0,0 +1,172 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Enables or disables deletion protection for the specified log group. When +// enabled on a log group, deletion protection blocks all deletion operations until +// it is explicitly disabled. +// +// For information about the parameters that are common to all actions, see [Common Parameters]. +// +// [Common Parameters]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/CommonParameters.html +func (c *Client) PutLogGroupDeletionProtection(ctx context.Context, params *PutLogGroupDeletionProtectionInput, optFns ...func(*Options)) (*PutLogGroupDeletionProtectionOutput, error) { + if params == nil { + params = &PutLogGroupDeletionProtectionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutLogGroupDeletionProtection", params, optFns, c.addOperationPutLogGroupDeletionProtectionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutLogGroupDeletionProtectionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutLogGroupDeletionProtectionInput struct { + + // Whether to enable deletion protection. + // + // Type: Boolean + // + // Required: Yes + // + // This member is required. + DeletionProtectionEnabled *bool + + // The name or ARN of the log group. + // + // Type: String + // + // Length Constraints: Minimum length of 1. Maximum length of 512. + // + // Pattern: [\.\-_/#A-Za-z0-9]+ + // + // Required: Yes + // + // This member is required. + LogGroupIdentifier *string + + noSmithyDocumentSerde +} + +type PutLogGroupDeletionProtectionOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutLogGroupDeletionProtectionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpPutLogGroupDeletionProtection{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpPutLogGroupDeletionProtection{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "PutLogGroupDeletionProtection"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpPutLogGroupDeletionProtectionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutLogGroupDeletionProtection(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opPutLogGroupDeletionProtection(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "PutLogGroupDeletionProtection", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutMetricFilter.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutMetricFilter.go new file mode 100644 index 00000000000..ec7f6bbb47c --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutMetricFilter.go @@ -0,0 +1,218 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates or updates a metric filter and associates it with the specified log +// group. With metric filters, you can configure rules to extract metric data from +// log events ingested through [PutLogEvents]. +// +// The maximum number of metric filters that can be associated with a log group is +// 100. +// +// Using regular expressions in filter patterns is supported. For these filters, +// there is a quota of two regular expression patterns within a single filter +// pattern. There is also a quota of five regular expression patterns per log +// group. For more information about using regular expressions in filter patterns, +// see [Filter pattern syntax for metric filters, subscription filters, filter log events, and Live Tail]. +// +// When you create a metric filter, you can also optionally assign a unit and +// dimensions to the metric that is created. +// +// Metrics extracted from log events are charged as custom metrics. To prevent +// unexpected high charges, do not specify high-cardinality fields such as +// IPAddress or requestID as dimensions. Each different value found for a +// dimension is treated as a separate metric and accrues charges as a separate +// custom metric. +// +// CloudWatch Logs might disable a metric filter if it generates 1,000 different +// name/value pairs for your specified dimensions within one hour. +// +// You can also set up a billing alarm to alert you if your charges are higher +// than expected. For more information, see [Creating a Billing Alarm to Monitor Your Estimated Amazon Web Services Charges]. +// +// [Creating a Billing Alarm to Monitor Your Estimated Amazon Web Services Charges]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/monitor_estimated_charges_with_cloudwatch.html +// [PutLogEvents]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutLogEvents.html +// [Filter pattern syntax for metric filters, subscription filters, filter log events, and Live Tail]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html +func (c *Client) PutMetricFilter(ctx context.Context, params *PutMetricFilterInput, optFns ...func(*Options)) (*PutMetricFilterOutput, error) { + if params == nil { + params = &PutMetricFilterInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutMetricFilter", params, optFns, c.addOperationPutMetricFilterMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutMetricFilterOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutMetricFilterInput struct { + + // A name for the metric filter. + // + // This member is required. + FilterName *string + + // A filter pattern for extracting metric data out of ingested log events. + // + // This member is required. + FilterPattern *string + + // The name of the log group. + // + // This member is required. + LogGroupName *string + + // A collection of information that defines how metric data gets emitted. + // + // This member is required. + MetricTransformations []types.MetricTransformation + + // This parameter is valid only for log groups that have an active log + // transformer. For more information about log transformers, see [PutTransformer]. + // + // If the log group uses either a log-group level or account-level transformer, + // and you specify true , the metric filter will be applied on the transformed + // version of the log events instead of the original ingested log events. + // + // [PutTransformer]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutTransformer.html + ApplyOnTransformedLogs bool + + // A list of system fields to emit as additional dimensions in the generated + // metrics. Valid values are @aws.account and @aws.region . These dimensions help + // identify the source of centralized log data and count toward the total dimension + // limit for metric filters. + EmitSystemFieldDimensions []string + + // A filter expression that specifies which log events should be processed by this + // metric filter based on system fields such as source account and source region. + // Uses selection criteria syntax with operators like = , != , AND , OR , IN , NOT + // IN . Example: @aws.region = "us-east-1" or @aws.account IN ["123456789012", + // "987654321098"] . Maximum length: 2000 characters. + FieldSelectionCriteria *string + + noSmithyDocumentSerde +} + +type PutMetricFilterOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutMetricFilterMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpPutMetricFilter{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpPutMetricFilter{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "PutMetricFilter"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpPutMetricFilterValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutMetricFilter(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opPutMetricFilter(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "PutMetricFilter", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutQueryDefinition.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutQueryDefinition.go new file mode 100644 index 00000000000..80466c5359b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutQueryDefinition.go @@ -0,0 +1,254 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates or updates a query definition for CloudWatch Logs Insights. For more +// information, see [Analyzing Log Data with CloudWatch Logs Insights]. +// +// To update a query definition, specify its queryDefinitionId in your request. +// The values of name , queryString , and logGroupNames are changed to the values +// that you specify in your update operation. No current values are retained from +// the current query definition. For example, imagine updating a current query +// definition that includes log groups. If you don't specify the logGroupNames +// parameter in your update operation, the query definition changes to contain no +// log groups. +// +// You must have the logs:PutQueryDefinition permission to be able to perform this +// operation. +// +// [Analyzing Log Data with CloudWatch Logs Insights]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AnalyzingLogData.html +func (c *Client) PutQueryDefinition(ctx context.Context, params *PutQueryDefinitionInput, optFns ...func(*Options)) (*PutQueryDefinitionOutput, error) { + if params == nil { + params = &PutQueryDefinitionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutQueryDefinition", params, optFns, c.addOperationPutQueryDefinitionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutQueryDefinitionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutQueryDefinitionInput struct { + + // A name for the query definition. If you are saving numerous query definitions, + // we recommend that you name them. This way, you can find the ones you want by + // using the first part of the name as a filter in the queryDefinitionNamePrefix + // parameter of [DescribeQueryDefinitions]. + // + // [DescribeQueryDefinitions]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeQueryDefinitions.html + // + // This member is required. + Name *string + + // The query string to use for this definition. For more information, see [CloudWatch Logs Insights Query Syntax]. + // + // [CloudWatch Logs Insights Query Syntax]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html + // + // This member is required. + QueryString *string + + // Used as an idempotency token, to avoid returning an exception if the service + // receives the same request twice because of a network error. + ClientToken *string + + // Use this parameter to include specific log groups as part of your query + // definition. If your query uses the OpenSearch Service query language, you + // specify the log group names inside the querystring instead of here. + // + // If you are updating an existing query definition for the Logs Insights QL or + // OpenSearch Service PPL and you omit this parameter, then the updated definition + // will contain no log groups. + LogGroupNames []string + + // Use this parameter to include specific query parameters as part of your query + // definition. Query parameters are supported only for Logs Insights QL queries. + // Query parameters allow you to use placeholder variables in your query string + // that are substituted with values at execution time. Use the {{parameterName}} + // syntax in your query string to reference a parameter. + Parameters []types.QueryParameter + + // If you are updating a query definition, use this parameter to specify the ID of + // the query definition that you want to update. You can use [DescribeQueryDefinitions]to retrieve the IDs + // of your saved query definitions. + // + // If you are creating a query definition, do not specify this parameter. + // CloudWatch generates a unique ID for the new query definition and include it in + // the response to this operation. + // + // [DescribeQueryDefinitions]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeQueryDefinitions.html + QueryDefinitionId *string + + // Specify the query language to use for this query. The options are Logs Insights + // QL, OpenSearch PPL, and OpenSearch SQL. For more information about the query + // languages that CloudWatch Logs supports, see [Supported query languages]. + // + // [Supported query languages]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_AnalyzeLogData_Languages.html + QueryLanguage types.QueryLanguage + + noSmithyDocumentSerde +} + +type PutQueryDefinitionOutput struct { + + // The ID of the query definition. + QueryDefinitionId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutQueryDefinitionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpPutQueryDefinition{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpPutQueryDefinition{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "PutQueryDefinition"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addIdempotencyToken_opPutQueryDefinitionMiddleware(stack, options); err != nil { + return err + } + if err = addOpPutQueryDefinitionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutQueryDefinition(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpPutQueryDefinition struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpPutQueryDefinition) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpPutQueryDefinition) 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.(*PutQueryDefinitionInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *PutQueryDefinitionInput ") + } + + 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_opPutQueryDefinitionMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpPutQueryDefinition{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opPutQueryDefinition(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "PutQueryDefinition", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutResourcePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutResourcePolicy.go new file mode 100644 index 00000000000..c750a38c12f --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutResourcePolicy.go @@ -0,0 +1,204 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates or updates a resource policy allowing other Amazon Web Services +// services to put log events to this account, such as Amazon Route 53. This API +// has the following restrictions: +// +// - Supported actions - Policy only supports logs:PutLogEvents and +// logs:CreateLogStream actions +// +// - Supported principals - Policy only applies when operations are invoked by +// Amazon Web Services service principals (not IAM users, roles, or cross-account +// principals +// +// - Policy limits - An account can have a maximum of 10 policies without +// resourceARN and one per LogGroup resourceARN +// +// Resource policies with actions invoked by non-Amazon Web Services service +// principals (such as IAM users, roles, or other Amazon Web Services accounts) +// will not be enforced. For access control involving these principals, use the IAM +// policies. +func (c *Client) PutResourcePolicy(ctx context.Context, params *PutResourcePolicyInput, optFns ...func(*Options)) (*PutResourcePolicyOutput, error) { + if params == nil { + params = &PutResourcePolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutResourcePolicy", params, optFns, c.addOperationPutResourcePolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutResourcePolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutResourcePolicyInput struct { + + // The expected revision ID of the resource policy. Required when resourceArn is + // provided to prevent concurrent modifications. Use null when creating a resource + // policy for the first time. + ExpectedRevisionId *string + + // Details of the new policy, including the identity of the principal that is + // enabled to put logs to this account. This is formatted as a JSON string. This + // parameter is required. + // + // The following example creates a resource policy enabling the Route 53 service + // to put DNS query logs in to the specified log group. Replace "logArn" with the + // ARN of your CloudWatch Logs resource, such as a log group or log stream. + // + // CloudWatch Logs also supports [aws:SourceArn] and [aws:SourceAccount] condition context keys. + // + // In the example resource policy, you would replace the value of SourceArn with + // the resource making the call from Route 53 to CloudWatch Logs. You would also + // replace the value of SourceAccount with the Amazon Web Services account ID + // making that call. + // + // { "Version": "2012-10-17", "Statement": [ { "Sid": + // "Route53LogsToCloudWatchLogs", "Effect": "Allow", "Principal": { "Service": [ + // "route53.amazonaws.com" ] }, "Action": "logs:PutLogEvents", "Resource": + // "logArn", "Condition": { "ArnLike": { "aws:SourceArn": "myRoute53ResourceArn" }, + // "StringEquals": { "aws:SourceAccount": "myAwsAccountId" } } } ] } + // + // [aws:SourceAccount]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-sourceaccount + // [aws:SourceArn]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-sourcearn + PolicyDocument *string + + // Name of the new policy. This parameter is required. + PolicyName *string + + // The ARN of the CloudWatch Logs resource to which the resource policy needs to + // be added or attached. Currently only supports LogGroup ARN. + ResourceArn *string + + noSmithyDocumentSerde +} + +type PutResourcePolicyOutput struct { + + // The new policy. + ResourcePolicy *types.ResourcePolicy + + // The revision ID of the created or updated resource policy. Only returned for + // resource-scoped policies. + RevisionId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutResourcePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpPutResourcePolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpPutResourcePolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "PutResourcePolicy"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutResourcePolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opPutResourcePolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "PutResourcePolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutRetentionPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutRetentionPolicy.go new file mode 100644 index 00000000000..746220b2122 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutRetentionPolicy.go @@ -0,0 +1,180 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Sets the retention of the specified log group. With a retention policy, you can +// configure the number of days for which to retain log events in the specified log +// group. +// +// CloudWatch Logs doesn't immediately delete log events when they reach their +// retention setting. It typically takes up to 72 hours after that before log +// events are deleted, but in rare situations might take longer. +// +// To illustrate, imagine that you change a log group to have a longer retention +// setting when it contains log events that are past the expiration date, but +// haven't been deleted. Those log events will take up to 72 hours to be deleted +// after the new retention date is reached. To make sure that log data is deleted +// permanently, keep a log group at its lower retention setting until 72 hours +// after the previous retention period ends. Alternatively, wait to change the +// retention setting until you confirm that the earlier log events are deleted. +// +// When log events reach their retention setting they are marked for deletion. +// After they are marked for deletion, they do not add to your archival storage +// costs anymore, even if they are not actually deleted until later. These log +// events marked for deletion are also not included when you use an API to retrieve +// the storedBytes value to see how many bytes a log group is storing. +func (c *Client) PutRetentionPolicy(ctx context.Context, params *PutRetentionPolicyInput, optFns ...func(*Options)) (*PutRetentionPolicyOutput, error) { + if params == nil { + params = &PutRetentionPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutRetentionPolicy", params, optFns, c.addOperationPutRetentionPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutRetentionPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutRetentionPolicyInput struct { + + // The name of the log group. + // + // This member is required. + LogGroupName *string + + // The number of days to retain the log events in the specified log group. + // Possible values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, + // 731, 1096, 1827, 2192, 2557, 2922, 3288, and 3653. + // + // To set a log group so that its log events do not expire, use [DeleteRetentionPolicy]. + // + // [DeleteRetentionPolicy]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DeleteRetentionPolicy.html + // + // This member is required. + RetentionInDays *int32 + + noSmithyDocumentSerde +} + +type PutRetentionPolicyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutRetentionPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpPutRetentionPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpPutRetentionPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "PutRetentionPolicy"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpPutRetentionPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutRetentionPolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opPutRetentionPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "PutRetentionPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutSubscriptionFilter.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutSubscriptionFilter.go new file mode 100644 index 00000000000..3b3f30a9a17 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutSubscriptionFilter.go @@ -0,0 +1,258 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates or updates a subscription filter and associates it with the specified +// log group. With subscription filters, you can subscribe to a real-time stream of +// log events ingested through [PutLogEvents]and have them delivered to a specific destination. +// When log events are sent to the receiving service, they are Base64 encoded and +// compressed with the GZIP format. +// +// The following destinations are supported for subscription filters: +// +// - An Amazon Kinesis data stream belonging to the same account as the +// subscription filter, for same-account delivery. +// +// - A logical destination created with [PutDestination]that belongs to a different account, for +// cross-account delivery. We currently support Kinesis Data Streams and Firehose +// as logical destinations. +// +// - An Amazon Kinesis Data Firehose delivery stream that belongs to the same +// account as the subscription filter, for same-account delivery. +// +// - An Lambda function that belongs to the same account as the subscription +// filter, for same-account delivery. +// +// Each log group can have up to two subscription filters associated with it. If +// you are updating an existing filter, you must specify the correct name in +// filterName . +// +// Using regular expressions in filter patterns is supported. For these filters, +// there is a quotas of quota of two regular expression patterns within a single +// filter pattern. There is also a quota of five regular expression patterns per +// log group. For more information about using regular expressions in filter +// patterns, see [Filter pattern syntax for metric filters, subscription filters, filter log events, and Live Tail]. +// +// To perform a PutSubscriptionFilter operation for any destination except a +// Lambda function, you must also have the iam:PassRole permission. +// +// [PutDestination]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDestination.html +// [PutLogEvents]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutLogEvents.html +// [Filter pattern syntax for metric filters, subscription filters, filter log events, and Live Tail]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html +func (c *Client) PutSubscriptionFilter(ctx context.Context, params *PutSubscriptionFilterInput, optFns ...func(*Options)) (*PutSubscriptionFilterOutput, error) { + if params == nil { + params = &PutSubscriptionFilterInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutSubscriptionFilter", params, optFns, c.addOperationPutSubscriptionFilterMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutSubscriptionFilterOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutSubscriptionFilterInput struct { + + // The ARN of the destination to deliver matching log events to. Currently, the + // supported destinations are: + // + // - An Amazon Kinesis stream belonging to the same account as the subscription + // filter, for same-account delivery. + // + // - A logical destination (specified using an ARN) belonging to a different + // account, for cross-account delivery. + // + // If you're setting up a cross-account subscription, the destination must have an + // IAM policy associated with it. The IAM policy must allow the sender to send logs + // to the destination. For more information, see [PutDestinationPolicy]. + // + // - A Kinesis Data Firehose delivery stream belonging to the same account as + // the subscription filter, for same-account delivery. + // + // - A Lambda function belonging to the same account as the subscription filter, + // for same-account delivery. + // + // [PutDestinationPolicy]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDestinationPolicy.html + // + // This member is required. + DestinationArn *string + + // A name for the subscription filter. If you are updating an existing filter, you + // must specify the correct name in filterName . To find the name of the filter + // currently associated with a log group, use [DescribeSubscriptionFilters]. + // + // [DescribeSubscriptionFilters]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeSubscriptionFilters.html + // + // This member is required. + FilterName *string + + // A filter pattern for subscribing to a filtered stream of log events. + // + // This member is required. + FilterPattern *string + + // The name of the log group. + // + // This member is required. + LogGroupName *string + + // This parameter is valid only for log groups that have an active log + // transformer. For more information about log transformers, see [PutTransformer]. + // + // If the log group uses either a log-group level or account-level transformer, + // and you specify true , the subscription filter will be applied on the + // transformed version of the log events instead of the original ingested log + // events. + // + // [PutTransformer]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutTransformer.html + ApplyOnTransformedLogs bool + + // The method used to distribute log data to the destination. By default, log data + // is grouped by log stream, but the grouping can be set to random for a more even + // distribution. This property is only applicable when the destination is an Amazon + // Kinesis data stream. + Distribution types.Distribution + + // A list of system fields to include in the log events sent to the subscription + // destination. Valid values are @aws.account and @aws.region . These fields + // provide source information for centralized log data in the forwarded payload. + EmitSystemFields []string + + // A filter expression that specifies which log events should be processed by this + // subscription filter based on system fields such as source account and source + // region. Uses selection criteria syntax with operators like = , != , AND , OR , + // IN , NOT IN . Example: @aws.region NOT IN ["cn-north-1"] or @aws.account = + // "123456789012" AND @aws.region = "us-east-1" . Maximum length: 2000 characters. + FieldSelectionCriteria *string + + // The ARN of an IAM role that grants CloudWatch Logs permissions to deliver + // ingested log events to the destination stream. You don't need to provide the ARN + // when you are working with a logical destination for cross-account delivery. + RoleArn *string + + noSmithyDocumentSerde +} + +type PutSubscriptionFilterOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutSubscriptionFilterMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpPutSubscriptionFilter{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpPutSubscriptionFilter{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "PutSubscriptionFilter"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpPutSubscriptionFilterValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutSubscriptionFilter(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opPutSubscriptionFilter(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "PutSubscriptionFilter", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutTransformer.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutTransformer.go new file mode 100644 index 00000000000..32880eca200 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_PutTransformer.go @@ -0,0 +1,194 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates or updates a log transformer for a single log group. You use log +// transformers to transform log events into a different format, making them easier +// for you to process and analyze. You can also transform logs from different +// sources into standardized formats that contains relevant, source-specific +// information. +// +// After you have created a transformer, CloudWatch Logs performs the +// transformations at the time of log ingestion. You can then refer to the +// transformed versions of the logs during operations such as querying with +// CloudWatch Logs Insights or creating metric filters or subscription filers. +// +// You can also use a transformer to copy metadata from metadata keys into the log +// events themselves. This metadata can include log group name, log stream name, +// account ID and Region. +// +// A transformer for a log group is a series of processors, where each processor +// applies one type of transformation to the log events ingested into this log +// group. The processors work one after another, in the order that you list them, +// like a pipeline. For more information about the available processors to use in a +// transformer, see [Processors that you can use]. +// +// Having log events in standardized format enables visibility across your +// applications for your log analysis, reporting, and alarming needs. CloudWatch +// Logs provides transformation for common log types with out-of-the-box +// transformation templates for major Amazon Web Services log sources such as VPC +// flow logs, Lambda, and Amazon RDS. You can use pre-built transformation +// templates or create custom transformation policies. +// +// You can create transformers only for the log groups in the Standard log class. +// +// You can also set up a transformer at the account level. For more information, +// see [PutAccountPolicy]. If there is both a log-group level transformer created with PutTransformer +// and an account-level transformer that could apply to the same log group, the log +// group uses only the log-group level transformer. It ignores the account-level +// transformer. +// +// [Processors that you can use]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-Processors +// [PutAccountPolicy]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutAccountPolicy.html +func (c *Client) PutTransformer(ctx context.Context, params *PutTransformerInput, optFns ...func(*Options)) (*PutTransformerOutput, error) { + if params == nil { + params = &PutTransformerInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutTransformer", params, optFns, c.addOperationPutTransformerMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutTransformerOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutTransformerInput struct { + + // Specify either the name or ARN of the log group to create the transformer for. + // + // This member is required. + LogGroupIdentifier *string + + // This structure contains the configuration of this log transformer. A log + // transformer is an array of processors, where each processor applies one type of + // transformation to the log events that are ingested. + // + // This member is required. + TransformerConfig []types.Processor + + noSmithyDocumentSerde +} + +type PutTransformerOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutTransformerMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpPutTransformer{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpPutTransformer{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "PutTransformer"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpPutTransformerValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutTransformer(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opPutTransformer(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "PutTransformer", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_StartLiveTail.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_StartLiveTail.go new file mode 100644 index 00000000000..72cf9389cb2 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_StartLiveTail.go @@ -0,0 +1,379 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithysync "github.com/aws/smithy-go/sync" + smithyhttp "github.com/aws/smithy-go/transport/http" + "sync" +) + +// Starts a Live Tail streaming session for one or more log groups. A Live Tail +// session returns a stream of log events that have been recently ingested in the +// log groups. For more information, see [Use Live Tail to view logs in near real time]. +// +// The response to this operation is a response stream, over which the server +// sends live log events and the client receives them. +// +// The following objects are sent over the stream: +// +// - A single [LiveTailSessionStart]object is sent at the start of the session. +// +// - Every second, a [LiveTailSessionUpdate]object is sent. Each of these objects contains an array of +// the actual log events. +// +// If no new log events were ingested in the past second, the LiveTailSessionUpdate +// +// object will contain an empty array. +// +// The array of log events contained in a LiveTailSessionUpdate can include as many +// +// as 500 log events. If the number of log events matching the request exceeds 500 +// per second, the log events are sampled down to 500 log events to be included in +// each LiveTailSessionUpdate object. +// +// If your client consumes the log events slower than the server produces them, +// +// CloudWatch Logs buffers up to 10 LiveTailSessionUpdate events or 5000 log +// events, after which it starts dropping the oldest events. +// +// - A [SessionStreamingException]object is returned if an unknown error occurs on the server side. +// +// - A [SessionTimeoutException]object is returned when the session times out, after it has been kept +// open for three hours. +// +// The StartLiveTail API routes requests using SDK host prefix injection. SDK +// versions released before April 1, 2026 route to +// streaming-logs.Region.amazonaws.com , which does not support VPC endpoints. SDK +// versions released on or after April 1, 2026 route to +// stream-logs.Region.amazonaws.com , which supports VPC endpoints. To set up a VPC +// endpoint for this API, see [Creating a VPC endpoint for CloudWatch Logs]. +// +// You can end a session before it times out by closing the session stream or by +// closing the client that is receiving the stream. The session also ends if the +// established connection between the client and the server breaks. +// +// For examples of using an SDK to start a Live Tail session, see [Start a Live Tail session using an Amazon Web Services SDK]. +// +// [LiveTailSessionStart]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_LiveTailSessionStart.html +// [LiveTailSessionUpdate]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_LiveTailSessionUpdate.html +// [Use Live Tail to view logs in near real time]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatchLogs_LiveTail.html +// [Creating a VPC endpoint for CloudWatch Logs]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/cloudwatch-logs-and-interface-VPC.html#create-VPC-endpoint-for-CloudWatchLogs +// [Start a Live Tail session using an Amazon Web Services SDK]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/example_cloudwatch-logs_StartLiveTail_section.html +// +// [SessionTimeoutException]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_StartLiveTailResponseStream.html#CWL-Type-StartLiveTailResponseStream-SessionTimeoutException +// [SessionStreamingException]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_StartLiveTailResponseStream.html#CWL-Type-StartLiveTailResponseStream-SessionStreamingException +func (c *Client) StartLiveTail(ctx context.Context, params *StartLiveTailInput, optFns ...func(*Options)) (*StartLiveTailOutput, error) { + if params == nil { + params = &StartLiveTailInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StartLiveTail", params, optFns, c.addOperationStartLiveTailMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StartLiveTailOutput) + out.ResultMetadata = metadata + return out, nil +} + +type StartLiveTailInput struct { + + // An array where each item in the array is a log group to include in the Live + // Tail session. + // + // Specify each log group by its ARN. + // + // If you specify an ARN, the ARN can't end with an asterisk (*). + // + // You can include up to 10 log groups. + // + // This member is required. + LogGroupIdentifiers []string + + // An optional pattern to use to filter the results to include only log events + // that match the pattern. For example, a filter pattern of error 404 causes only + // log events that include both error and 404 to be included in the Live Tail + // stream. + // + // Regular expression filter patterns are supported. + // + // For more information about filter pattern syntax, see [Filter and Pattern Syntax]. + // + // [Filter and Pattern Syntax]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html + LogEventFilterPattern *string + + // If you specify this parameter, then only log events in the log streams that + // have names that start with the prefixes that you specify here are included in + // the Live Tail session. + // + // If you specify this field, you can't also specify the logStreamNames field. + // + // You can specify this parameter only if you specify only one log group in + // logGroupIdentifiers . + LogStreamNamePrefixes []string + + // If you specify this parameter, then only log events in the log streams that you + // specify here are included in the Live Tail session. + // + // If you specify this field, you can't also specify the logStreamNamePrefixes + // field. + // + // You can specify this parameter only if you specify only one log group in + // logGroupIdentifiers . + LogStreamNames []string + + noSmithyDocumentSerde +} + +type StartLiveTailOutput struct { + eventStream *StartLiveTailEventStream + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +// GetStream returns the type to interact with the event stream. +func (o *StartLiveTailOutput) GetStream() *StartLiveTailEventStream { + return o.eventStream +} + +func (c *Client) addOperationStartLiveTailMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpStartLiveTail{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpStartLiveTail{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "StartLiveTail"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addEventStreamStartLiveTailMiddleware(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addEndpointPrefix_opStartLiveTailMiddleware(stack); err != nil { + return err + } + if err = addOpStartLiveTailValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartLiveTail(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +type endpointPrefix_opStartLiveTailMiddleware struct { +} + +func (*endpointPrefix_opStartLiveTailMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opStartLiveTailMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "streaming-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opStartLiveTailMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opStartLiveTailMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +func newServiceMetadataMiddleware_opStartLiveTail(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "StartLiveTail", + } +} + +// StartLiveTailEventStream provides the event stream handling for the StartLiveTail operation. +// +// For testing and mocking the event stream this type should be initialized via +// the NewStartLiveTailEventStream constructor function. Using the functional options +// to pass in nested mock behavior. +type StartLiveTailEventStream struct { + // StartLiveTailResponseStreamReader is the EventStream reader for the + // StartLiveTailResponseStream events. This value is automatically set by the SDK + // when the API call is made Use this member when unit testing your code with the + // SDK to mock out the EventStream Reader. + // + // Must not be nil. + Reader StartLiveTailResponseStreamReader + + done chan struct{} + closeOnce sync.Once + err *smithysync.OnceErr +} + +// NewStartLiveTailEventStream initializes an StartLiveTailEventStream. +// This function should only be used for testing and mocking the StartLiveTailEventStream +// stream within your application. +// +// The Reader member must be set before reading events from the stream. +func NewStartLiveTailEventStream(optFns ...func(*StartLiveTailEventStream)) *StartLiveTailEventStream { + es := &StartLiveTailEventStream{ + done: make(chan struct{}), + err: smithysync.NewOnceErr(), + } + for _, fn := range optFns { + fn(es) + } + return es +} + +// Events returns a channel to read events from. +func (es *StartLiveTailEventStream) Events() <-chan types.StartLiveTailResponseStream { + return es.Reader.Events() +} + +// Close closes the stream. This will also cause the stream to be closed. +// Close must be called when done using the stream API. Not calling Close +// may result in resource leaks. +// +// Will close the underlying EventStream writer and reader, and no more events can be +// sent or received. +func (es *StartLiveTailEventStream) Close() error { + es.closeOnce.Do(es.safeClose) + return es.Err() +} + +func (es *StartLiveTailEventStream) safeClose() { + close(es.done) + + es.Reader.Close() +} + +// Err returns any error that occurred while reading or writing EventStream Events +// from the service API's response. Returns nil if there were no errors. +func (es *StartLiveTailEventStream) Err() error { + if err := es.err.Err(); err != nil { + return err + } + + if err := es.Reader.Err(); err != nil { + return err + } + + return nil +} + +func (es *StartLiveTailEventStream) waitStreamClose() { + type errorSet interface { + ErrorSet() <-chan struct{} + } + + var outputErrCh <-chan struct{} + if v, ok := es.Reader.(errorSet); ok { + outputErrCh = v.ErrorSet() + } + var outputClosedCh <-chan struct{} + if v, ok := es.Reader.(interface{ Closed() <-chan struct{} }); ok { + outputClosedCh = v.Closed() + } + + select { + case <-es.done: + case <-outputErrCh: + es.err.SetError(es.Reader.Err()) + es.Close() + + case <-outputClosedCh: + if err := es.Reader.Err(); err != nil { + es.err.SetError(es.Reader.Err()) + } + es.Close() + + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_StartQuery.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_StartQuery.go new file mode 100644 index 00000000000..3f73cd00ca9 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_StartQuery.go @@ -0,0 +1,264 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Starts a query of one or more log groups or data sources using CloudWatch Logs +// Insights. You specify the log groups or data sources and time range to query and +// the query string to use. You can query up to 10 data sources in a single query. +// +// For more information, see [CloudWatch Logs Insights Query Syntax]. +// +// After you run a query using StartQuery , the query results are stored by +// CloudWatch Logs. You can use [GetQueryResults]to retrieve the results of a query, using the +// queryId that StartQuery returns. +// +// Interactive queries started with StartQuery share concurrency limits with +// automated scheduled query executions. Both types of queries count toward the +// same regional concurrent query quota, so high scheduled query activity may +// affect the availability of concurrent slots for interactive queries. +// +// To specify the log groups to query, a StartQuery operation must include one of +// the following: +// +// - Either exactly one of the following parameters: logGroupName , logGroupNames +// , or logGroupIdentifiers +// +// - Or the queryString must include a SOURCE command to select log groups for +// the query. The SOURCE command can select log groups based on log group name +// prefix, account ID, and log class, or select data sources using dataSource +// syntax in LogsQL, PPL, and SQL. +// +// For more information about the SOURCE command, see [SOURCE]. +// +// If you have associated a KMS key with the query results in this account, then [StartQuery] +// uses that key to encrypt the results when it stores them. If no key is +// associated with query results, the query results are encrypted with the default +// CloudWatch Logs encryption method. +// +// Queries time out after 60 minutes of runtime. If your queries are timing out, +// reduce the time range being searched or partition your query into a number of +// queries. +// +// If you are using CloudWatch cross-account observability, you can use this +// operation in a monitoring account to start a query in a linked source account. +// For more information, see [CloudWatch cross-account observability]. For a cross-account StartQuery operation, the query +// definition must be defined in the monitoring account. +// +// You can have up to 100 concurrent CloudWatch Logs insights queries, including +// queries that have been added to dashboards. +// +// [CloudWatch Logs Insights Query Syntax]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html +// [CloudWatch cross-account observability]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html +// [SOURCE]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax-Source.html +// [GetQueryResults]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetQueryResults.html +// [StartQuery]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_StartQuery.html +func (c *Client) StartQuery(ctx context.Context, params *StartQueryInput, optFns ...func(*Options)) (*StartQueryOutput, error) { + if params == nil { + params = &StartQueryInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StartQuery", params, optFns, c.addOperationStartQueryMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StartQueryOutput) + out.ResultMetadata = metadata + return out, nil +} + +type StartQueryInput struct { + + // The end of the time range to query. The range is inclusive, so the specified + // end time is included in the query. Specified as epoch time, the number of + // seconds since January 1, 1970, 00:00:00 UTC . + // + // This member is required. + EndTime *int64 + + // The query string to use. For more information, see [CloudWatch Logs Insights Query Syntax]. + // + // [CloudWatch Logs Insights Query Syntax]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html + // + // This member is required. + QueryString *string + + // The beginning of the time range to query. The range is inclusive, so the + // specified start time is included in the query. Specified as epoch time, the + // number of seconds since January 1, 1970, 00:00:00 UTC . + // + // This member is required. + StartTime *int64 + + // The maximum number of log events to return in the query. If the query string + // uses the fields command, only the specified fields and their values are + // returned. The default is 10,000. + Limit *int32 + + // The list of log groups to query. You can include up to 50 log groups. + // + // You can specify them by the log group name or ARN. If a log group that you're + // querying is in a source account and you're using a monitoring account, you must + // specify the ARN of the log group here. The query definition must also be defined + // in the monitoring account. + // + // If you specify an ARN, use the format + // arn:aws:logs:region:account-id:log-group:log_group_name Don't include an * at + // the end. + // + // A StartQuery operation must include exactly one of the following parameters: + // logGroupName , logGroupNames , or logGroupIdentifiers . The exception is queries + // using the OpenSearch Service SQL query language, where you specify the log group + // names inside the querystring instead of here. + LogGroupIdentifiers []string + + // The log group on which to perform the query. + // + // A StartQuery operation must include exactly one of the following parameters: + // logGroupName , logGroupNames , or logGroupIdentifiers . The exception is queries + // using the OpenSearch Service SQL query language, where you specify the log group + // names inside the querystring instead of here. + LogGroupName *string + + // The list of log groups to be queried. You can include up to 50 log groups. + // + // A StartQuery operation must include exactly one of the following parameters: + // logGroupName , logGroupNames , or logGroupIdentifiers . The exception is queries + // using the OpenSearch Service SQL query language, where you specify the log group + // names inside the querystring instead of here. + LogGroupNames []string + + // Specify the query language to use for this query. The options are Logs Insights + // QL, OpenSearch PPL, and OpenSearch SQL. For more information about the query + // languages that CloudWatch Logs supports, see [Supported query languages]. + // + // [Supported query languages]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_AnalyzeLogData_Languages.html + QueryLanguage types.QueryLanguage + + noSmithyDocumentSerde +} + +type StartQueryOutput struct { + + // The unique ID of the query. + QueryId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationStartQueryMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpStartQuery{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpStartQuery{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "StartQuery"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpStartQueryValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartQuery(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opStartQuery(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "StartQuery", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_StopQuery.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_StopQuery.go new file mode 100644 index 00000000000..19ad02cb36f --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_StopQuery.go @@ -0,0 +1,160 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Stops a CloudWatch Logs Insights query that is in progress. If the query has +// already ended, the operation returns an error indicating that the specified +// query is not running. +// +// This operation can be used to cancel both interactive queries and individual +// scheduled query executions. When used with scheduled queries, StopQuery cancels +// only the specific execution identified by the query ID, not the scheduled query +// configuration itself. +func (c *Client) StopQuery(ctx context.Context, params *StopQueryInput, optFns ...func(*Options)) (*StopQueryOutput, error) { + if params == nil { + params = &StopQueryInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StopQuery", params, optFns, c.addOperationStopQueryMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StopQueryOutput) + out.ResultMetadata = metadata + return out, nil +} + +type StopQueryInput struct { + + // The ID number of the query to stop. To find this ID number, use DescribeQueries . + // + // This member is required. + QueryId *string + + noSmithyDocumentSerde +} + +type StopQueryOutput struct { + + // This is true if the query was stopped by the StopQuery operation. + Success bool + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationStopQueryMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpStopQuery{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpStopQuery{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "StopQuery"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpStopQueryValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStopQuery(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opStopQuery(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "StopQuery", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_TagLogGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_TagLogGroup.go new file mode 100644 index 00000000000..68e6b236e6b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_TagLogGroup.go @@ -0,0 +1,173 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// The TagLogGroup operation is on the path to deprecation. We recommend that you +// use [TagResource]instead. +// +// Adds or updates the specified tags for the specified log group. +// +// To list the tags for a log group, use [ListTagsForResource]. To remove tags, use [UntagResource]. +// +// For more information about tags, see [Tag Log Groups in Amazon CloudWatch Logs] in the Amazon CloudWatch Logs User Guide. +// +// CloudWatch Logs doesn't support IAM policies that prevent users from assigning +// specified tags to log groups using the aws:Resource/key-name or aws:TagKeys +// condition keys. For more information about using tags to control access, see [Controlling access to Amazon Web Services resources using tags]. +// +// Deprecated: Please use the generic tagging API TagResource +// +// [TagResource]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_TagResource.html +// [UntagResource]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_UntagResource.html +// [Tag Log Groups in Amazon CloudWatch Logs]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Working-with-log-groups-and-streams.html#log-group-tagging +// [Controlling access to Amazon Web Services resources using tags]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html +// [ListTagsForResource]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_ListTagsForResource.html +func (c *Client) TagLogGroup(ctx context.Context, params *TagLogGroupInput, optFns ...func(*Options)) (*TagLogGroupOutput, error) { + if params == nil { + params = &TagLogGroupInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "TagLogGroup", params, optFns, c.addOperationTagLogGroupMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*TagLogGroupOutput) + out.ResultMetadata = metadata + return out, nil +} + +type TagLogGroupInput struct { + + // The name of the log group. + // + // This member is required. + LogGroupName *string + + // The key-value pairs to use for the tags. + // + // This member is required. + Tags map[string]string + + noSmithyDocumentSerde +} + +type TagLogGroupOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationTagLogGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpTagLogGroup{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpTagLogGroup{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "TagLogGroup"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpTagLogGroupValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagLogGroup(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opTagLogGroup(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "TagLogGroup", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_TagResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_TagResource.go new file mode 100644 index 00000000000..4e44d98edaf --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_TagResource.go @@ -0,0 +1,181 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Assigns one or more tags (key-value pairs) to the specified CloudWatch Logs +// resource. Currently, the only CloudWatch Logs resources that can be tagged are +// log groups and destinations. +// +// Tags can help you organize and categorize your resources. You can also use them +// to scope user permissions by granting a user permission to access or change only +// resources with certain tag values. +// +// Tags don't have any semantic meaning to Amazon Web Services and are interpreted +// strictly as strings of characters. +// +// You can use the TagResource action with a resource that already has tags. If +// you specify a new tag key for the alarm, this tag is appended to the list of +// tags associated with the alarm. If you specify a tag key that is already +// associated with the alarm, the new tag value that you specify replaces the +// previous value for that tag. +// +// You can associate as many as 50 tags with a CloudWatch Logs resource. +func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error) { + if params == nil { + params = &TagResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "TagResource", params, optFns, c.addOperationTagResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*TagResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type TagResourceInput struct { + + // The ARN of the resource that you're adding tags to. + // + // The ARN format of a log group is + // arn:aws:logs:Region:account-id:log-group:log-group-name + // + // The ARN format of a destination is + // arn:aws:logs:Region:account-id:destination:destination-name + // + // For more information about ARN format, see [CloudWatch Logs resources and operations]. + // + // [CloudWatch Logs resources and operations]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html + // + // This member is required. + ResourceArn *string + + // The list of key-value pairs to associate with the resource. + // + // This member is required. + Tags map[string]string + + noSmithyDocumentSerde +} + +type TagResourceOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpTagResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpTagResource{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "TagResource"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpTagResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagResource(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opTagResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "TagResource", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_TestMetricFilter.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_TestMetricFilter.go new file mode 100644 index 00000000000..47fe26e7869 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_TestMetricFilter.go @@ -0,0 +1,164 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Tests the filter pattern of a metric filter against a sample of log event +// messages. You can use this operation to validate the correctness of a metric +// filter pattern. +func (c *Client) TestMetricFilter(ctx context.Context, params *TestMetricFilterInput, optFns ...func(*Options)) (*TestMetricFilterOutput, error) { + if params == nil { + params = &TestMetricFilterInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "TestMetricFilter", params, optFns, c.addOperationTestMetricFilterMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*TestMetricFilterOutput) + out.ResultMetadata = metadata + return out, nil +} + +type TestMetricFilterInput struct { + + // A symbolic description of how CloudWatch Logs should interpret the data in each + // log event. For example, a log event can contain timestamps, IP addresses, + // strings, and so on. You use the filter pattern to specify what to look for in + // the log event message. + // + // This member is required. + FilterPattern *string + + // The log event messages to test. + // + // This member is required. + LogEventMessages []string + + noSmithyDocumentSerde +} + +type TestMetricFilterOutput struct { + + // The matched events. + Matches []types.MetricFilterMatchRecord + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationTestMetricFilterMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpTestMetricFilter{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpTestMetricFilter{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "TestMetricFilter"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpTestMetricFilterValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTestMetricFilter(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opTestMetricFilter(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "TestMetricFilter", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_TestTransformer.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_TestTransformer.go new file mode 100644 index 00000000000..dcf17f5e2c1 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_TestTransformer.go @@ -0,0 +1,164 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Use this operation to test a log transformer. You enter the transformer +// configuration and a set of log events to test with. The operation responds with +// an array that includes the original log events and the transformed versions. +func (c *Client) TestTransformer(ctx context.Context, params *TestTransformerInput, optFns ...func(*Options)) (*TestTransformerOutput, error) { + if params == nil { + params = &TestTransformerInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "TestTransformer", params, optFns, c.addOperationTestTransformerMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*TestTransformerOutput) + out.ResultMetadata = metadata + return out, nil +} + +type TestTransformerInput struct { + + // An array of the raw log events that you want to use to test this transformer. + // + // This member is required. + LogEventMessages []string + + // This structure contains the configuration of this log transformer that you want + // to test. A log transformer is an array of processors, where each processor + // applies one type of transformation to the log events that are ingested. + // + // This member is required. + TransformerConfig []types.Processor + + noSmithyDocumentSerde +} + +type TestTransformerOutput struct { + + // An array where each member of the array includes both the original version and + // the transformed version of one of the log events that you input. + TransformedLogs []types.TransformedLogRecord + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationTestTransformerMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpTestTransformer{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpTestTransformer{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "TestTransformer"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpTestTransformerValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTestTransformer(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opTestTransformer(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "TestTransformer", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_UntagLogGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_UntagLogGroup.go new file mode 100644 index 00000000000..cc12250aebc --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_UntagLogGroup.go @@ -0,0 +1,169 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// The UntagLogGroup operation is on the path to deprecation. We recommend that +// you use [UntagResource]instead. +// +// Removes the specified tags from the specified log group. +// +// To list the tags for a log group, use [ListTagsForResource]. To add tags, use [TagResource]. +// +// When using IAM policies to control tag management for CloudWatch Logs log +// groups, the condition keys aws:Resource/key-name and aws:TagKeys cannot be used +// to restrict which tags users can assign. +// +// Deprecated: Please use the generic tagging API UntagResource +// +// [TagResource]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_TagResource.html +// [UntagResource]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_UntagResource.html +// [ListTagsForResource]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_ListTagsForResource.html +func (c *Client) UntagLogGroup(ctx context.Context, params *UntagLogGroupInput, optFns ...func(*Options)) (*UntagLogGroupOutput, error) { + if params == nil { + params = &UntagLogGroupInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UntagLogGroup", params, optFns, c.addOperationUntagLogGroupMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UntagLogGroupOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UntagLogGroupInput struct { + + // The name of the log group. + // + // This member is required. + LogGroupName *string + + // The tag keys. The corresponding tags are removed from the log group. + // + // This member is required. + Tags []string + + noSmithyDocumentSerde +} + +type UntagLogGroupOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUntagLogGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpUntagLogGroup{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUntagLogGroup{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UntagLogGroup"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpUntagLogGroupValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagLogGroup(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUntagLogGroup(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UntagLogGroup", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_UntagResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_UntagResource.go new file mode 100644 index 00000000000..0b91cc73470 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_UntagResource.go @@ -0,0 +1,164 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Removes one or more tags from the specified resource. +func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error) { + if params == nil { + params = &UntagResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UntagResource", params, optFns, c.addOperationUntagResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UntagResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UntagResourceInput struct { + + // The ARN of the CloudWatch Logs resource that you're removing tags from. + // + // The ARN format of a log group is + // arn:aws:logs:Region:account-id:log-group:log-group-name + // + // The ARN format of a destination is + // arn:aws:logs:Region:account-id:destination:destination-name + // + // For more information about ARN format, see [CloudWatch Logs resources and operations]. + // + // [CloudWatch Logs resources and operations]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html + // + // This member is required. + ResourceArn *string + + // The list of tag keys to remove from the resource. + // + // This member is required. + TagKeys []string + + noSmithyDocumentSerde +} + +type UntagResourceOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpUntagResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUntagResource{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UntagResource"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpUntagResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagResource(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUntagResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UntagResource", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_UpdateAnomaly.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_UpdateAnomaly.go new file mode 100644 index 00000000000..19aa8f828af --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_UpdateAnomaly.go @@ -0,0 +1,192 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Use this operation to suppress anomaly detection for a specified anomaly or +// pattern. If you suppress an anomaly, CloudWatch Logs won't report new +// occurrences of that anomaly and won't update that anomaly with new data. If you +// suppress a pattern, CloudWatch Logs won't report any anomalies related to that +// pattern. +// +// You must specify either anomalyId or patternId , but you can't specify both +// parameters in the same operation. +// +// If you have previously used this operation to suppress detection of a pattern +// or anomaly, you can use it again to cause CloudWatch Logs to end the +// suppression. To do this, use this operation and specify the anomaly or pattern +// to stop suppressing, and omit the suppressionType and suppressionPeriod +// parameters. +func (c *Client) UpdateAnomaly(ctx context.Context, params *UpdateAnomalyInput, optFns ...func(*Options)) (*UpdateAnomalyOutput, error) { + if params == nil { + params = &UpdateAnomalyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateAnomaly", params, optFns, c.addOperationUpdateAnomalyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateAnomalyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateAnomalyInput struct { + + // The ARN of the anomaly detector that this operation is to act on. + // + // This member is required. + AnomalyDetectorArn *string + + // If you are suppressing or unsuppressing an anomaly, specify its unique ID here. + // You can find anomaly IDs by using the [ListAnomalies]operation. + // + // [ListAnomalies]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_ListAnomalies.html + AnomalyId *string + + // Set this to true to prevent CloudWatch Logs from displaying this behavior as an + // anomaly in the future. The behavior is then treated as baseline behavior. + // However, if similar but more severe occurrences of this behavior occur in the + // future, those will still be reported as anomalies. + // + // The default is false + Baseline *bool + + // If you are suppressing or unsuppressing an pattern, specify its unique ID here. + // You can find pattern IDs by using the [ListAnomalies]operation. + // + // [ListAnomalies]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_ListAnomalies.html + PatternId *string + + // If you are temporarily suppressing an anomaly or pattern, use this structure to + // specify how long the suppression is to last. + SuppressionPeriod *types.SuppressionPeriod + + // Use this to specify whether the suppression to be temporary or infinite. If you + // specify LIMITED , you must also specify a suppressionPeriod . If you specify + // INFINITE , any value for suppressionPeriod is ignored. + SuppressionType types.SuppressionType + + noSmithyDocumentSerde +} + +type UpdateAnomalyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateAnomalyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateAnomaly{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateAnomaly{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateAnomaly"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpUpdateAnomalyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateAnomaly(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateAnomaly(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateAnomaly", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_UpdateDeliveryConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_UpdateDeliveryConfiguration.go new file mode 100644 index 00000000000..611ed1137b8 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_UpdateDeliveryConfiguration.go @@ -0,0 +1,166 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Use this operation to update the configuration of a [delivery] to change either the S3 +// path pattern or the format of the delivered logs. You can't use this operation +// to change the source or destination of the delivery. +// +// [delivery]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_Delivery.html +func (c *Client) UpdateDeliveryConfiguration(ctx context.Context, params *UpdateDeliveryConfigurationInput, optFns ...func(*Options)) (*UpdateDeliveryConfigurationOutput, error) { + if params == nil { + params = &UpdateDeliveryConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateDeliveryConfiguration", params, optFns, c.addOperationUpdateDeliveryConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateDeliveryConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateDeliveryConfigurationInput struct { + + // The ID of the delivery to be updated by this request. + // + // This member is required. + Id *string + + // The field delimiter to use between record fields when the final output format + // of a delivery is in Plain , W3C , or Raw format. + FieldDelimiter *string + + // The list of record fields to be delivered to the destination, in order. If the + // delivery's log source has mandatory fields, they must be included in this list. + RecordFields []string + + // This structure contains parameters that are valid only when the delivery's + // delivery destination is an S3 bucket. + S3DeliveryConfiguration *types.S3DeliveryConfiguration + + noSmithyDocumentSerde +} + +type UpdateDeliveryConfigurationOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateDeliveryConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateDeliveryConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateDeliveryConfiguration{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateDeliveryConfiguration"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpUpdateDeliveryConfigurationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateDeliveryConfiguration(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateDeliveryConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateDeliveryConfiguration", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_UpdateLogAnomalyDetector.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_UpdateLogAnomalyDetector.go new file mode 100644 index 00000000000..d1c6c0418fa --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_UpdateLogAnomalyDetector.go @@ -0,0 +1,174 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates an existing log anomaly detector. +func (c *Client) UpdateLogAnomalyDetector(ctx context.Context, params *UpdateLogAnomalyDetectorInput, optFns ...func(*Options)) (*UpdateLogAnomalyDetectorOutput, error) { + if params == nil { + params = &UpdateLogAnomalyDetectorInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateLogAnomalyDetector", params, optFns, c.addOperationUpdateLogAnomalyDetectorMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateLogAnomalyDetectorOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateLogAnomalyDetectorInput struct { + + // The ARN of the anomaly detector that you want to update. + // + // This member is required. + AnomalyDetectorArn *string + + // Use this parameter to pause or restart the anomaly detector. + // + // This member is required. + Enabled *bool + + // The number of days to use as the life cycle of anomalies. After this time, + // anomalies are automatically baselined and the anomaly detector model will treat + // new occurrences of similar event as normal. Therefore, if you do not correct the + // cause of an anomaly during this time, it will be considered normal going forward + // and will not be detected. + AnomalyVisibilityTime *int64 + + // Specifies how often the anomaly detector runs and look for anomalies. Set this + // value according to the frequency that the log group receives new logs. For + // example, if the log group receives new log events every 10 minutes, then setting + // evaluationFrequency to FIFTEEN_MIN might be appropriate. + EvaluationFrequency types.EvaluationFrequency + + // A symbolic description of how CloudWatch Logs should interpret the data in each + // log event. For example, a log event can contain timestamps, IP addresses, + // strings, and so on. You use the filter pattern to specify what to look for in + // the log event message. + FilterPattern *string + + noSmithyDocumentSerde +} + +type UpdateLogAnomalyDetectorOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateLogAnomalyDetectorMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateLogAnomalyDetector{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateLogAnomalyDetector{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateLogAnomalyDetector"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpUpdateLogAnomalyDetectorValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateLogAnomalyDetector(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateLogAnomalyDetector(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateLogAnomalyDetector", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_UpdateLookupTable.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_UpdateLookupTable.go new file mode 100644 index 00000000000..d22fb932ee7 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_UpdateLookupTable.go @@ -0,0 +1,176 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates an existing lookup table by replacing all of its CSV content. After the +// update completes, queries that use this table will use the new data. +// +// This is a full replacement operation. All existing content is replaced with the +// new CSV data. +func (c *Client) UpdateLookupTable(ctx context.Context, params *UpdateLookupTableInput, optFns ...func(*Options)) (*UpdateLookupTableOutput, error) { + if params == nil { + params = &UpdateLookupTableInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateLookupTable", params, optFns, c.addOperationUpdateLookupTableMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateLookupTableOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateLookupTableInput struct { + + // The ARN of the lookup table to update. + // + // This member is required. + LookupTableArn *string + + // The new CSV content to replace the existing data. The first row must be a + // header row with column names. The content must use UTF-8 encoding and not exceed + // 10 MB. + // + // This member is required. + TableBody *string + + // An updated description of the lookup table. + Description *string + + // The ARN of the KMS key to use to encrypt the lookup table data. You can use + // this parameter to add, update, or remove the KMS key. To remove the KMS key and + // use an Amazon Web Services-owned key instead, specify an empty string. + KmsKeyId *string + + noSmithyDocumentSerde +} + +type UpdateLookupTableOutput struct { + + // The time when the lookup table was last updated, expressed as the number of + // milliseconds after Jan 1, 1970 00:00:00 UTC . + LastUpdatedTime *int64 + + // The ARN of the lookup table that was updated. + LookupTableArn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateLookupTableMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateLookupTable{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateLookupTable{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateLookupTable"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpUpdateLookupTableValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateLookupTable(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateLookupTable(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateLookupTable", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_UpdateScheduledQuery.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_UpdateScheduledQuery.go new file mode 100644 index 00000000000..ac77ea672ea --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/api_op_UpdateScheduledQuery.go @@ -0,0 +1,253 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates an existing scheduled query with new configuration. This operation uses +// PUT semantics, allowing modification of query parameters, schedule, and +// destinations. +func (c *Client) UpdateScheduledQuery(ctx context.Context, params *UpdateScheduledQueryInput, optFns ...func(*Options)) (*UpdateScheduledQueryOutput, error) { + if params == nil { + params = &UpdateScheduledQueryInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateScheduledQuery", params, optFns, c.addOperationUpdateScheduledQueryMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateScheduledQueryOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateScheduledQueryInput struct { + + // The updated ARN of the IAM role that grants permissions to execute the query + // and deliver results. + // + // This member is required. + ExecutionRoleArn *string + + // The ARN or name of the scheduled query to update. + // + // This member is required. + Identifier *string + + // The updated query language for the scheduled query. + // + // This member is required. + QueryLanguage types.QueryLanguage + + // The updated query string to execute. + // + // This member is required. + QueryString *string + + // The updated cron expression that defines when the scheduled query runs. + // + // This member is required. + ScheduleExpression *string + + // An updated description for the scheduled query. + Description *string + + // The updated configuration for where to deliver query results. + DestinationConfiguration *types.DestinationConfiguration + + // The updated array of log group names or ARNs to query. + LogGroupIdentifiers []string + + // The updated end time for the scheduled query in Unix epoch format. + ScheduleEndTime *int64 + + // The updated start time for the scheduled query in Unix epoch format. + ScheduleStartTime *int64 + + // The updated time offset in seconds that defines the lookback period for the + // query. + StartTimeOffset *int64 + + // The updated state of the scheduled query. + State types.ScheduledQueryState + + // The updated timezone for evaluating the schedule expression. + Timezone *string + + noSmithyDocumentSerde +} + +type UpdateScheduledQueryOutput struct { + + // The timestamp when the scheduled query was originally created. + CreationTime *int64 + + // The description of the updated scheduled query. + Description *string + + // The destination configuration of the updated scheduled query. + DestinationConfiguration *types.DestinationConfiguration + + // The execution role ARN of the updated scheduled query. + ExecutionRoleArn *string + + // The status of the most recent execution of the updated scheduled query. + LastExecutionStatus types.ExecutionStatus + + // The timestamp when the updated scheduled query was last executed. + LastTriggeredTime *int64 + + // The timestamp when the scheduled query was last updated. + LastUpdatedTime *int64 + + // The log groups queried by the updated scheduled query. + LogGroupIdentifiers []string + + // The name of the updated scheduled query. + Name *string + + // The query language of the updated scheduled query. + QueryLanguage types.QueryLanguage + + // The query string of the updated scheduled query. + QueryString *string + + // The end time of the updated scheduled query. + ScheduleEndTime *int64 + + // The cron expression of the updated scheduled query. + ScheduleExpression *string + + // The start time of the updated scheduled query. + ScheduleStartTime *int64 + + // The ARN of the updated scheduled query. + ScheduledQueryArn *string + + // The time offset of the updated scheduled query. + StartTimeOffset *int64 + + // The state of the updated scheduled query. + State types.ScheduledQueryState + + // The timezone of the updated scheduled query. + Timezone *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateScheduledQueryMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateScheduledQuery{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateScheduledQuery{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateScheduledQuery"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpUpdateScheduledQueryValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateScheduledQuery(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateScheduledQuery(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateScheduledQuery", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/auth.go new file mode 100644 index 00000000000..e745d87d3e5 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/auth.go @@ -0,0 +1,345 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + smithy "github.com/aws/smithy-go" + smithyauth "github.com/aws/smithy-go/auth" + "github.com/aws/smithy-go/metrics" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" + smithyhttp "github.com/aws/smithy-go/transport/http" + "slices" + "strings" +) + +func bindAuthParamsRegion(_ interface{}, params *AuthResolverParameters, _ interface{}, options Options) error { + params.Region = options.Region + return nil +} + +type setLegacyContextSigningOptionsMiddleware struct { +} + +func (*setLegacyContextSigningOptionsMiddleware) ID() string { + return "setLegacyContextSigningOptions" +} + +func (m *setLegacyContextSigningOptionsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + rscheme := getResolvedAuthScheme(ctx) + schemeID := rscheme.Scheme.SchemeID() + + if sn := awsmiddleware.GetSigningName(ctx); sn != "" { + if schemeID == "aws.auth#sigv4" { + smithyhttp.SetSigV4SigningName(&rscheme.SignerProperties, sn) + } else if schemeID == "aws.auth#sigv4a" { + smithyhttp.SetSigV4ASigningName(&rscheme.SignerProperties, sn) + } + } + + if sr := awsmiddleware.GetSigningRegion(ctx); sr != "" { + if schemeID == "aws.auth#sigv4" { + smithyhttp.SetSigV4SigningRegion(&rscheme.SignerProperties, sr) + } else if schemeID == "aws.auth#sigv4a" { + smithyhttp.SetSigV4ASigningRegions(&rscheme.SignerProperties, []string{sr}) + } + } + + return next.HandleFinalize(ctx, in) +} + +func addSetLegacyContextSigningOptionsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&setLegacyContextSigningOptionsMiddleware{}, "Signing", middleware.Before) +} + +type withAnonymous struct { + resolver AuthSchemeResolver +} + +var _ AuthSchemeResolver = (*withAnonymous)(nil) + +func (v *withAnonymous) ResolveAuthSchemes(ctx context.Context, params *AuthResolverParameters) ([]*smithyauth.Option, error) { + opts, err := v.resolver.ResolveAuthSchemes(ctx, params) + if err != nil { + return nil, err + } + + opts = append(opts, &smithyauth.Option{ + SchemeID: smithyauth.SchemeIDAnonymous, + }) + return opts, nil +} + +func wrapWithAnonymousAuth(options *Options) { + if _, ok := options.AuthSchemeResolver.(*defaultAuthSchemeResolver); !ok { + return + } + + options.AuthSchemeResolver = &withAnonymous{ + resolver: options.AuthSchemeResolver, + } +} + +// AuthResolverParameters contains the set of inputs necessary for auth scheme +// resolution. +type AuthResolverParameters struct { + // The name of the operation being invoked. + Operation string + + // The region in which the operation is being invoked. + Region string +} + +func bindAuthResolverParams(ctx context.Context, operation string, input interface{}, options Options) (*AuthResolverParameters, error) { + params := &AuthResolverParameters{ + Operation: operation, + } + + if err := bindAuthParamsRegion(ctx, params, input, options); err != nil { + return nil, err + } + + return params, nil +} + +// AuthSchemeResolver returns a set of possible authentication options for an +// operation. +type AuthSchemeResolver interface { + ResolveAuthSchemes(context.Context, *AuthResolverParameters) ([]*smithyauth.Option, error) +} + +type defaultAuthSchemeResolver struct{} + +var _ AuthSchemeResolver = (*defaultAuthSchemeResolver)(nil) + +func (*defaultAuthSchemeResolver) ResolveAuthSchemes(ctx context.Context, params *AuthResolverParameters) ([]*smithyauth.Option, error) { + if overrides, ok := operationAuthOptions[params.Operation]; ok { + return overrides(params), nil + } + return serviceAuthOptions(params), nil +} + +var operationAuthOptions = map[string]func(*AuthResolverParameters) []*smithyauth.Option{} + +func serviceAuthOptions(params *AuthResolverParameters) []*smithyauth.Option { + return []*smithyauth.Option{ + { + SchemeID: smithyauth.SchemeIDSigV4, + SignerProperties: func() smithy.Properties { + var props smithy.Properties + smithyhttp.SetSigV4SigningName(&props, "logs") + smithyhttp.SetSigV4SigningRegion(&props, params.Region) + return props + }(), + }, + } +} + +type resolveAuthSchemeMiddleware struct { + operation string + options Options +} + +func (*resolveAuthSchemeMiddleware) ID() string { + return "ResolveAuthScheme" +} + +func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "ResolveAuthScheme") + defer span.End() + + params, err := bindAuthResolverParams(ctx, m.operation, getOperationInput(ctx), m.options) + if err != nil { + return out, metadata, fmt.Errorf("bind auth scheme params: %w", err) + } + options, err := m.options.AuthSchemeResolver.ResolveAuthSchemes(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("resolve auth scheme: %w", err) + } + + scheme, ok := m.selectScheme(options) + if !ok { + return out, metadata, fmt.Errorf("could not select an auth scheme") + } + + ctx = setResolvedAuthScheme(ctx, scheme) + + span.SetProperty("auth.scheme_id", scheme.Scheme.SchemeID()) + span.End() + return next.HandleFinalize(ctx, in) +} + +func (m *resolveAuthSchemeMiddleware) selectScheme(options []*smithyauth.Option) (*resolvedAuthScheme, bool) { + sorted := sortAuthOptions(options, m.options.AuthSchemePreference) + for _, option := range sorted { + if option.SchemeID == smithyauth.SchemeIDAnonymous { + return newResolvedAuthScheme(smithyhttp.NewAnonymousScheme(), option), true + } + + for _, scheme := range m.options.AuthSchemes { + if scheme.SchemeID() != option.SchemeID { + continue + } + + if scheme.IdentityResolver(m.options) != nil { + return newResolvedAuthScheme(scheme, option), true + } + } + } + + return nil, false +} + +func sortAuthOptions(options []*smithyauth.Option, preferred []string) []*smithyauth.Option { + byPriority := make([]*smithyauth.Option, 0, len(options)) + for _, prefName := range preferred { + for _, option := range options { + optName := option.SchemeID + if parts := strings.Split(option.SchemeID, "#"); len(parts) == 2 { + optName = parts[1] + } + if prefName == optName { + byPriority = append(byPriority, option) + } + } + } + for _, option := range options { + if !slices.ContainsFunc(byPriority, func(o *smithyauth.Option) bool { + return o.SchemeID == option.SchemeID + }) { + byPriority = append(byPriority, option) + } + } + return byPriority +} + +type resolvedAuthSchemeKey struct{} + +type resolvedAuthScheme struct { + Scheme smithyhttp.AuthScheme + IdentityProperties smithy.Properties + SignerProperties smithy.Properties +} + +func newResolvedAuthScheme(scheme smithyhttp.AuthScheme, option *smithyauth.Option) *resolvedAuthScheme { + return &resolvedAuthScheme{ + Scheme: scheme, + IdentityProperties: option.IdentityProperties, + SignerProperties: option.SignerProperties, + } +} + +func setResolvedAuthScheme(ctx context.Context, scheme *resolvedAuthScheme) context.Context { + return middleware.WithStackValue(ctx, resolvedAuthSchemeKey{}, scheme) +} + +func getResolvedAuthScheme(ctx context.Context) *resolvedAuthScheme { + v, _ := middleware.GetStackValue(ctx, resolvedAuthSchemeKey{}).(*resolvedAuthScheme) + return v +} + +type getIdentityMiddleware struct { + options Options +} + +func (*getIdentityMiddleware) ID() string { + return "GetIdentity" +} + +func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + innerCtx, span := tracing.StartSpan(ctx, "GetIdentity") + defer span.End() + + rscheme := getResolvedAuthScheme(innerCtx) + if rscheme == nil { + return out, metadata, fmt.Errorf("no resolved auth scheme") + } + + resolver := rscheme.Scheme.IdentityResolver(m.options) + if resolver == nil { + return out, metadata, fmt.Errorf("no identity resolver") + } + + identity, err := timeOperationMetric(ctx, "client.call.resolve_identity_duration", + func() (smithyauth.Identity, error) { + return resolver.GetIdentity(innerCtx, rscheme.IdentityProperties) + }, + func(o *metrics.RecordMetricOptions) { + o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID()) + }) + if err != nil { + return out, metadata, fmt.Errorf("get identity: %w", err) + } + + ctx = setIdentity(ctx, identity) + + span.End() + return next.HandleFinalize(ctx, in) +} + +type identityKey struct{} + +func setIdentity(ctx context.Context, identity smithyauth.Identity) context.Context { + return middleware.WithStackValue(ctx, identityKey{}, identity) +} + +func getIdentity(ctx context.Context) smithyauth.Identity { + v, _ := middleware.GetStackValue(ctx, identityKey{}).(smithyauth.Identity) + return v +} + +type signRequestMiddleware struct { + options Options +} + +func (*signRequestMiddleware) ID() string { + return "Signing" +} + +func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "SignRequest") + defer span.End() + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unexpected transport type %T", in.Request) + } + + rscheme := getResolvedAuthScheme(ctx) + if rscheme == nil { + return out, metadata, fmt.Errorf("no resolved auth scheme") + } + + identity := getIdentity(ctx) + if identity == nil { + return out, metadata, fmt.Errorf("no identity") + } + + signer := rscheme.Scheme.Signer() + if signer == nil { + return out, metadata, fmt.Errorf("no signer") + } + + _, err = timeOperationMetric(ctx, "client.call.signing_duration", func() (any, error) { + return nil, signer.SignRequest(ctx, req, identity, rscheme.SignerProperties) + }, func(o *metrics.RecordMetricOptions) { + o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID()) + }) + if err != nil { + return out, metadata, fmt.Errorf("sign request: %w", err) + } + + span.End() + return next.HandleFinalize(ctx, in) +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/deserializers.go new file mode 100644 index 00000000000..9856d803fdf --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/deserializers.go @@ -0,0 +1,28606 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "bytes" + "context" + "encoding/base64" + "encoding/json" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream" + "github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/eventstreamapi" + "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + smithy "github.com/aws/smithy-go" + smithyio "github.com/aws/smithy-go/io" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/ptr" + "github.com/aws/smithy-go/tracing" + smithyhttp "github.com/aws/smithy-go/transport/http" + "io" + "io/ioutil" + "math" + "strings" +) + +type awsAwsjson11_deserializeOpAssociateKmsKey struct { +} + +func (*awsAwsjson11_deserializeOpAssociateKmsKey) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpAssociateKmsKey) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorAssociateKmsKey(response, &metadata) + } + output := &AssociateKmsKeyOutput{} + 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 awsAwsjson11_deserializeOpErrorAssociateKmsKey(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("OperationAbortedException", errorCode): + return awsAwsjson11_deserializeErrorOperationAbortedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpAssociateSourceToS3TableIntegration struct { +} + +func (*awsAwsjson11_deserializeOpAssociateSourceToS3TableIntegration) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpAssociateSourceToS3TableIntegration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorAssociateSourceToS3TableIntegration(response, &metadata) + } + output := &AssociateSourceToS3TableIntegrationOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentAssociateSourceToS3TableIntegrationOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorAssociateSourceToS3TableIntegration(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpCancelExportTask struct { +} + +func (*awsAwsjson11_deserializeOpCancelExportTask) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_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 awsAwsjson11_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 + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidOperationException", errorCode): + return awsAwsjson11_deserializeErrorInvalidOperationException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpCancelImportTask struct { +} + +func (*awsAwsjson11_deserializeOpCancelImportTask) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorCancelImportTask(response, &metadata) + } + output := &CancelImportTaskOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentCancelImportTaskOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_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 + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InvalidOperationException", errorCode): + return awsAwsjson11_deserializeErrorInvalidOperationException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpCreateDelivery struct { +} + +func (*awsAwsjson11_deserializeOpCreateDelivery) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpCreateDelivery) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorCreateDelivery(response, &metadata) + } + output := &CreateDeliveryOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentCreateDeliveryOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorCreateDelivery(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson11_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson11_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpCreateExportTask struct { +} + +func (*awsAwsjson11_deserializeOpCreateExportTask) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpCreateExportTask) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorCreateExportTask(response, &metadata) + } + output := &CreateExportTaskOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentCreateExportTaskOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorCreateExportTask(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("OperationAbortedException", errorCode): + return awsAwsjson11_deserializeErrorOperationAbortedException(response, errorBody) + + case strings.EqualFold("ResourceAlreadyExistsException", errorCode): + return awsAwsjson11_deserializeErrorResourceAlreadyExistsException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpCreateImportTask struct { +} + +func (*awsAwsjson11_deserializeOpCreateImportTask) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpCreateImportTask) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorCreateImportTask(response, &metadata) + } + output := &CreateImportTaskOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentCreateImportTaskOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorCreateImportTask(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson11_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InvalidOperationException", errorCode): + return awsAwsjson11_deserializeErrorInvalidOperationException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpCreateLogAnomalyDetector struct { +} + +func (*awsAwsjson11_deserializeOpCreateLogAnomalyDetector) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpCreateLogAnomalyDetector) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorCreateLogAnomalyDetector(response, &metadata) + } + output := &CreateLogAnomalyDetectorOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentCreateLogAnomalyDetectorOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorCreateLogAnomalyDetector(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("OperationAbortedException", errorCode): + return awsAwsjson11_deserializeErrorOperationAbortedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpCreateLogGroup struct { +} + +func (*awsAwsjson11_deserializeOpCreateLogGroup) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpCreateLogGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorCreateLogGroup(response, &metadata) + } + output := &CreateLogGroupOutput{} + 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 awsAwsjson11_deserializeOpErrorCreateLogGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("OperationAbortedException", errorCode): + return awsAwsjson11_deserializeErrorOperationAbortedException(response, errorBody) + + case strings.EqualFold("ResourceAlreadyExistsException", errorCode): + return awsAwsjson11_deserializeErrorResourceAlreadyExistsException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpCreateLogStream struct { +} + +func (*awsAwsjson11_deserializeOpCreateLogStream) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpCreateLogStream) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorCreateLogStream(response, &metadata) + } + output := &CreateLogStreamOutput{} + 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 awsAwsjson11_deserializeOpErrorCreateLogStream(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ResourceAlreadyExistsException", errorCode): + return awsAwsjson11_deserializeErrorResourceAlreadyExistsException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpCreateLookupTable struct { +} + +func (*awsAwsjson11_deserializeOpCreateLookupTable) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpCreateLookupTable) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorCreateLookupTable(response, &metadata) + } + output := &CreateLookupTableOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentCreateLookupTableOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorCreateLookupTable(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("ResourceAlreadyExistsException", errorCode): + return awsAwsjson11_deserializeErrorResourceAlreadyExistsException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpCreateScheduledQuery struct { +} + +func (*awsAwsjson11_deserializeOpCreateScheduledQuery) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpCreateScheduledQuery) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorCreateScheduledQuery(response, &metadata) + } + output := &CreateScheduledQueryOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentCreateScheduledQueryOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorCreateScheduledQuery(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson11_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson11_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDeleteAccountPolicy struct { +} + +func (*awsAwsjson11_deserializeOpDeleteAccountPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeleteAccountPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteAccountPolicy(response, &metadata) + } + output := &DeleteAccountPolicyOutput{} + 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 awsAwsjson11_deserializeOpErrorDeleteAccountPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("OperationAbortedException", errorCode): + return awsAwsjson11_deserializeErrorOperationAbortedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDeleteDataProtectionPolicy struct { +} + +func (*awsAwsjson11_deserializeOpDeleteDataProtectionPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeleteDataProtectionPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteDataProtectionPolicy(response, &metadata) + } + output := &DeleteDataProtectionPolicyOutput{} + 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 awsAwsjson11_deserializeOpErrorDeleteDataProtectionPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("OperationAbortedException", errorCode): + return awsAwsjson11_deserializeErrorOperationAbortedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDeleteDelivery struct { +} + +func (*awsAwsjson11_deserializeOpDeleteDelivery) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeleteDelivery) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteDelivery(response, &metadata) + } + output := &DeleteDeliveryOutput{} + 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 awsAwsjson11_deserializeOpErrorDeleteDelivery(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson11_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson11_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDeleteDeliveryDestination struct { +} + +func (*awsAwsjson11_deserializeOpDeleteDeliveryDestination) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeleteDeliveryDestination) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteDeliveryDestination(response, &metadata) + } + output := &DeleteDeliveryDestinationOutput{} + 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 awsAwsjson11_deserializeOpErrorDeleteDeliveryDestination(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson11_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson11_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDeleteDeliveryDestinationPolicy struct { +} + +func (*awsAwsjson11_deserializeOpDeleteDeliveryDestinationPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeleteDeliveryDestinationPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteDeliveryDestinationPolicy(response, &metadata) + } + output := &DeleteDeliveryDestinationPolicyOutput{} + 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 awsAwsjson11_deserializeOpErrorDeleteDeliveryDestinationPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson11_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDeleteDeliverySource struct { +} + +func (*awsAwsjson11_deserializeOpDeleteDeliverySource) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeleteDeliverySource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteDeliverySource(response, &metadata) + } + output := &DeleteDeliverySourceOutput{} + 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 awsAwsjson11_deserializeOpErrorDeleteDeliverySource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson11_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson11_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDeleteDestination struct { +} + +func (*awsAwsjson11_deserializeOpDeleteDestination) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeleteDestination) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteDestination(response, &metadata) + } + output := &DeleteDestinationOutput{} + 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 awsAwsjson11_deserializeOpErrorDeleteDestination(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("OperationAbortedException", errorCode): + return awsAwsjson11_deserializeErrorOperationAbortedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDeleteIndexPolicy struct { +} + +func (*awsAwsjson11_deserializeOpDeleteIndexPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeleteIndexPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteIndexPolicy(response, &metadata) + } + output := &DeleteIndexPolicyOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDeleteIndexPolicyOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDeleteIndexPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("OperationAbortedException", errorCode): + return awsAwsjson11_deserializeErrorOperationAbortedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDeleteIntegration struct { +} + +func (*awsAwsjson11_deserializeOpDeleteIntegration) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeleteIntegration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteIntegration(response, &metadata) + } + output := &DeleteIntegrationOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDeleteIntegrationOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDeleteIntegration(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDeleteLogAnomalyDetector struct { +} + +func (*awsAwsjson11_deserializeOpDeleteLogAnomalyDetector) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeleteLogAnomalyDetector) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteLogAnomalyDetector(response, &metadata) + } + output := &DeleteLogAnomalyDetectorOutput{} + 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 awsAwsjson11_deserializeOpErrorDeleteLogAnomalyDetector(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("OperationAbortedException", errorCode): + return awsAwsjson11_deserializeErrorOperationAbortedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDeleteLogGroup struct { +} + +func (*awsAwsjson11_deserializeOpDeleteLogGroup) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeleteLogGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteLogGroup(response, &metadata) + } + output := &DeleteLogGroupOutput{} + 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 awsAwsjson11_deserializeOpErrorDeleteLogGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("OperationAbortedException", errorCode): + return awsAwsjson11_deserializeErrorOperationAbortedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDeleteLogStream struct { +} + +func (*awsAwsjson11_deserializeOpDeleteLogStream) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeleteLogStream) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteLogStream(response, &metadata) + } + output := &DeleteLogStreamOutput{} + 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 awsAwsjson11_deserializeOpErrorDeleteLogStream(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("OperationAbortedException", errorCode): + return awsAwsjson11_deserializeErrorOperationAbortedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDeleteLookupTable struct { +} + +func (*awsAwsjson11_deserializeOpDeleteLookupTable) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeleteLookupTable) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteLookupTable(response, &metadata) + } + output := &DeleteLookupTableOutput{} + 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 awsAwsjson11_deserializeOpErrorDeleteLookupTable(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDeleteMetricFilter struct { +} + +func (*awsAwsjson11_deserializeOpDeleteMetricFilter) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeleteMetricFilter) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteMetricFilter(response, &metadata) + } + output := &DeleteMetricFilterOutput{} + 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 awsAwsjson11_deserializeOpErrorDeleteMetricFilter(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("OperationAbortedException", errorCode): + return awsAwsjson11_deserializeErrorOperationAbortedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDeleteQueryDefinition struct { +} + +func (*awsAwsjson11_deserializeOpDeleteQueryDefinition) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeleteQueryDefinition) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteQueryDefinition(response, &metadata) + } + output := &DeleteQueryDefinitionOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDeleteQueryDefinitionOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDeleteQueryDefinition(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDeleteResourcePolicy struct { +} + +func (*awsAwsjson11_deserializeOpDeleteResourcePolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeleteResourcePolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteResourcePolicy(response, &metadata) + } + output := &DeleteResourcePolicyOutput{} + 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 awsAwsjson11_deserializeOpErrorDeleteResourcePolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("OperationAbortedException", errorCode): + return awsAwsjson11_deserializeErrorOperationAbortedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDeleteRetentionPolicy struct { +} + +func (*awsAwsjson11_deserializeOpDeleteRetentionPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeleteRetentionPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteRetentionPolicy(response, &metadata) + } + output := &DeleteRetentionPolicyOutput{} + 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 awsAwsjson11_deserializeOpErrorDeleteRetentionPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("OperationAbortedException", errorCode): + return awsAwsjson11_deserializeErrorOperationAbortedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDeleteScheduledQuery struct { +} + +func (*awsAwsjson11_deserializeOpDeleteScheduledQuery) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeleteScheduledQuery) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteScheduledQuery(response, &metadata) + } + output := &DeleteScheduledQueryOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDeleteScheduledQueryOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDeleteScheduledQuery(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDeleteSubscriptionFilter struct { +} + +func (*awsAwsjson11_deserializeOpDeleteSubscriptionFilter) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeleteSubscriptionFilter) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteSubscriptionFilter(response, &metadata) + } + output := &DeleteSubscriptionFilterOutput{} + 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 awsAwsjson11_deserializeOpErrorDeleteSubscriptionFilter(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("OperationAbortedException", errorCode): + return awsAwsjson11_deserializeErrorOperationAbortedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDeleteTransformer struct { +} + +func (*awsAwsjson11_deserializeOpDeleteTransformer) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeleteTransformer) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteTransformer(response, &metadata) + } + output := &DeleteTransformerOutput{} + 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 awsAwsjson11_deserializeOpErrorDeleteTransformer(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidOperationException", errorCode): + return awsAwsjson11_deserializeErrorInvalidOperationException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("OperationAbortedException", errorCode): + return awsAwsjson11_deserializeErrorOperationAbortedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeAccountPolicies struct { +} + +func (*awsAwsjson11_deserializeOpDescribeAccountPolicies) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeAccountPolicies) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeAccountPolicies(response, &metadata) + } + output := &DescribeAccountPoliciesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeAccountPoliciesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribeAccountPolicies(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("OperationAbortedException", errorCode): + return awsAwsjson11_deserializeErrorOperationAbortedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeConfigurationTemplates struct { +} + +func (*awsAwsjson11_deserializeOpDescribeConfigurationTemplates) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeConfigurationTemplates) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeConfigurationTemplates(response, &metadata) + } + output := &DescribeConfigurationTemplatesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeConfigurationTemplatesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribeConfigurationTemplates(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeDeliveries struct { +} + +func (*awsAwsjson11_deserializeOpDescribeDeliveries) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeDeliveries) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeDeliveries(response, &metadata) + } + output := &DescribeDeliveriesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeDeliveriesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribeDeliveries(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson11_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeDeliveryDestinations struct { +} + +func (*awsAwsjson11_deserializeOpDescribeDeliveryDestinations) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeDeliveryDestinations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeDeliveryDestinations(response, &metadata) + } + output := &DescribeDeliveryDestinationsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeDeliveryDestinationsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribeDeliveryDestinations(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson11_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeDeliverySources struct { +} + +func (*awsAwsjson11_deserializeOpDescribeDeliverySources) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeDeliverySources) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeDeliverySources(response, &metadata) + } + output := &DescribeDeliverySourcesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeDeliverySourcesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribeDeliverySources(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson11_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeDestinations struct { +} + +func (*awsAwsjson11_deserializeOpDescribeDestinations) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeDestinations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeDestinations(response, &metadata) + } + output := &DescribeDestinationsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeDestinationsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribeDestinations(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeExportTasks struct { +} + +func (*awsAwsjson11_deserializeOpDescribeExportTasks) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeExportTasks(response, &metadata) + } + output := &DescribeExportTasksOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeExportTasksOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_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 + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeFieldIndexes struct { +} + +func (*awsAwsjson11_deserializeOpDescribeFieldIndexes) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeFieldIndexes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeFieldIndexes(response, &metadata) + } + output := &DescribeFieldIndexesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeFieldIndexesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribeFieldIndexes(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("OperationAbortedException", errorCode): + return awsAwsjson11_deserializeErrorOperationAbortedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeImportTaskBatches struct { +} + +func (*awsAwsjson11_deserializeOpDescribeImportTaskBatches) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeImportTaskBatches) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeImportTaskBatches(response, &metadata) + } + output := &DescribeImportTaskBatchesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeImportTaskBatchesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribeImportTaskBatches(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InvalidOperationException", errorCode): + return awsAwsjson11_deserializeErrorInvalidOperationException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeImportTasks struct { +} + +func (*awsAwsjson11_deserializeOpDescribeImportTasks) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeImportTasks) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeImportTasks(response, &metadata) + } + output := &DescribeImportTasksOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeImportTasksOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribeImportTasks(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InvalidOperationException", errorCode): + return awsAwsjson11_deserializeErrorInvalidOperationException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeIndexPolicies struct { +} + +func (*awsAwsjson11_deserializeOpDescribeIndexPolicies) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeIndexPolicies) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeIndexPolicies(response, &metadata) + } + output := &DescribeIndexPoliciesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeIndexPoliciesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribeIndexPolicies(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("OperationAbortedException", errorCode): + return awsAwsjson11_deserializeErrorOperationAbortedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeLogGroups struct { +} + +func (*awsAwsjson11_deserializeOpDescribeLogGroups) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeLogGroups) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeLogGroups(response, &metadata) + } + output := &DescribeLogGroupsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeLogGroupsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribeLogGroups(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeLogStreams struct { +} + +func (*awsAwsjson11_deserializeOpDescribeLogStreams) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeLogStreams) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeLogStreams(response, &metadata) + } + output := &DescribeLogStreamsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeLogStreamsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribeLogStreams(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeLookupTables struct { +} + +func (*awsAwsjson11_deserializeOpDescribeLookupTables) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeLookupTables) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeLookupTables(response, &metadata) + } + output := &DescribeLookupTablesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeLookupTablesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribeLookupTables(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeMetricFilters struct { +} + +func (*awsAwsjson11_deserializeOpDescribeMetricFilters) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeMetricFilters) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeMetricFilters(response, &metadata) + } + output := &DescribeMetricFiltersOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeMetricFiltersOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribeMetricFilters(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeQueries struct { +} + +func (*awsAwsjson11_deserializeOpDescribeQueries) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeQueries) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeQueries(response, &metadata) + } + output := &DescribeQueriesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeQueriesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribeQueries(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeQueryDefinitions struct { +} + +func (*awsAwsjson11_deserializeOpDescribeQueryDefinitions) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeQueryDefinitions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeQueryDefinitions(response, &metadata) + } + output := &DescribeQueryDefinitionsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeQueryDefinitionsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribeQueryDefinitions(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeResourcePolicies struct { +} + +func (*awsAwsjson11_deserializeOpDescribeResourcePolicies) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeResourcePolicies) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeResourcePolicies(response, &metadata) + } + output := &DescribeResourcePoliciesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeResourcePoliciesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribeResourcePolicies(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeSubscriptionFilters struct { +} + +func (*awsAwsjson11_deserializeOpDescribeSubscriptionFilters) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeSubscriptionFilters) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeSubscriptionFilters(response, &metadata) + } + output := &DescribeSubscriptionFiltersOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeSubscriptionFiltersOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribeSubscriptionFilters(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDisassociateKmsKey struct { +} + +func (*awsAwsjson11_deserializeOpDisassociateKmsKey) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDisassociateKmsKey) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDisassociateKmsKey(response, &metadata) + } + output := &DisassociateKmsKeyOutput{} + 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 awsAwsjson11_deserializeOpErrorDisassociateKmsKey(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("OperationAbortedException", errorCode): + return awsAwsjson11_deserializeErrorOperationAbortedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDisassociateSourceFromS3TableIntegration struct { +} + +func (*awsAwsjson11_deserializeOpDisassociateSourceFromS3TableIntegration) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDisassociateSourceFromS3TableIntegration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDisassociateSourceFromS3TableIntegration(response, &metadata) + } + output := &DisassociateSourceFromS3TableIntegrationOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDisassociateSourceFromS3TableIntegrationOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDisassociateSourceFromS3TableIntegration(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpFilterLogEvents struct { +} + +func (*awsAwsjson11_deserializeOpFilterLogEvents) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpFilterLogEvents) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorFilterLogEvents(response, &metadata) + } + output := &FilterLogEventsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentFilterLogEventsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorFilterLogEvents(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetDataProtectionPolicy struct { +} + +func (*awsAwsjson11_deserializeOpGetDataProtectionPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetDataProtectionPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetDataProtectionPolicy(response, &metadata) + } + output := &GetDataProtectionPolicyOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetDataProtectionPolicyOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetDataProtectionPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("OperationAbortedException", errorCode): + return awsAwsjson11_deserializeErrorOperationAbortedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetDelivery struct { +} + +func (*awsAwsjson11_deserializeOpGetDelivery) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetDelivery) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetDelivery(response, &metadata) + } + output := &GetDeliveryOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetDeliveryOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetDelivery(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson11_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetDeliveryDestination struct { +} + +func (*awsAwsjson11_deserializeOpGetDeliveryDestination) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetDeliveryDestination) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetDeliveryDestination(response, &metadata) + } + output := &GetDeliveryDestinationOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetDeliveryDestinationOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetDeliveryDestination(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson11_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetDeliveryDestinationPolicy struct { +} + +func (*awsAwsjson11_deserializeOpGetDeliveryDestinationPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetDeliveryDestinationPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetDeliveryDestinationPolicy(response, &metadata) + } + output := &GetDeliveryDestinationPolicyOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetDeliveryDestinationPolicyOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetDeliveryDestinationPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetDeliverySource struct { +} + +func (*awsAwsjson11_deserializeOpGetDeliverySource) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetDeliverySource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetDeliverySource(response, &metadata) + } + output := &GetDeliverySourceOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetDeliverySourceOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetDeliverySource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson11_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetIntegration struct { +} + +func (*awsAwsjson11_deserializeOpGetIntegration) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetIntegration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetIntegration(response, &metadata) + } + output := &GetIntegrationOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetIntegrationOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetIntegration(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetLogAnomalyDetector struct { +} + +func (*awsAwsjson11_deserializeOpGetLogAnomalyDetector) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetLogAnomalyDetector) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetLogAnomalyDetector(response, &metadata) + } + output := &GetLogAnomalyDetectorOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetLogAnomalyDetectorOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetLogAnomalyDetector(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("OperationAbortedException", errorCode): + return awsAwsjson11_deserializeErrorOperationAbortedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetLogEvents struct { +} + +func (*awsAwsjson11_deserializeOpGetLogEvents) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetLogEvents) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetLogEvents(response, &metadata) + } + output := &GetLogEventsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetLogEventsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetLogEvents(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetLogFields struct { +} + +func (*awsAwsjson11_deserializeOpGetLogFields) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetLogFields) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetLogFields(response, &metadata) + } + output := &GetLogFieldsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetLogFieldsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetLogFields(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("OperationAbortedException", errorCode): + return awsAwsjson11_deserializeErrorOperationAbortedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetLogGroupFields struct { +} + +func (*awsAwsjson11_deserializeOpGetLogGroupFields) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetLogGroupFields) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetLogGroupFields(response, &metadata) + } + output := &GetLogGroupFieldsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetLogGroupFieldsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetLogGroupFields(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetLogObject struct { +} + +func (*awsAwsjson11_deserializeOpGetLogObject) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetLogObject) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetLogObject(response, &metadata) + } + output := &GetLogObjectOutput{} + out.Result = output + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetLogObject(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InvalidOperationException", errorCode): + return awsAwsjson11_deserializeErrorInvalidOperationException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetLogRecord struct { +} + +func (*awsAwsjson11_deserializeOpGetLogRecord) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetLogRecord) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetLogRecord(response, &metadata) + } + output := &GetLogRecordOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetLogRecordOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetLogRecord(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetLookupTable struct { +} + +func (*awsAwsjson11_deserializeOpGetLookupTable) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetLookupTable) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetLookupTable(response, &metadata) + } + output := &GetLookupTableOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetLookupTableOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetLookupTable(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetQueryResults struct { +} + +func (*awsAwsjson11_deserializeOpGetQueryResults) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetQueryResults) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetQueryResults(response, &metadata) + } + output := &GetQueryResultsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetQueryResultsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetQueryResults(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetScheduledQuery struct { +} + +func (*awsAwsjson11_deserializeOpGetScheduledQuery) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetScheduledQuery) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetScheduledQuery(response, &metadata) + } + output := &GetScheduledQueryOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetScheduledQueryOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetScheduledQuery(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetScheduledQueryHistory struct { +} + +func (*awsAwsjson11_deserializeOpGetScheduledQueryHistory) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetScheduledQueryHistory) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetScheduledQueryHistory(response, &metadata) + } + output := &GetScheduledQueryHistoryOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetScheduledQueryHistoryOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetScheduledQueryHistory(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetTransformer struct { +} + +func (*awsAwsjson11_deserializeOpGetTransformer) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetTransformer) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetTransformer(response, &metadata) + } + output := &GetTransformerOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetTransformerOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetTransformer(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidOperationException", errorCode): + return awsAwsjson11_deserializeErrorInvalidOperationException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListAggregateLogGroupSummaries struct { +} + +func (*awsAwsjson11_deserializeOpListAggregateLogGroupSummaries) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListAggregateLogGroupSummaries) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorListAggregateLogGroupSummaries(response, &metadata) + } + output := &ListAggregateLogGroupSummariesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentListAggregateLogGroupSummariesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorListAggregateLogGroupSummaries(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListAnomalies struct { +} + +func (*awsAwsjson11_deserializeOpListAnomalies) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListAnomalies) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorListAnomalies(response, &metadata) + } + output := &ListAnomaliesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentListAnomaliesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorListAnomalies(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("OperationAbortedException", errorCode): + return awsAwsjson11_deserializeErrorOperationAbortedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListIntegrations struct { +} + +func (*awsAwsjson11_deserializeOpListIntegrations) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListIntegrations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorListIntegrations(response, &metadata) + } + output := &ListIntegrationsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentListIntegrationsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorListIntegrations(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListLogAnomalyDetectors struct { +} + +func (*awsAwsjson11_deserializeOpListLogAnomalyDetectors) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListLogAnomalyDetectors) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorListLogAnomalyDetectors(response, &metadata) + } + output := &ListLogAnomalyDetectorsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentListLogAnomalyDetectorsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorListLogAnomalyDetectors(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("OperationAbortedException", errorCode): + return awsAwsjson11_deserializeErrorOperationAbortedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListLogGroups struct { +} + +func (*awsAwsjson11_deserializeOpListLogGroups) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListLogGroups) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorListLogGroups(response, &metadata) + } + output := &ListLogGroupsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentListLogGroupsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorListLogGroups(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListLogGroupsForQuery struct { +} + +func (*awsAwsjson11_deserializeOpListLogGroupsForQuery) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListLogGroupsForQuery) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorListLogGroupsForQuery(response, &metadata) + } + output := &ListLogGroupsForQueryOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentListLogGroupsForQueryOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorListLogGroupsForQuery(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListScheduledQueries struct { +} + +func (*awsAwsjson11_deserializeOpListScheduledQueries) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListScheduledQueries) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorListScheduledQueries(response, &metadata) + } + output := &ListScheduledQueriesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentListScheduledQueriesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorListScheduledQueries(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListSourcesForS3TableIntegration struct { +} + +func (*awsAwsjson11_deserializeOpListSourcesForS3TableIntegration) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListSourcesForS3TableIntegration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorListSourcesForS3TableIntegration(response, &metadata) + } + output := &ListSourcesForS3TableIntegrationOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentListSourcesForS3TableIntegrationOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorListSourcesForS3TableIntegration(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListTagsForResource struct { +} + +func (*awsAwsjson11_deserializeOpListTagsForResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorListTagsForResource(response, &metadata) + } + output := &ListTagsForResourceOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentListTagsForResourceOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListTagsLogGroup struct { +} + +func (*awsAwsjson11_deserializeOpListTagsLogGroup) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListTagsLogGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorListTagsLogGroup(response, &metadata) + } + output := &ListTagsLogGroupOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentListTagsLogGroupOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorListTagsLogGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpPutAccountPolicy struct { +} + +func (*awsAwsjson11_deserializeOpPutAccountPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpPutAccountPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorPutAccountPolicy(response, &metadata) + } + output := &PutAccountPolicyOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentPutAccountPolicyOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorPutAccountPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("OperationAbortedException", errorCode): + return awsAwsjson11_deserializeErrorOperationAbortedException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpPutBearerTokenAuthentication struct { +} + +func (*awsAwsjson11_deserializeOpPutBearerTokenAuthentication) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpPutBearerTokenAuthentication) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorPutBearerTokenAuthentication(response, &metadata) + } + output := &PutBearerTokenAuthenticationOutput{} + 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 awsAwsjson11_deserializeOpErrorPutBearerTokenAuthentication(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InvalidOperationException", errorCode): + return awsAwsjson11_deserializeErrorInvalidOperationException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("OperationAbortedException", errorCode): + return awsAwsjson11_deserializeErrorOperationAbortedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpPutDataProtectionPolicy struct { +} + +func (*awsAwsjson11_deserializeOpPutDataProtectionPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpPutDataProtectionPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorPutDataProtectionPolicy(response, &metadata) + } + output := &PutDataProtectionPolicyOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentPutDataProtectionPolicyOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorPutDataProtectionPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("OperationAbortedException", errorCode): + return awsAwsjson11_deserializeErrorOperationAbortedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpPutDeliveryDestination struct { +} + +func (*awsAwsjson11_deserializeOpPutDeliveryDestination) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpPutDeliveryDestination) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorPutDeliveryDestination(response, &metadata) + } + output := &PutDeliveryDestinationOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentPutDeliveryDestinationOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorPutDeliveryDestination(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson11_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson11_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpPutDeliveryDestinationPolicy struct { +} + +func (*awsAwsjson11_deserializeOpPutDeliveryDestinationPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpPutDeliveryDestinationPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorPutDeliveryDestinationPolicy(response, &metadata) + } + output := &PutDeliveryDestinationPolicyOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentPutDeliveryDestinationPolicyOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorPutDeliveryDestinationPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson11_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpPutDeliverySource struct { +} + +func (*awsAwsjson11_deserializeOpPutDeliverySource) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpPutDeliverySource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorPutDeliverySource(response, &metadata) + } + output := &PutDeliverySourceOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentPutDeliverySourceOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorPutDeliverySource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson11_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson11_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpPutDestination struct { +} + +func (*awsAwsjson11_deserializeOpPutDestination) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpPutDestination) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorPutDestination(response, &metadata) + } + output := &PutDestinationOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentPutDestinationOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorPutDestination(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("OperationAbortedException", errorCode): + return awsAwsjson11_deserializeErrorOperationAbortedException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpPutDestinationPolicy struct { +} + +func (*awsAwsjson11_deserializeOpPutDestinationPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpPutDestinationPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorPutDestinationPolicy(response, &metadata) + } + output := &PutDestinationPolicyOutput{} + 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 awsAwsjson11_deserializeOpErrorPutDestinationPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("OperationAbortedException", errorCode): + return awsAwsjson11_deserializeErrorOperationAbortedException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpPutIndexPolicy struct { +} + +func (*awsAwsjson11_deserializeOpPutIndexPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpPutIndexPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorPutIndexPolicy(response, &metadata) + } + output := &PutIndexPolicyOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentPutIndexPolicyOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorPutIndexPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("OperationAbortedException", errorCode): + return awsAwsjson11_deserializeErrorOperationAbortedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpPutIntegration struct { +} + +func (*awsAwsjson11_deserializeOpPutIntegration) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpPutIntegration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorPutIntegration(response, &metadata) + } + output := &PutIntegrationOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentPutIntegrationOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorPutIntegration(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpPutLogEvents struct { +} + +func (*awsAwsjson11_deserializeOpPutLogEvents) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpPutLogEvents) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorPutLogEvents(response, &metadata) + } + output := &PutLogEventsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentPutLogEventsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorPutLogEvents(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("DataAlreadyAcceptedException", errorCode): + return awsAwsjson11_deserializeErrorDataAlreadyAcceptedException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("InvalidSequenceTokenException", errorCode): + return awsAwsjson11_deserializeErrorInvalidSequenceTokenException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("UnrecognizedClientException", errorCode): + return awsAwsjson11_deserializeErrorUnrecognizedClientException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpPutLogGroupDeletionProtection struct { +} + +func (*awsAwsjson11_deserializeOpPutLogGroupDeletionProtection) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpPutLogGroupDeletionProtection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorPutLogGroupDeletionProtection(response, &metadata) + } + output := &PutLogGroupDeletionProtectionOutput{} + 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 awsAwsjson11_deserializeOpErrorPutLogGroupDeletionProtection(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InvalidOperationException", errorCode): + return awsAwsjson11_deserializeErrorInvalidOperationException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("OperationAbortedException", errorCode): + return awsAwsjson11_deserializeErrorOperationAbortedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpPutMetricFilter struct { +} + +func (*awsAwsjson11_deserializeOpPutMetricFilter) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpPutMetricFilter) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorPutMetricFilter(response, &metadata) + } + output := &PutMetricFilterOutput{} + 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 awsAwsjson11_deserializeOpErrorPutMetricFilter(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidOperationException", errorCode): + return awsAwsjson11_deserializeErrorInvalidOperationException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("OperationAbortedException", errorCode): + return awsAwsjson11_deserializeErrorOperationAbortedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpPutQueryDefinition struct { +} + +func (*awsAwsjson11_deserializeOpPutQueryDefinition) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpPutQueryDefinition) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorPutQueryDefinition(response, &metadata) + } + output := &PutQueryDefinitionOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentPutQueryDefinitionOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorPutQueryDefinition(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpPutResourcePolicy struct { +} + +func (*awsAwsjson11_deserializeOpPutResourcePolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpPutResourcePolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorPutResourcePolicy(response, &metadata) + } + output := &PutResourcePolicyOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentPutResourcePolicyOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorPutResourcePolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("OperationAbortedException", errorCode): + return awsAwsjson11_deserializeErrorOperationAbortedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpPutRetentionPolicy struct { +} + +func (*awsAwsjson11_deserializeOpPutRetentionPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpPutRetentionPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorPutRetentionPolicy(response, &metadata) + } + output := &PutRetentionPolicyOutput{} + 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 awsAwsjson11_deserializeOpErrorPutRetentionPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("OperationAbortedException", errorCode): + return awsAwsjson11_deserializeErrorOperationAbortedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpPutSubscriptionFilter struct { +} + +func (*awsAwsjson11_deserializeOpPutSubscriptionFilter) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpPutSubscriptionFilter) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorPutSubscriptionFilter(response, &metadata) + } + output := &PutSubscriptionFilterOutput{} + 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 awsAwsjson11_deserializeOpErrorPutSubscriptionFilter(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidOperationException", errorCode): + return awsAwsjson11_deserializeErrorInvalidOperationException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("OperationAbortedException", errorCode): + return awsAwsjson11_deserializeErrorOperationAbortedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpPutTransformer struct { +} + +func (*awsAwsjson11_deserializeOpPutTransformer) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpPutTransformer) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorPutTransformer(response, &metadata) + } + output := &PutTransformerOutput{} + 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 awsAwsjson11_deserializeOpErrorPutTransformer(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidOperationException", errorCode): + return awsAwsjson11_deserializeErrorInvalidOperationException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("OperationAbortedException", errorCode): + return awsAwsjson11_deserializeErrorOperationAbortedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpStartLiveTail struct { +} + +func (*awsAwsjson11_deserializeOpStartLiveTail) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpStartLiveTail) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorStartLiveTail(response, &metadata) + } + output := &StartLiveTailOutput{} + out.Result = output + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorStartLiveTail(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InvalidOperationException", errorCode): + return awsAwsjson11_deserializeErrorInvalidOperationException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpStartQuery struct { +} + +func (*awsAwsjson11_deserializeOpStartQuery) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpStartQuery) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorStartQuery(response, &metadata) + } + output := &StartQueryOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentStartQueryOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorStartQuery(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("MalformedQueryException", errorCode): + return awsAwsjson11_deserializeErrorMalformedQueryException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpStopQuery struct { +} + +func (*awsAwsjson11_deserializeOpStopQuery) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpStopQuery) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorStopQuery(response, &metadata) + } + output := &StopQueryOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentStopQueryOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorStopQuery(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpTagLogGroup struct { +} + +func (*awsAwsjson11_deserializeOpTagLogGroup) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpTagLogGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorTagLogGroup(response, &metadata) + } + output := &TagLogGroupOutput{} + 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 awsAwsjson11_deserializeOpErrorTagLogGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpTagResource struct { +} + +func (*awsAwsjson11_deserializeOpTagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorTagResource(response, &metadata) + } + output := &TagResourceOutput{} + 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 awsAwsjson11_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("TooManyTagsException", errorCode): + return awsAwsjson11_deserializeErrorTooManyTagsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpTestMetricFilter struct { +} + +func (*awsAwsjson11_deserializeOpTestMetricFilter) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpTestMetricFilter) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorTestMetricFilter(response, &metadata) + } + output := &TestMetricFilterOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentTestMetricFilterOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorTestMetricFilter(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpTestTransformer struct { +} + +func (*awsAwsjson11_deserializeOpTestTransformer) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpTestTransformer) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorTestTransformer(response, &metadata) + } + output := &TestTransformerOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentTestTransformerOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorTestTransformer(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidOperationException", errorCode): + return awsAwsjson11_deserializeErrorInvalidOperationException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUntagLogGroup struct { +} + +func (*awsAwsjson11_deserializeOpUntagLogGroup) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUntagLogGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUntagLogGroup(response, &metadata) + } + output := &UntagLogGroupOutput{} + 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 awsAwsjson11_deserializeOpErrorUntagLogGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUntagResource struct { +} + +func (*awsAwsjson11_deserializeOpUntagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUntagResource(response, &metadata) + } + output := &UntagResourceOutput{} + 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 awsAwsjson11_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateAnomaly struct { +} + +func (*awsAwsjson11_deserializeOpUpdateAnomaly) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateAnomaly) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateAnomaly(response, &metadata) + } + output := &UpdateAnomalyOutput{} + 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 awsAwsjson11_deserializeOpErrorUpdateAnomaly(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("OperationAbortedException", errorCode): + return awsAwsjson11_deserializeErrorOperationAbortedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateDeliveryConfiguration struct { +} + +func (*awsAwsjson11_deserializeOpUpdateDeliveryConfiguration) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateDeliveryConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateDeliveryConfiguration(response, &metadata) + } + output := &UpdateDeliveryConfigurationOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentUpdateDeliveryConfigurationOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorUpdateDeliveryConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson11_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateLogAnomalyDetector struct { +} + +func (*awsAwsjson11_deserializeOpUpdateLogAnomalyDetector) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateLogAnomalyDetector) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateLogAnomalyDetector(response, &metadata) + } + output := &UpdateLogAnomalyDetectorOutput{} + 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 awsAwsjson11_deserializeOpErrorUpdateLogAnomalyDetector(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("OperationAbortedException", errorCode): + return awsAwsjson11_deserializeErrorOperationAbortedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateLookupTable struct { +} + +func (*awsAwsjson11_deserializeOpUpdateLookupTable) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateLookupTable) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateLookupTable(response, &metadata) + } + output := &UpdateLookupTableOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentUpdateLookupTableOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorUpdateLookupTable(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateScheduledQuery struct { +} + +func (*awsAwsjson11_deserializeOpUpdateScheduledQuery) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateScheduledQuery) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateScheduledQuery(response, &metadata) + } + output := &UpdateScheduledQueryOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentUpdateScheduledQueryOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorUpdateScheduledQuery(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson11_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsAwsjson11_deserializeEventStreamStartLiveTailResponseStream(v *types.StartLiveTailResponseStream, msg *eventstream.Message) error { + if v == nil { + return fmt.Errorf("unexpected serialization of nil %T", v) + } + + eventType := msg.Headers.Get(eventstreamapi.EventTypeHeader) + if eventType == nil { + return fmt.Errorf("%s event header not present", eventstreamapi.EventTypeHeader) + } + + switch { + case strings.EqualFold("sessionStart", eventType.String()): + vv := &types.StartLiveTailResponseStreamMemberSessionStart{} + if err := awsAwsjson11_deserializeEventMessageLiveTailSessionStart(&vv.Value, msg); err != nil { + return err + } + *v = vv + return nil + + case strings.EqualFold("sessionUpdate", eventType.String()): + vv := &types.StartLiveTailResponseStreamMemberSessionUpdate{} + if err := awsAwsjson11_deserializeEventMessageLiveTailSessionUpdate(&vv.Value, msg); err != nil { + return err + } + *v = vv + return nil + + default: + buffer := bytes.NewBuffer(nil) + eventstream.NewEncoder().Encode(buffer, *msg) + *v = &types.UnknownUnionMember{ + Tag: eventType.String(), + Value: buffer.Bytes(), + } + return nil + + } +} + +func awsAwsjson11_deserializeEventStreamExceptionStartLiveTailResponseStream(msg *eventstream.Message) error { + exceptionType := msg.Headers.Get(eventstreamapi.ExceptionTypeHeader) + if exceptionType == nil { + return fmt.Errorf("%s event header not present", eventstreamapi.ExceptionTypeHeader) + } + + switch { + case strings.EqualFold("SessionStreamingException", exceptionType.String()): + return awsAwsjson11_deserializeEventMessageExceptionSessionStreamingException(msg) + + case strings.EqualFold("SessionTimeoutException", exceptionType.String()): + return awsAwsjson11_deserializeEventMessageExceptionSessionTimeoutException(msg) + + default: + br := bytes.NewReader(msg.Payload) + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(br, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + return err + } + errorCode := "UnknownError" + errorMessage := errorCode + if ev := exceptionType.String(); len(ev) > 0 { + errorCode = ev + } else if ev := code; len(ev) > 0 { + errorCode = ev + } + if ev := message; len(ev) > 0 { + errorMessage = ev + } + return &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + + } +} + +func awsAwsjson11_deserializeEventMessageLiveTailSessionStart(v *types.LiveTailSessionStart, msg *eventstream.Message) error { + if v == nil { + return fmt.Errorf("unexpected serialization of nil %T", v) + } + + br := bytes.NewReader(msg.Payload) + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(br, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + if err := awsAwsjson11_deserializeDocumentLiveTailSessionStart(&v, shape); err != nil { + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + } + return nil +} + +func awsAwsjson11_deserializeEventMessageLiveTailSessionUpdate(v *types.LiveTailSessionUpdate, msg *eventstream.Message) error { + if v == nil { + return fmt.Errorf("unexpected serialization of nil %T", v) + } + + br := bytes.NewReader(msg.Payload) + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(br, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + if err := awsAwsjson11_deserializeDocumentLiveTailSessionUpdate(&v, shape); err != nil { + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + } + return nil +} + +func awsAwsjson11_deserializeEventMessageExceptionSessionTimeoutException(msg *eventstream.Message) error { + br := bytes.NewReader(msg.Payload) + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(br, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + v := &types.SessionTimeoutException{} + if err := awsAwsjson11_deserializeDocumentSessionTimeoutException(&v, shape); err != nil { + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + } + return v +} + +func awsAwsjson11_deserializeEventMessageExceptionSessionStreamingException(msg *eventstream.Message) error { + br := bytes.NewReader(msg.Payload) + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(br, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + v := &types.SessionStreamingException{} + if err := awsAwsjson11_deserializeDocumentSessionStreamingException(&v, shape); err != nil { + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + } + return v +} + +func awsAwsjson11_deserializeDocumentInputLogStreamNames(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LogStreamName to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentLiveTailSessionLogEvent(v **types.LiveTailSessionLogEvent, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.LiveTailSessionLogEvent + if *v == nil { + sv = &types.LiveTailSessionLogEvent{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ingestionTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.IngestionTime = ptr.Int64(i64) + } + + case "logGroupIdentifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LogGroupIdentifier to be of type string, got %T instead", value) + } + sv.LogGroupIdentifier = ptr.String(jtv) + } + + case "logStreamName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LogStreamName to be of type string, got %T instead", value) + } + sv.LogStreamName = ptr.String(jtv) + } + + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EventMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "timestamp": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Timestamp = ptr.Int64(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentLiveTailSessionMetadata(v **types.LiveTailSessionMetadata, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.LiveTailSessionMetadata + if *v == nil { + sv = &types.LiveTailSessionMetadata{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "sampled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected IsSampled to be of type *bool, got %T instead", value) + } + sv.Sampled = jtv + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentLiveTailSessionResults(v *[]types.LiveTailSessionLogEvent, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.LiveTailSessionLogEvent + if *v == nil { + cv = []types.LiveTailSessionLogEvent{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.LiveTailSessionLogEvent + destAddr := &col + if err := awsAwsjson11_deserializeDocumentLiveTailSessionLogEvent(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentLiveTailSessionStart(v **types.LiveTailSessionStart, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.LiveTailSessionStart + if *v == nil { + sv = &types.LiveTailSessionStart{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "logEventFilterPattern": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FilterPattern to be of type string, got %T instead", value) + } + sv.LogEventFilterPattern = ptr.String(jtv) + } + + case "logGroupIdentifiers": + if err := awsAwsjson11_deserializeDocumentStartLiveTailLogGroupIdentifiers(&sv.LogGroupIdentifiers, value); err != nil { + return err + } + + case "logStreamNamePrefixes": + if err := awsAwsjson11_deserializeDocumentInputLogStreamNames(&sv.LogStreamNamePrefixes, value); err != nil { + return err + } + + case "logStreamNames": + if err := awsAwsjson11_deserializeDocumentInputLogStreamNames(&sv.LogStreamNames, value); err != nil { + return err + } + + case "requestId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RequestId to be of type string, got %T instead", value) + } + sv.RequestId = ptr.String(jtv) + } + + case "sessionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SessionId to be of type string, got %T instead", value) + } + sv.SessionId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentLiveTailSessionUpdate(v **types.LiveTailSessionUpdate, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.LiveTailSessionUpdate + if *v == nil { + sv = &types.LiveTailSessionUpdate{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "sessionMetadata": + if err := awsAwsjson11_deserializeDocumentLiveTailSessionMetadata(&sv.SessionMetadata, value); err != nil { + return err + } + + case "sessionResults": + if err := awsAwsjson11_deserializeDocumentLiveTailSessionResults(&sv.SessionResults, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentSessionStreamingException(v **types.SessionStreamingException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.SessionStreamingException + if *v == nil { + sv = &types.SessionStreamingException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Message to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentSessionTimeoutException(v **types.SessionTimeoutException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.SessionTimeoutException + if *v == nil { + sv = &types.SessionTimeoutException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Message to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentStartLiveTailLogGroupIdentifiers(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LogGroupIdentifier to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeEventMessageResponseStartLiveTailOutput(msg *eventstream.Message) (interface{}, error) { + v := &StartLiveTailOutput{} + + br := bytes.NewReader(msg.Payload) + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(br, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return nil, err + } + + if err := awsAwsjson11_deserializeOpDocumentStartLiveTailOutput(&v, shape); err != nil { + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return nil, err + } + + } + return v, nil +} + +func awsAwsjson11_deserializeOpDocumentStartLiveTailOutput(v **StartLiveTailOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *StartLiveTailOutput + if *v == nil { + sv = &StartLiveTailOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeEventStreamGetLogObjectResponseStream(v *types.GetLogObjectResponseStream, msg *eventstream.Message) error { + if v == nil { + return fmt.Errorf("unexpected serialization of nil %T", v) + } + + eventType := msg.Headers.Get(eventstreamapi.EventTypeHeader) + if eventType == nil { + return fmt.Errorf("%s event header not present", eventstreamapi.EventTypeHeader) + } + + switch { + case strings.EqualFold("fields", eventType.String()): + vv := &types.GetLogObjectResponseStreamMemberFields{} + if err := awsAwsjson11_deserializeEventMessageFieldsData(&vv.Value, msg); err != nil { + return err + } + *v = vv + return nil + + default: + buffer := bytes.NewBuffer(nil) + eventstream.NewEncoder().Encode(buffer, *msg) + *v = &types.UnknownUnionMember{ + Tag: eventType.String(), + Value: buffer.Bytes(), + } + return nil + + } +} + +func awsAwsjson11_deserializeEventStreamExceptionGetLogObjectResponseStream(msg *eventstream.Message) error { + exceptionType := msg.Headers.Get(eventstreamapi.ExceptionTypeHeader) + if exceptionType == nil { + return fmt.Errorf("%s event header not present", eventstreamapi.ExceptionTypeHeader) + } + + switch { + case strings.EqualFold("InternalStreamingException", exceptionType.String()): + return awsAwsjson11_deserializeEventMessageExceptionInternalStreamingException(msg) + + default: + br := bytes.NewReader(msg.Payload) + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(br, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + return err + } + errorCode := "UnknownError" + errorMessage := errorCode + if ev := exceptionType.String(); len(ev) > 0 { + errorCode = ev + } else if ev := code; len(ev) > 0 { + errorCode = ev + } + if ev := message; len(ev) > 0 { + errorMessage = ev + } + return &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + + } +} + +func awsAwsjson11_deserializeEventMessageFieldsData(v *types.FieldsData, msg *eventstream.Message) error { + if v == nil { + return fmt.Errorf("unexpected serialization of nil %T", v) + } + + br := bytes.NewReader(msg.Payload) + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(br, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + if err := awsAwsjson11_deserializeDocumentFieldsData(&v, shape); err != nil { + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + } + return nil +} + +func awsAwsjson11_deserializeEventMessageExceptionInternalStreamingException(msg *eventstream.Message) error { + br := bytes.NewReader(msg.Payload) + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(br, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + v := &types.InternalStreamingException{} + if err := awsAwsjson11_deserializeDocumentInternalStreamingException(&v, shape); err != nil { + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + } + return v +} + +func awsAwsjson11_deserializeDocumentFieldsData(v **types.FieldsData, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.FieldsData + if *v == nil { + sv = &types.FieldsData{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "data": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Data to be []byte, got %T instead", value) + } + dv, err := base64.StdEncoding.DecodeString(jtv) + if err != nil { + return fmt.Errorf("failed to base64 decode Data, %w", err) + } + sv.Data = dv + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInternalStreamingException(v **types.InternalStreamingException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InternalStreamingException + if *v == nil { + sv = &types.InternalStreamingException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Message to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeEventMessageResponseGetLogObjectOutput(msg *eventstream.Message) (interface{}, error) { + v := &GetLogObjectOutput{} + + br := bytes.NewReader(msg.Payload) + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(br, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return nil, err + } + + if err := awsAwsjson11_deserializeOpDocumentGetLogObjectOutput(&v, shape); err != nil { + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return nil, err + } + + } + return v, nil +} + +func awsAwsjson11_deserializeOpDocumentGetLogObjectOutput(v **GetLogObjectOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetLogObjectOutput + if *v == nil { + sv = &GetLogObjectOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.AccessDeniedException{} + err := awsAwsjson11_deserializeDocumentAccessDeniedException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ConflictException{} + err := awsAwsjson11_deserializeDocumentConflictException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorDataAlreadyAcceptedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.DataAlreadyAcceptedException{} + err := awsAwsjson11_deserializeDocumentDataAlreadyAcceptedException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InternalServerException{} + err := awsAwsjson11_deserializeDocumentInternalServerException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidOperationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidOperationException{} + err := awsAwsjson11_deserializeDocumentInvalidOperationException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidParameterException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidParameterException{} + err := awsAwsjson11_deserializeDocumentInvalidParameterException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidSequenceTokenException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidSequenceTokenException{} + err := awsAwsjson11_deserializeDocumentInvalidSequenceTokenException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.LimitExceededException{} + err := awsAwsjson11_deserializeDocumentLimitExceededException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorMalformedQueryException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.MalformedQueryException{} + err := awsAwsjson11_deserializeDocumentMalformedQueryException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorOperationAbortedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.OperationAbortedException{} + err := awsAwsjson11_deserializeDocumentOperationAbortedException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorResourceAlreadyExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ResourceAlreadyExistsException{} + err := awsAwsjson11_deserializeDocumentResourceAlreadyExistsException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ResourceNotFoundException{} + err := awsAwsjson11_deserializeDocumentResourceNotFoundException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorServiceQuotaExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ServiceQuotaExceededException{} + err := awsAwsjson11_deserializeDocumentServiceQuotaExceededException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorServiceUnavailableException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ServiceUnavailableException{} + err := awsAwsjson11_deserializeDocumentServiceUnavailableException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ThrottlingException{} + err := awsAwsjson11_deserializeDocumentThrottlingException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorTooManyTagsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.TooManyTagsException{} + err := awsAwsjson11_deserializeDocumentTooManyTagsException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorUnrecognizedClientException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.UnrecognizedClientException{} + err := awsAwsjson11_deserializeDocumentUnrecognizedClientException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ValidationException{} + err := awsAwsjson11_deserializeDocumentValidationException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AccessDeniedException + if *v == nil { + sv = &types.AccessDeniedException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Message to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentAccountPolicies(v *[]types.AccountPolicy, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.AccountPolicy + if *v == nil { + cv = []types.AccountPolicy{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AccountPolicy + destAddr := &col + if err := awsAwsjson11_deserializeDocumentAccountPolicy(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentAccountPolicy(v **types.AccountPolicy, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AccountPolicy + if *v == nil { + sv = &types.AccountPolicy{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "accountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.AccountId = ptr.String(jtv) + } + + case "lastUpdatedTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.LastUpdatedTime = ptr.Int64(i64) + } + + case "policyDocument": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountPolicyDocument to be of type string, got %T instead", value) + } + sv.PolicyDocument = ptr.String(jtv) + } + + case "policyName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PolicyName to be of type string, got %T instead", value) + } + sv.PolicyName = ptr.String(jtv) + } + + case "policyType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PolicyType to be of type string, got %T instead", value) + } + sv.PolicyType = types.PolicyType(jtv) + } + + case "scope": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Scope to be of type string, got %T instead", value) + } + sv.Scope = types.Scope(jtv) + } + + case "selectionCriteria": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SelectionCriteria to be of type string, got %T instead", value) + } + sv.SelectionCriteria = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentAddKeyEntries(v *[]types.AddKeyEntry, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.AddKeyEntry + if *v == nil { + cv = []types.AddKeyEntry{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AddKeyEntry + destAddr := &col + if err := awsAwsjson11_deserializeDocumentAddKeyEntry(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentAddKeyEntry(v **types.AddKeyEntry, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AddKeyEntry + if *v == nil { + sv = &types.AddKeyEntry{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "key": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Key to be of type string, got %T instead", value) + } + sv.Key = ptr.String(jtv) + } + + case "overwriteIfExists": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected OverwriteIfExists to be of type *bool, got %T instead", value) + } + sv.OverwriteIfExists = jtv + } + + case "value": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AddKeyValue to be of type string, got %T instead", value) + } + sv.Value = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentAddKeys(v **types.AddKeys, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AddKeys + if *v == nil { + sv = &types.AddKeys{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "entries": + if err := awsAwsjson11_deserializeDocumentAddKeyEntries(&sv.Entries, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentAggregateLogGroupSummaries(v *[]types.AggregateLogGroupSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.AggregateLogGroupSummary + if *v == nil { + cv = []types.AggregateLogGroupSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AggregateLogGroupSummary + destAddr := &col + if err := awsAwsjson11_deserializeDocumentAggregateLogGroupSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentAggregateLogGroupSummary(v **types.AggregateLogGroupSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AggregateLogGroupSummary + if *v == nil { + sv = &types.AggregateLogGroupSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "groupingIdentifiers": + if err := awsAwsjson11_deserializeDocumentGroupingIdentifiers(&sv.GroupingIdentifiers, value); err != nil { + return err + } + + case "logGroupCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected LogGroupCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.LogGroupCount = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentAllowedFieldDelimiters(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FieldDelimiter to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentAllowedFields(v *[]types.RecordField, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.RecordField + if *v == nil { + cv = []types.RecordField{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RecordField + destAddr := &col + if err := awsAwsjson11_deserializeDocumentRecordField(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentAnomalies(v *[]types.Anomaly, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Anomaly + if *v == nil { + cv = []types.Anomaly{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Anomaly + destAddr := &col + if err := awsAwsjson11_deserializeDocumentAnomaly(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentAnomaly(v **types.Anomaly, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Anomaly + if *v == nil { + sv = &types.Anomaly{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "active": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.Active = ptr.Bool(jtv) + } + + case "anomalyDetectorArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AnomalyDetectorArn to be of type string, got %T instead", value) + } + sv.AnomalyDetectorArn = ptr.String(jtv) + } + + case "anomalyId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AnomalyId to be of type string, got %T instead", value) + } + sv.AnomalyId = ptr.String(jtv) + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Description to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "firstSeen": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected EpochMillis to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.FirstSeen = i64 + } + + case "histogram": + if err := awsAwsjson11_deserializeDocumentHistogram(&sv.Histogram, value); err != nil { + return err + } + + case "isPatternLevelSuppression": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.IsPatternLevelSuppression = ptr.Bool(jtv) + } + + case "lastSeen": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected EpochMillis to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.LastSeen = i64 + } + + case "logGroupArnList": + if err := awsAwsjson11_deserializeDocumentLogGroupArnList(&sv.LogGroupArnList, value); err != nil { + return err + } + + case "logSamples": + if err := awsAwsjson11_deserializeDocumentLogSamples(&sv.LogSamples, value); err != nil { + return err + } + + case "patternId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PatternId to be of type string, got %T instead", value) + } + sv.PatternId = ptr.String(jtv) + } + + case "patternRegex": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PatternRegex to be of type string, got %T instead", value) + } + sv.PatternRegex = ptr.String(jtv) + } + + case "patternString": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PatternString to be of type string, got %T instead", value) + } + sv.PatternString = ptr.String(jtv) + } + + case "patternTokens": + if err := awsAwsjson11_deserializeDocumentPatternTokens(&sv.PatternTokens, value); err != nil { + return err + } + + case "priority": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Priority to be of type string, got %T instead", value) + } + sv.Priority = ptr.String(jtv) + } + + case "state": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected State to be of type string, got %T instead", value) + } + sv.State = types.State(jtv) + } + + case "suppressed": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.Suppressed = ptr.Bool(jtv) + } + + case "suppressedDate": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected EpochMillis to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.SuppressedDate = i64 + } + + case "suppressedUntil": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected EpochMillis to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.SuppressedUntil = i64 + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentAnomalyDetector(v **types.AnomalyDetector, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AnomalyDetector + if *v == nil { + sv = &types.AnomalyDetector{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "anomalyDetectorArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AnomalyDetectorArn to be of type string, got %T instead", value) + } + sv.AnomalyDetectorArn = ptr.String(jtv) + } + + case "anomalyDetectorStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AnomalyDetectorStatus to be of type string, got %T instead", value) + } + sv.AnomalyDetectorStatus = types.AnomalyDetectorStatus(jtv) + } + + case "anomalyVisibilityTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected AnomalyVisibilityTime to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.AnomalyVisibilityTime = ptr.Int64(i64) + } + + case "creationTimeStamp": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected EpochMillis to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.CreationTimeStamp = i64 + } + + case "detectorName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DetectorName to be of type string, got %T instead", value) + } + sv.DetectorName = ptr.String(jtv) + } + + case "evaluationFrequency": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EvaluationFrequency to be of type string, got %T instead", value) + } + sv.EvaluationFrequency = types.EvaluationFrequency(jtv) + } + + case "filterPattern": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FilterPattern to be of type string, got %T instead", value) + } + sv.FilterPattern = ptr.String(jtv) + } + + case "kmsKeyId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected KmsKeyId to be of type string, got %T instead", value) + } + sv.KmsKeyId = ptr.String(jtv) + } + + case "lastModifiedTimeStamp": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected EpochMillis to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.LastModifiedTimeStamp = i64 + } + + case "logGroupArnList": + if err := awsAwsjson11_deserializeDocumentLogGroupArnList(&sv.LogGroupArnList, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentAnomalyDetectors(v *[]types.AnomalyDetector, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.AnomalyDetector + if *v == nil { + cv = []types.AnomalyDetector{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AnomalyDetector + destAddr := &col + if err := awsAwsjson11_deserializeDocumentAnomalyDetector(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentColumns(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Column to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentConfigurationTemplate(v **types.ConfigurationTemplate, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ConfigurationTemplate + if *v == nil { + sv = &types.ConfigurationTemplate{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "allowedActionForAllowVendedLogsDeliveryForResource": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AllowedActionForAllowVendedLogsDeliveryForResource to be of type string, got %T instead", value) + } + sv.AllowedActionForAllowVendedLogsDeliveryForResource = ptr.String(jtv) + } + + case "allowedFieldDelimiters": + if err := awsAwsjson11_deserializeDocumentAllowedFieldDelimiters(&sv.AllowedFieldDelimiters, value); err != nil { + return err + } + + case "allowedFields": + if err := awsAwsjson11_deserializeDocumentAllowedFields(&sv.AllowedFields, value); err != nil { + return err + } + + case "allowedOutputFormats": + if err := awsAwsjson11_deserializeDocumentOutputFormats(&sv.AllowedOutputFormats, value); err != nil { + return err + } + + case "allowedSuffixPathFields": + if err := awsAwsjson11_deserializeDocumentRecordFields(&sv.AllowedSuffixPathFields, value); err != nil { + return err + } + + case "defaultDeliveryConfigValues": + if err := awsAwsjson11_deserializeDocumentConfigurationTemplateDeliveryConfigValues(&sv.DefaultDeliveryConfigValues, value); err != nil { + return err + } + + case "deliveryDestinationType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DeliveryDestinationType to be of type string, got %T instead", value) + } + sv.DeliveryDestinationType = types.DeliveryDestinationType(jtv) + } + + case "logType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LogType to be of type string, got %T instead", value) + } + sv.LogType = ptr.String(jtv) + } + + case "resourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceType to be of type string, got %T instead", value) + } + sv.ResourceType = ptr.String(jtv) + } + + case "service": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Service to be of type string, got %T instead", value) + } + sv.Service = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentConfigurationTemplateDeliveryConfigValues(v **types.ConfigurationTemplateDeliveryConfigValues, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ConfigurationTemplateDeliveryConfigValues + if *v == nil { + sv = &types.ConfigurationTemplateDeliveryConfigValues{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "fieldDelimiter": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FieldDelimiter to be of type string, got %T instead", value) + } + sv.FieldDelimiter = ptr.String(jtv) + } + + case "recordFields": + if err := awsAwsjson11_deserializeDocumentRecordFields(&sv.RecordFields, value); err != nil { + return err + } + + case "s3DeliveryConfiguration": + if err := awsAwsjson11_deserializeDocumentS3DeliveryConfiguration(&sv.S3DeliveryConfiguration, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentConfigurationTemplates(v *[]types.ConfigurationTemplate, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ConfigurationTemplate + if *v == nil { + cv = []types.ConfigurationTemplate{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ConfigurationTemplate + destAddr := &col + if err := awsAwsjson11_deserializeDocumentConfigurationTemplate(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ConflictException + if *v == nil { + sv = &types.ConflictException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Message to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentCopyValue(v **types.CopyValue, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.CopyValue + if *v == nil { + sv = &types.CopyValue{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "entries": + if err := awsAwsjson11_deserializeDocumentCopyValueEntries(&sv.Entries, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentCopyValueEntries(v *[]types.CopyValueEntry, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.CopyValueEntry + if *v == nil { + cv = []types.CopyValueEntry{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.CopyValueEntry + destAddr := &col + if err := awsAwsjson11_deserializeDocumentCopyValueEntry(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentCopyValueEntry(v **types.CopyValueEntry, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.CopyValueEntry + if *v == nil { + sv = &types.CopyValueEntry{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "overwriteIfExists": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected OverwriteIfExists to be of type *bool, got %T instead", value) + } + sv.OverwriteIfExists = jtv + } + + case "source": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Source to be of type string, got %T instead", value) + } + sv.Source = ptr.String(jtv) + } + + case "target": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Target to be of type string, got %T instead", value) + } + sv.Target = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentCSV(v **types.CSV, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.CSV + if *v == nil { + sv = &types.CSV{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "columns": + if err := awsAwsjson11_deserializeDocumentColumns(&sv.Columns, value); err != nil { + return err + } + + case "delimiter": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Delimiter to be of type string, got %T instead", value) + } + sv.Delimiter = ptr.String(jtv) + } + + case "destination": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DestinationField to be of type string, got %T instead", value) + } + sv.Destination = ptr.String(jtv) + } + + case "quoteCharacter": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected QuoteCharacter to be of type string, got %T instead", value) + } + sv.QuoteCharacter = ptr.String(jtv) + } + + case "source": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Source to be of type string, got %T instead", value) + } + sv.Source = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentDataAlreadyAcceptedException(v **types.DataAlreadyAcceptedException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DataAlreadyAcceptedException + if *v == nil { + sv = &types.DataAlreadyAcceptedException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "expectedSequenceToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SequenceToken to be of type string, got %T instead", value) + } + sv.ExpectedSequenceToken = ptr.String(jtv) + } + + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Message to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentDataSource(v **types.DataSource, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DataSource + if *v == nil { + sv = &types.DataSource{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DataSourceName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DataSourceType to be of type string, got %T instead", value) + } + sv.Type = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentDateTimeConverter(v **types.DateTimeConverter, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DateTimeConverter + if *v == nil { + sv = &types.DateTimeConverter{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "locale": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Locale to be of type string, got %T instead", value) + } + sv.Locale = ptr.String(jtv) + } + + case "matchPatterns": + if err := awsAwsjson11_deserializeDocumentMatchPatterns(&sv.MatchPatterns, value); err != nil { + return err + } + + case "source": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Source to be of type string, got %T instead", value) + } + sv.Source = ptr.String(jtv) + } + + case "sourceTimezone": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SourceTimezone to be of type string, got %T instead", value) + } + sv.SourceTimezone = ptr.String(jtv) + } + + case "target": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Target to be of type string, got %T instead", value) + } + sv.Target = ptr.String(jtv) + } + + case "targetFormat": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TargetFormat to be of type string, got %T instead", value) + } + sv.TargetFormat = ptr.String(jtv) + } + + case "targetTimezone": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TargetTimezone to be of type string, got %T instead", value) + } + sv.TargetTimezone = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentDeleteKeys(v **types.DeleteKeys, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DeleteKeys + if *v == nil { + sv = &types.DeleteKeys{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "withKeys": + if err := awsAwsjson11_deserializeDocumentDeleteWithKeys(&sv.WithKeys, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentDeleteWithKeys(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WithKey to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentDeliveries(v *[]types.Delivery, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Delivery + if *v == nil { + cv = []types.Delivery{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Delivery + destAddr := &col + if err := awsAwsjson11_deserializeDocumentDelivery(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentDelivery(v **types.Delivery, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Delivery + if *v == nil { + sv = &types.Delivery{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "deliveryDestinationArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.DeliveryDestinationArn = ptr.String(jtv) + } + + case "deliveryDestinationType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DeliveryDestinationType to be of type string, got %T instead", value) + } + sv.DeliveryDestinationType = types.DeliveryDestinationType(jtv) + } + + case "deliverySourceName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DeliverySourceName to be of type string, got %T instead", value) + } + sv.DeliverySourceName = ptr.String(jtv) + } + + case "fieldDelimiter": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FieldDelimiter to be of type string, got %T instead", value) + } + sv.FieldDelimiter = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DeliveryId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "recordFields": + if err := awsAwsjson11_deserializeDocumentRecordFields(&sv.RecordFields, value); err != nil { + return err + } + + case "s3DeliveryConfiguration": + if err := awsAwsjson11_deserializeDocumentS3DeliveryConfiguration(&sv.S3DeliveryConfiguration, value); err != nil { + return err + } + + case "tags": + if err := awsAwsjson11_deserializeDocumentTags(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentDeliveryDestination(v **types.DeliveryDestination, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DeliveryDestination + if *v == nil { + sv = &types.DeliveryDestination{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "deliveryDestinationConfiguration": + if err := awsAwsjson11_deserializeDocumentDeliveryDestinationConfiguration(&sv.DeliveryDestinationConfiguration, value); err != nil { + return err + } + + case "deliveryDestinationType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DeliveryDestinationType to be of type string, got %T instead", value) + } + sv.DeliveryDestinationType = types.DeliveryDestinationType(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DeliveryDestinationName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "outputFormat": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OutputFormat to be of type string, got %T instead", value) + } + sv.OutputFormat = types.OutputFormat(jtv) + } + + case "tags": + if err := awsAwsjson11_deserializeDocumentTags(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentDeliveryDestinationConfiguration(v **types.DeliveryDestinationConfiguration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DeliveryDestinationConfiguration + if *v == nil { + sv = &types.DeliveryDestinationConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "destinationResourceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.DestinationResourceArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentDeliveryDestinations(v *[]types.DeliveryDestination, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.DeliveryDestination + if *v == nil { + cv = []types.DeliveryDestination{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.DeliveryDestination + destAddr := &col + if err := awsAwsjson11_deserializeDocumentDeliveryDestination(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentDeliverySource(v **types.DeliverySource, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DeliverySource + if *v == nil { + sv = &types.DeliverySource{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "logType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LogType to be of type string, got %T instead", value) + } + sv.LogType = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DeliverySourceName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "resourceArns": + if err := awsAwsjson11_deserializeDocumentResourceArns(&sv.ResourceArns, value); err != nil { + return err + } + + case "service": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Service to be of type string, got %T instead", value) + } + sv.Service = ptr.String(jtv) + } + + case "tags": + if err := awsAwsjson11_deserializeDocumentTags(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentDeliverySources(v *[]types.DeliverySource, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.DeliverySource + if *v == nil { + cv = []types.DeliverySource{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.DeliverySource + destAddr := &col + if err := awsAwsjson11_deserializeDocumentDeliverySource(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentDestination(v **types.Destination, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Destination + if *v == nil { + sv = &types.Destination{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "accessPolicy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccessPolicy to be of type string, got %T instead", value) + } + sv.AccessPolicy = ptr.String(jtv) + } + + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "creationTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.CreationTime = ptr.Int64(i64) + } + + case "destinationName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DestinationName to be of type string, got %T instead", value) + } + sv.DestinationName = ptr.String(jtv) + } + + case "roleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value) + } + sv.RoleArn = ptr.String(jtv) + } + + case "targetArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TargetArn to be of type string, got %T instead", value) + } + sv.TargetArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentDestinationConfiguration(v **types.DestinationConfiguration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DestinationConfiguration + if *v == nil { + sv = &types.DestinationConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "s3Configuration": + if err := awsAwsjson11_deserializeDocumentS3Configuration(&sv.S3Configuration, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentDestinations(v *[]types.Destination, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Destination + if *v == nil { + cv = []types.Destination{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Destination + destAddr := &col + if err := awsAwsjson11_deserializeDocumentDestination(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentDimensions(v *map[string]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]string + if *v == nil { + mv = map[string]string{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DimensionsValue to be of type string, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsAwsjson11_deserializeDocumentEmitSystemFields(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SystemField to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentEnumerations(v *map[string]int64, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]int64 + if *v == nil { + mv = map[string]int64{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal int64 + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected TokenValue to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + parsedVal = i64 + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsAwsjson11_deserializeDocumentExportTask(v **types.ExportTask, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ExportTask + if *v == nil { + sv = &types.ExportTask{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "destination": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExportDestinationBucket to be of type string, got %T instead", value) + } + sv.Destination = ptr.String(jtv) + } + + case "destinationPrefix": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExportDestinationPrefix to be of type string, got %T instead", value) + } + sv.DestinationPrefix = ptr.String(jtv) + } + + case "executionInfo": + if err := awsAwsjson11_deserializeDocumentExportTaskExecutionInfo(&sv.ExecutionInfo, value); err != nil { + return err + } + + case "from": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.From = ptr.Int64(i64) + } + + case "logGroupName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LogGroupName to be of type string, got %T instead", value) + } + sv.LogGroupName = ptr.String(jtv) + } + + case "status": + if err := awsAwsjson11_deserializeDocumentExportTaskStatus(&sv.Status, value); err != nil { + return err + } + + case "taskId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExportTaskId to be of type string, got %T instead", value) + } + sv.TaskId = ptr.String(jtv) + } + + case "taskName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExportTaskName to be of type string, got %T instead", value) + } + sv.TaskName = ptr.String(jtv) + } + + case "to": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.To = ptr.Int64(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentExportTaskExecutionInfo(v **types.ExportTaskExecutionInfo, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ExportTaskExecutionInfo + if *v == nil { + sv = &types.ExportTaskExecutionInfo{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "completionTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.CompletionTime = ptr.Int64(i64) + } + + case "creationTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.CreationTime = ptr.Int64(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentExportTasks(v *[]types.ExportTask, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ExportTask + if *v == nil { + cv = []types.ExportTask{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ExportTask + destAddr := &col + if err := awsAwsjson11_deserializeDocumentExportTask(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentExportTaskStatus(v **types.ExportTaskStatus, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ExportTaskStatus + if *v == nil { + sv = &types.ExportTaskStatus{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "code": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExportTaskStatusCode to be of type string, got %T instead", value) + } + sv.Code = types.ExportTaskStatusCode(jtv) + } + + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExportTaskStatusMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentExtractedValues(v *map[string]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]string + if *v == nil { + mv = map[string]string{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Value to be of type string, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsAwsjson11_deserializeDocumentFieldIndex(v **types.FieldIndex, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.FieldIndex + if *v == nil { + sv = &types.FieldIndex{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "fieldIndexName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FieldIndexName to be of type string, got %T instead", value) + } + sv.FieldIndexName = ptr.String(jtv) + } + + case "firstEventTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.FirstEventTime = ptr.Int64(i64) + } + + case "lastEventTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.LastEventTime = ptr.Int64(i64) + } + + case "lastScanTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.LastScanTime = ptr.Int64(i64) + } + + case "logGroupIdentifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LogGroupIdentifier to be of type string, got %T instead", value) + } + sv.LogGroupIdentifier = ptr.String(jtv) + } + + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IndexType to be of type string, got %T instead", value) + } + sv.Type = types.IndexType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentFieldIndexes(v *[]types.FieldIndex, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.FieldIndex + if *v == nil { + cv = []types.FieldIndex{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.FieldIndex + destAddr := &col + if err := awsAwsjson11_deserializeDocumentFieldIndex(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentFilteredLogEvent(v **types.FilteredLogEvent, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.FilteredLogEvent + if *v == nil { + sv = &types.FilteredLogEvent{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "eventId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EventId to be of type string, got %T instead", value) + } + sv.EventId = ptr.String(jtv) + } + + case "ingestionTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.IngestionTime = ptr.Int64(i64) + } + + case "logStreamName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LogStreamName to be of type string, got %T instead", value) + } + sv.LogStreamName = ptr.String(jtv) + } + + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EventMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "timestamp": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Timestamp = ptr.Int64(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentFilteredLogEvents(v *[]types.FilteredLogEvent, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.FilteredLogEvent + if *v == nil { + cv = []types.FilteredLogEvent{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.FilteredLogEvent + destAddr := &col + if err := awsAwsjson11_deserializeDocumentFilteredLogEvent(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentGrok(v **types.Grok, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Grok + if *v == nil { + sv = &types.Grok{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "match": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GrokMatch to be of type string, got %T instead", value) + } + sv.Match = ptr.String(jtv) + } + + case "source": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Source to be of type string, got %T instead", value) + } + sv.Source = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentGroupingIdentifier(v **types.GroupingIdentifier, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.GroupingIdentifier + if *v == nil { + sv = &types.GroupingIdentifier{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "key": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GroupingIdentifierKey to be of type string, got %T instead", value) + } + sv.Key = ptr.String(jtv) + } + + case "value": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GroupingIdentifierValue to be of type string, got %T instead", value) + } + sv.Value = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentGroupingIdentifiers(v *[]types.GroupingIdentifier, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.GroupingIdentifier + if *v == nil { + cv = []types.GroupingIdentifier{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.GroupingIdentifier + destAddr := &col + if err := awsAwsjson11_deserializeDocumentGroupingIdentifier(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentHistogram(v *map[string]int64, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]int64 + if *v == nil { + mv = map[string]int64{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal int64 + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Count to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + parsedVal = i64 + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsAwsjson11_deserializeDocumentImport(v **types.Import, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Import + if *v == nil { + sv = &types.Import{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "creationTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.CreationTime = ptr.Int64(i64) + } + + case "errorMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.ErrorMessage = ptr.String(jtv) + } + + case "importDestinationArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.ImportDestinationArn = ptr.String(jtv) + } + + case "importFilter": + if err := awsAwsjson11_deserializeDocumentImportFilter(&sv.ImportFilter, value); err != nil { + return err + } + + case "importId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ImportId to be of type string, got %T instead", value) + } + sv.ImportId = ptr.String(jtv) + } + + case "importSourceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.ImportSourceArn = ptr.String(jtv) + } + + case "importStatistics": + if err := awsAwsjson11_deserializeDocumentImportStatistics(&sv.ImportStatistics, value); err != nil { + return err + } + + case "importStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ImportStatus to be of type string, got %T instead", value) + } + sv.ImportStatus = types.ImportStatus(jtv) + } + + case "lastUpdatedTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.LastUpdatedTime = ptr.Int64(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentImportBatch(v **types.ImportBatch, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ImportBatch + if *v == nil { + sv = &types.ImportBatch{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "batchId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BatchId to be of type string, got %T instead", value) + } + sv.BatchId = ptr.String(jtv) + } + + case "errorMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.ErrorMessage = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ImportStatus to be of type string, got %T instead", value) + } + sv.Status = types.ImportStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentImportBatchList(v *[]types.ImportBatch, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ImportBatch + if *v == nil { + cv = []types.ImportBatch{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ImportBatch + destAddr := &col + if err := awsAwsjson11_deserializeDocumentImportBatch(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentImportFilter(v **types.ImportFilter, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ImportFilter + if *v == nil { + sv = &types.ImportFilter{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "endEventTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.EndEventTime = ptr.Int64(i64) + } + + case "startEventTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.StartEventTime = ptr.Int64(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentImportList(v *[]types.Import, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Import + if *v == nil { + cv = []types.Import{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Import + destAddr := &col + if err := awsAwsjson11_deserializeDocumentImport(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentImportStatistics(v **types.ImportStatistics, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ImportStatistics + if *v == nil { + sv = &types.ImportStatistics{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "bytesImported": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected StoredBytes to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.BytesImported = ptr.Int64(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentIndexPolicies(v *[]types.IndexPolicy, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.IndexPolicy + if *v == nil { + cv = []types.IndexPolicy{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.IndexPolicy + destAddr := &col + if err := awsAwsjson11_deserializeDocumentIndexPolicy(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentIndexPolicy(v **types.IndexPolicy, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.IndexPolicy + if *v == nil { + sv = &types.IndexPolicy{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "lastUpdateTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.LastUpdateTime = ptr.Int64(i64) + } + + case "logGroupIdentifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LogGroupIdentifier to be of type string, got %T instead", value) + } + sv.LogGroupIdentifier = ptr.String(jtv) + } + + case "policyDocument": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PolicyDocument to be of type string, got %T instead", value) + } + sv.PolicyDocument = ptr.String(jtv) + } + + case "policyName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PolicyName to be of type string, got %T instead", value) + } + sv.PolicyName = ptr.String(jtv) + } + + case "source": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IndexSource to be of type string, got %T instead", value) + } + sv.Source = types.IndexSource(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInheritedProperties(v *[]types.InheritedProperty, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.InheritedProperty + if *v == nil { + cv = []types.InheritedProperty{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.InheritedProperty + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InheritedProperty to be of type string, got %T instead", value) + } + col = types.InheritedProperty(jtv) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentIntegrationDetails(v *types.IntegrationDetails, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var uv types.IntegrationDetails +loop: + for key, value := range shape { + if value == nil { + continue + } + switch key { + case "openSearchIntegrationDetails": + var mv types.OpenSearchIntegrationDetails + destAddr := &mv + if err := awsAwsjson11_deserializeDocumentOpenSearchIntegrationDetails(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.IntegrationDetailsMemberOpenSearchIntegrationDetails{Value: mv} + break loop + + default: + uv = &types.UnknownUnionMember{Tag: key} + break loop + + } + } + *v = uv + return nil +} + +func awsAwsjson11_deserializeDocumentIntegrationSummaries(v *[]types.IntegrationSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.IntegrationSummary + if *v == nil { + cv = []types.IntegrationSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.IntegrationSummary + destAddr := &col + if err := awsAwsjson11_deserializeDocumentIntegrationSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentIntegrationSummary(v **types.IntegrationSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.IntegrationSummary + if *v == nil { + sv = &types.IntegrationSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "integrationName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IntegrationName to be of type string, got %T instead", value) + } + sv.IntegrationName = ptr.String(jtv) + } + + case "integrationStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IntegrationStatus to be of type string, got %T instead", value) + } + sv.IntegrationStatus = types.IntegrationStatus(jtv) + } + + case "integrationType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IntegrationType to be of type string, got %T instead", value) + } + sv.IntegrationType = types.IntegrationType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InternalServerException + if *v == nil { + sv = &types.InternalServerException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Message to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidOperationException(v **types.InvalidOperationException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidOperationException + if *v == nil { + sv = &types.InvalidOperationException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Message to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidParameterException(v **types.InvalidParameterException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidParameterException + if *v == nil { + sv = &types.InvalidParameterException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Message to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidSequenceTokenException(v **types.InvalidSequenceTokenException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidSequenceTokenException + if *v == nil { + sv = &types.InvalidSequenceTokenException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "expectedSequenceToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SequenceToken to be of type string, got %T instead", value) + } + sv.ExpectedSequenceToken = ptr.String(jtv) + } + + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Message to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentLimitExceededException(v **types.LimitExceededException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.LimitExceededException + if *v == nil { + sv = &types.LimitExceededException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Message to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentListToMap(v **types.ListToMap, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ListToMap + if *v == nil { + sv = &types.ListToMap{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "flatten": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Flatten to be of type *bool, got %T instead", value) + } + sv.Flatten = jtv + } + + case "flattenedElement": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FlattenedElement to be of type string, got %T instead", value) + } + sv.FlattenedElement = types.FlattenedElement(jtv) + } + + case "key": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Key to be of type string, got %T instead", value) + } + sv.Key = ptr.String(jtv) + } + + case "source": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Source to be of type string, got %T instead", value) + } + sv.Source = ptr.String(jtv) + } + + case "target": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Target to be of type string, got %T instead", value) + } + sv.Target = ptr.String(jtv) + } + + case "valueKey": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ValueKey to be of type string, got %T instead", value) + } + sv.ValueKey = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentLogEvent(v **types.LogEvent, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.LogEvent + if *v == nil { + sv = &types.LogEvent{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EventMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "timestamp": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Timestamp = ptr.Int64(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentLogFieldsList(v *[]types.LogFieldsListItem, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.LogFieldsListItem + if *v == nil { + cv = []types.LogFieldsListItem{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.LogFieldsListItem + destAddr := &col + if err := awsAwsjson11_deserializeDocumentLogFieldsListItem(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentLogFieldsListItem(v **types.LogFieldsListItem, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.LogFieldsListItem + if *v == nil { + sv = &types.LogFieldsListItem{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "logFieldName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LogFieldName to be of type string, got %T instead", value) + } + sv.LogFieldName = ptr.String(jtv) + } + + case "logFieldType": + if err := awsAwsjson11_deserializeDocumentLogFieldType(&sv.LogFieldType, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentLogFieldType(v **types.LogFieldType, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.LogFieldType + if *v == nil { + sv = &types.LogFieldType{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "element": + if err := awsAwsjson11_deserializeDocumentLogFieldType(&sv.Element, value); err != nil { + return err + } + + case "fields": + if err := awsAwsjson11_deserializeDocumentLogFieldsList(&sv.Fields, value); err != nil { + return err + } + + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DataType to be of type string, got %T instead", value) + } + sv.Type = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentLogGroup(v **types.LogGroup, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.LogGroup + if *v == nil { + sv = &types.LogGroup{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "bearerTokenAuthenticationEnabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected BearerTokenAuthenticationEnabled to be of type *bool, got %T instead", value) + } + sv.BearerTokenAuthenticationEnabled = ptr.Bool(jtv) + } + + case "creationTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.CreationTime = ptr.Int64(i64) + } + + case "dataProtectionStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DataProtectionStatus to be of type string, got %T instead", value) + } + sv.DataProtectionStatus = types.DataProtectionStatus(jtv) + } + + case "deletionProtectionEnabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected DeletionProtectionEnabled to be of type *bool, got %T instead", value) + } + sv.DeletionProtectionEnabled = ptr.Bool(jtv) + } + + case "inheritedProperties": + if err := awsAwsjson11_deserializeDocumentInheritedProperties(&sv.InheritedProperties, value); err != nil { + return err + } + + case "kmsKeyId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected KmsKeyId to be of type string, got %T instead", value) + } + sv.KmsKeyId = ptr.String(jtv) + } + + case "logGroupArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.LogGroupArn = ptr.String(jtv) + } + + case "logGroupClass": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LogGroupClass to be of type string, got %T instead", value) + } + sv.LogGroupClass = types.LogGroupClass(jtv) + } + + case "logGroupName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LogGroupName to be of type string, got %T instead", value) + } + sv.LogGroupName = ptr.String(jtv) + } + + case "metricFilterCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected FilterCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MetricFilterCount = ptr.Int32(int32(i64)) + } + + case "retentionInDays": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Days to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.RetentionInDays = ptr.Int32(int32(i64)) + } + + case "storedBytes": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected StoredBytes to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.StoredBytes = ptr.Int64(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentLogGroupArnList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LogGroupArn to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentLogGroupField(v **types.LogGroupField, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.LogGroupField + if *v == nil { + sv = &types.LogGroupField{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Field to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "percent": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Percentage to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Percent = int32(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentLogGroupFieldList(v *[]types.LogGroupField, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.LogGroupField + if *v == nil { + cv = []types.LogGroupField{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.LogGroupField + destAddr := &col + if err := awsAwsjson11_deserializeDocumentLogGroupField(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentLogGroupIdentifiers(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LogGroupIdentifier to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentLogGroupNames(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LogGroupName to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentLogGroups(v *[]types.LogGroup, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.LogGroup + if *v == nil { + cv = []types.LogGroup{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.LogGroup + destAddr := &col + if err := awsAwsjson11_deserializeDocumentLogGroup(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentLogGroupSummaries(v *[]types.LogGroupSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.LogGroupSummary + if *v == nil { + cv = []types.LogGroupSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.LogGroupSummary + destAddr := &col + if err := awsAwsjson11_deserializeDocumentLogGroupSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentLogGroupSummary(v **types.LogGroupSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.LogGroupSummary + if *v == nil { + sv = &types.LogGroupSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "logGroupArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.LogGroupArn = ptr.String(jtv) + } + + case "logGroupClass": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LogGroupClass to be of type string, got %T instead", value) + } + sv.LogGroupClass = types.LogGroupClass(jtv) + } + + case "logGroupName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LogGroupName to be of type string, got %T instead", value) + } + sv.LogGroupName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentLogRecord(v *map[string]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]string + if *v == nil { + mv = map[string]string{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Value to be of type string, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsAwsjson11_deserializeDocumentLogSamples(v *[]types.LogEvent, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.LogEvent + if *v == nil { + cv = []types.LogEvent{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.LogEvent + destAddr := &col + if err := awsAwsjson11_deserializeDocumentLogEvent(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentLogStream(v **types.LogStream, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.LogStream + if *v == nil { + sv = &types.LogStream{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "creationTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.CreationTime = ptr.Int64(i64) + } + + case "firstEventTimestamp": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.FirstEventTimestamp = ptr.Int64(i64) + } + + case "lastEventTimestamp": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.LastEventTimestamp = ptr.Int64(i64) + } + + case "lastIngestionTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.LastIngestionTime = ptr.Int64(i64) + } + + case "logStreamName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LogStreamName to be of type string, got %T instead", value) + } + sv.LogStreamName = ptr.String(jtv) + } + + case "storedBytes": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected StoredBytes to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.StoredBytes = ptr.Int64(i64) + } + + case "uploadSequenceToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SequenceToken to be of type string, got %T instead", value) + } + sv.UploadSequenceToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentLogStreams(v *[]types.LogStream, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.LogStream + if *v == nil { + cv = []types.LogStream{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.LogStream + destAddr := &col + if err := awsAwsjson11_deserializeDocumentLogStream(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentLookupTable(v **types.LookupTable, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.LookupTable + if *v == nil { + sv = &types.LookupTable{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LookupTableDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "kmsKeyId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected KmsKeyId to be of type string, got %T instead", value) + } + sv.KmsKeyId = ptr.String(jtv) + } + + case "lastUpdatedTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.LastUpdatedTime = ptr.Int64(i64) + } + + case "lookupTableArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.LookupTableArn = ptr.String(jtv) + } + + case "lookupTableName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LookupTableName to be of type string, got %T instead", value) + } + sv.LookupTableName = ptr.String(jtv) + } + + case "recordsCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected RecordsCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.RecordsCount = ptr.Int64(i64) + } + + case "sizeBytes": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected StoredBytes to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.SizeBytes = ptr.Int64(i64) + } + + case "tableFields": + if err := awsAwsjson11_deserializeDocumentTableFields(&sv.TableFields, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentLookupTables(v *[]types.LookupTable, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.LookupTable + if *v == nil { + cv = []types.LookupTable{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.LookupTable + destAddr := &col + if err := awsAwsjson11_deserializeDocumentLookupTable(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentLowerCaseString(v **types.LowerCaseString, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.LowerCaseString + if *v == nil { + sv = &types.LowerCaseString{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "withKeys": + if err := awsAwsjson11_deserializeDocumentLowerCaseStringWithKeys(&sv.WithKeys, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentLowerCaseStringWithKeys(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WithKey to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentMalformedQueryException(v **types.MalformedQueryException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.MalformedQueryException + if *v == nil { + sv = &types.MalformedQueryException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Message to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "queryCompileError": + if err := awsAwsjson11_deserializeDocumentQueryCompileError(&sv.QueryCompileError, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentMatchPatterns(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MatchPattern to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentMetricFilter(v **types.MetricFilter, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.MetricFilter + if *v == nil { + sv = &types.MetricFilter{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "applyOnTransformedLogs": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected ApplyOnTransformedLogs to be of type *bool, got %T instead", value) + } + sv.ApplyOnTransformedLogs = jtv + } + + case "creationTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.CreationTime = ptr.Int64(i64) + } + + case "emitSystemFieldDimensions": + if err := awsAwsjson11_deserializeDocumentEmitSystemFields(&sv.EmitSystemFieldDimensions, value); err != nil { + return err + } + + case "fieldSelectionCriteria": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FieldSelectionCriteria to be of type string, got %T instead", value) + } + sv.FieldSelectionCriteria = ptr.String(jtv) + } + + case "filterName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FilterName to be of type string, got %T instead", value) + } + sv.FilterName = ptr.String(jtv) + } + + case "filterPattern": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FilterPattern to be of type string, got %T instead", value) + } + sv.FilterPattern = ptr.String(jtv) + } + + case "logGroupName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LogGroupName to be of type string, got %T instead", value) + } + sv.LogGroupName = ptr.String(jtv) + } + + case "metricTransformations": + if err := awsAwsjson11_deserializeDocumentMetricTransformations(&sv.MetricTransformations, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentMetricFilterMatches(v *[]types.MetricFilterMatchRecord, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.MetricFilterMatchRecord + if *v == nil { + cv = []types.MetricFilterMatchRecord{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.MetricFilterMatchRecord + destAddr := &col + if err := awsAwsjson11_deserializeDocumentMetricFilterMatchRecord(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentMetricFilterMatchRecord(v **types.MetricFilterMatchRecord, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.MetricFilterMatchRecord + if *v == nil { + sv = &types.MetricFilterMatchRecord{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "eventMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EventMessage to be of type string, got %T instead", value) + } + sv.EventMessage = ptr.String(jtv) + } + + case "eventNumber": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected EventNumber to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.EventNumber = i64 + } + + case "extractedValues": + if err := awsAwsjson11_deserializeDocumentExtractedValues(&sv.ExtractedValues, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentMetricFilters(v *[]types.MetricFilter, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.MetricFilter + if *v == nil { + cv = []types.MetricFilter{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.MetricFilter + destAddr := &col + if err := awsAwsjson11_deserializeDocumentMetricFilter(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentMetricTransformation(v **types.MetricTransformation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.MetricTransformation + if *v == nil { + sv = &types.MetricTransformation{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "defaultValue": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.DefaultValue = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.DefaultValue = ptr.Float64(f64) + + default: + return fmt.Errorf("expected DefaultValue to be a JSON Number, got %T instead", value) + + } + } + + case "dimensions": + if err := awsAwsjson11_deserializeDocumentDimensions(&sv.Dimensions, value); err != nil { + return err + } + + case "metricName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MetricName to be of type string, got %T instead", value) + } + sv.MetricName = ptr.String(jtv) + } + + case "metricNamespace": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MetricNamespace to be of type string, got %T instead", value) + } + sv.MetricNamespace = ptr.String(jtv) + } + + case "metricValue": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MetricValue to be of type string, got %T instead", value) + } + sv.MetricValue = ptr.String(jtv) + } + + case "unit": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StandardUnit to be of type string, got %T instead", value) + } + sv.Unit = types.StandardUnit(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentMetricTransformations(v *[]types.MetricTransformation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.MetricTransformation + if *v == nil { + cv = []types.MetricTransformation{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.MetricTransformation + destAddr := &col + if err := awsAwsjson11_deserializeDocumentMetricTransformation(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentMoveKeyEntries(v *[]types.MoveKeyEntry, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.MoveKeyEntry + if *v == nil { + cv = []types.MoveKeyEntry{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.MoveKeyEntry + destAddr := &col + if err := awsAwsjson11_deserializeDocumentMoveKeyEntry(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentMoveKeyEntry(v **types.MoveKeyEntry, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.MoveKeyEntry + if *v == nil { + sv = &types.MoveKeyEntry{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "overwriteIfExists": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected OverwriteIfExists to be of type *bool, got %T instead", value) + } + sv.OverwriteIfExists = jtv + } + + case "source": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Source to be of type string, got %T instead", value) + } + sv.Source = ptr.String(jtv) + } + + case "target": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Target to be of type string, got %T instead", value) + } + sv.Target = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentMoveKeys(v **types.MoveKeys, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.MoveKeys + if *v == nil { + sv = &types.MoveKeys{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "entries": + if err := awsAwsjson11_deserializeDocumentMoveKeyEntries(&sv.Entries, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentOpenSearchApplication(v **types.OpenSearchApplication, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.OpenSearchApplication + if *v == nil { + sv = &types.OpenSearchApplication{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "applicationArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.ApplicationArn = ptr.String(jtv) + } + + case "applicationEndpoint": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpenSearchApplicationEndpoint to be of type string, got %T instead", value) + } + sv.ApplicationEndpoint = ptr.String(jtv) + } + + case "applicationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpenSearchApplicationId to be of type string, got %T instead", value) + } + sv.ApplicationId = ptr.String(jtv) + } + + case "status": + if err := awsAwsjson11_deserializeDocumentOpenSearchResourceStatus(&sv.Status, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentOpenSearchCollection(v **types.OpenSearchCollection, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.OpenSearchCollection + if *v == nil { + sv = &types.OpenSearchCollection{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "collectionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.CollectionArn = ptr.String(jtv) + } + + case "collectionEndpoint": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpenSearchCollectionEndpoint to be of type string, got %T instead", value) + } + sv.CollectionEndpoint = ptr.String(jtv) + } + + case "status": + if err := awsAwsjson11_deserializeDocumentOpenSearchResourceStatus(&sv.Status, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentOpenSearchDataAccessPolicy(v **types.OpenSearchDataAccessPolicy, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.OpenSearchDataAccessPolicy + if *v == nil { + sv = &types.OpenSearchDataAccessPolicy{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "policyName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpenSearchPolicyName to be of type string, got %T instead", value) + } + sv.PolicyName = ptr.String(jtv) + } + + case "status": + if err := awsAwsjson11_deserializeDocumentOpenSearchResourceStatus(&sv.Status, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentOpenSearchDataSource(v **types.OpenSearchDataSource, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.OpenSearchDataSource + if *v == nil { + sv = &types.OpenSearchDataSource{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "dataSourceName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpenSearchDataSourceName to be of type string, got %T instead", value) + } + sv.DataSourceName = ptr.String(jtv) + } + + case "status": + if err := awsAwsjson11_deserializeDocumentOpenSearchResourceStatus(&sv.Status, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentOpenSearchEncryptionPolicy(v **types.OpenSearchEncryptionPolicy, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.OpenSearchEncryptionPolicy + if *v == nil { + sv = &types.OpenSearchEncryptionPolicy{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "policyName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpenSearchPolicyName to be of type string, got %T instead", value) + } + sv.PolicyName = ptr.String(jtv) + } + + case "status": + if err := awsAwsjson11_deserializeDocumentOpenSearchResourceStatus(&sv.Status, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentOpenSearchIntegrationDetails(v **types.OpenSearchIntegrationDetails, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.OpenSearchIntegrationDetails + if *v == nil { + sv = &types.OpenSearchIntegrationDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "accessPolicy": + if err := awsAwsjson11_deserializeDocumentOpenSearchDataAccessPolicy(&sv.AccessPolicy, value); err != nil { + return err + } + + case "application": + if err := awsAwsjson11_deserializeDocumentOpenSearchApplication(&sv.Application, value); err != nil { + return err + } + + case "collection": + if err := awsAwsjson11_deserializeDocumentOpenSearchCollection(&sv.Collection, value); err != nil { + return err + } + + case "dataSource": + if err := awsAwsjson11_deserializeDocumentOpenSearchDataSource(&sv.DataSource, value); err != nil { + return err + } + + case "encryptionPolicy": + if err := awsAwsjson11_deserializeDocumentOpenSearchEncryptionPolicy(&sv.EncryptionPolicy, value); err != nil { + return err + } + + case "lifecyclePolicy": + if err := awsAwsjson11_deserializeDocumentOpenSearchLifecyclePolicy(&sv.LifecyclePolicy, value); err != nil { + return err + } + + case "networkPolicy": + if err := awsAwsjson11_deserializeDocumentOpenSearchNetworkPolicy(&sv.NetworkPolicy, value); err != nil { + return err + } + + case "workspace": + if err := awsAwsjson11_deserializeDocumentOpenSearchWorkspace(&sv.Workspace, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentOpenSearchLifecyclePolicy(v **types.OpenSearchLifecyclePolicy, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.OpenSearchLifecyclePolicy + if *v == nil { + sv = &types.OpenSearchLifecyclePolicy{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "policyName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpenSearchPolicyName to be of type string, got %T instead", value) + } + sv.PolicyName = ptr.String(jtv) + } + + case "status": + if err := awsAwsjson11_deserializeDocumentOpenSearchResourceStatus(&sv.Status, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentOpenSearchNetworkPolicy(v **types.OpenSearchNetworkPolicy, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.OpenSearchNetworkPolicy + if *v == nil { + sv = &types.OpenSearchNetworkPolicy{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "policyName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpenSearchPolicyName to be of type string, got %T instead", value) + } + sv.PolicyName = ptr.String(jtv) + } + + case "status": + if err := awsAwsjson11_deserializeDocumentOpenSearchResourceStatus(&sv.Status, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentOpenSearchResourceStatus(v **types.OpenSearchResourceStatus, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.OpenSearchResourceStatus + if *v == nil { + sv = &types.OpenSearchResourceStatus{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpenSearchResourceStatusType to be of type string, got %T instead", value) + } + sv.Status = types.OpenSearchResourceStatusType(jtv) + } + + case "statusMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IntegrationStatusMessage to be of type string, got %T instead", value) + } + sv.StatusMessage = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentOpenSearchWorkspace(v **types.OpenSearchWorkspace, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.OpenSearchWorkspace + if *v == nil { + sv = &types.OpenSearchWorkspace{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "status": + if err := awsAwsjson11_deserializeDocumentOpenSearchResourceStatus(&sv.Status, value); err != nil { + return err + } + + case "workspaceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpenSearchWorkspaceId to be of type string, got %T instead", value) + } + sv.WorkspaceId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentOperationAbortedException(v **types.OperationAbortedException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.OperationAbortedException + if *v == nil { + sv = &types.OperationAbortedException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Message to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentOutputFormats(v *[]types.OutputFormat, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.OutputFormat + if *v == nil { + cv = []types.OutputFormat{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.OutputFormat + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OutputFormat to be of type string, got %T instead", value) + } + col = types.OutputFormat(jtv) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentOutputLogEvent(v **types.OutputLogEvent, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.OutputLogEvent + if *v == nil { + sv = &types.OutputLogEvent{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ingestionTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.IngestionTime = ptr.Int64(i64) + } + + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EventMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "timestamp": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Timestamp = ptr.Int64(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentOutputLogEvents(v *[]types.OutputLogEvent, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.OutputLogEvent + if *v == nil { + cv = []types.OutputLogEvent{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.OutputLogEvent + destAddr := &col + if err := awsAwsjson11_deserializeDocumentOutputLogEvent(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentParseCloudfront(v **types.ParseCloudfront, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ParseCloudfront + if *v == nil { + sv = &types.ParseCloudfront{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "source": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Source to be of type string, got %T instead", value) + } + sv.Source = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentParseJSON(v **types.ParseJSON, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ParseJSON + if *v == nil { + sv = &types.ParseJSON{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "destination": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DestinationField to be of type string, got %T instead", value) + } + sv.Destination = ptr.String(jtv) + } + + case "source": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Source to be of type string, got %T instead", value) + } + sv.Source = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentParseKeyValue(v **types.ParseKeyValue, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ParseKeyValue + if *v == nil { + sv = &types.ParseKeyValue{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "destination": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DestinationField to be of type string, got %T instead", value) + } + sv.Destination = ptr.String(jtv) + } + + case "fieldDelimiter": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ParserFieldDelimiter to be of type string, got %T instead", value) + } + sv.FieldDelimiter = ptr.String(jtv) + } + + case "keyPrefix": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected KeyPrefix to be of type string, got %T instead", value) + } + sv.KeyPrefix = ptr.String(jtv) + } + + case "keyValueDelimiter": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected KeyValueDelimiter to be of type string, got %T instead", value) + } + sv.KeyValueDelimiter = ptr.String(jtv) + } + + case "nonMatchValue": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonMatchValue to be of type string, got %T instead", value) + } + sv.NonMatchValue = ptr.String(jtv) + } + + case "overwriteIfExists": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected OverwriteIfExists to be of type *bool, got %T instead", value) + } + sv.OverwriteIfExists = jtv + } + + case "source": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Source to be of type string, got %T instead", value) + } + sv.Source = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentParsePostgres(v **types.ParsePostgres, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ParsePostgres + if *v == nil { + sv = &types.ParsePostgres{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "source": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Source to be of type string, got %T instead", value) + } + sv.Source = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentParseRoute53(v **types.ParseRoute53, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ParseRoute53 + if *v == nil { + sv = &types.ParseRoute53{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "source": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Source to be of type string, got %T instead", value) + } + sv.Source = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentParseToOCSF(v **types.ParseToOCSF, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ParseToOCSF + if *v == nil { + sv = &types.ParseToOCSF{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "eventSource": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EventSource to be of type string, got %T instead", value) + } + sv.EventSource = types.EventSource(jtv) + } + + case "mappingVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MappingVersion to be of type string, got %T instead", value) + } + sv.MappingVersion = ptr.String(jtv) + } + + case "ocsfVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OCSFVersion to be of type string, got %T instead", value) + } + sv.OcsfVersion = types.OCSFVersion(jtv) + } + + case "source": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Source to be of type string, got %T instead", value) + } + sv.Source = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentParseVPC(v **types.ParseVPC, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ParseVPC + if *v == nil { + sv = &types.ParseVPC{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "source": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Source to be of type string, got %T instead", value) + } + sv.Source = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentParseWAF(v **types.ParseWAF, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ParseWAF + if *v == nil { + sv = &types.ParseWAF{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "source": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Source to be of type string, got %T instead", value) + } + sv.Source = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentPatternToken(v **types.PatternToken, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.PatternToken + if *v == nil { + sv = &types.PatternToken{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "dynamicTokenPosition": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DynamicTokenPosition to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.DynamicTokenPosition = int32(i64) + } + + case "enumerations": + if err := awsAwsjson11_deserializeDocumentEnumerations(&sv.Enumerations, value); err != nil { + return err + } + + case "inferredTokenName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InferredTokenName to be of type string, got %T instead", value) + } + sv.InferredTokenName = ptr.String(jtv) + } + + case "isDynamic": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.IsDynamic = ptr.Bool(jtv) + } + + case "tokenString": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TokenString to be of type string, got %T instead", value) + } + sv.TokenString = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentPatternTokens(v *[]types.PatternToken, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.PatternToken + if *v == nil { + cv = []types.PatternToken{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.PatternToken + destAddr := &col + if err := awsAwsjson11_deserializeDocumentPatternToken(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentPolicy(v **types.Policy, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Policy + if *v == nil { + sv = &types.Policy{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "deliveryDestinationPolicy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DeliveryDestinationPolicy to be of type string, got %T instead", value) + } + sv.DeliveryDestinationPolicy = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentProcessor(v **types.Processor, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Processor + if *v == nil { + sv = &types.Processor{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "addKeys": + if err := awsAwsjson11_deserializeDocumentAddKeys(&sv.AddKeys, value); err != nil { + return err + } + + case "copyValue": + if err := awsAwsjson11_deserializeDocumentCopyValue(&sv.CopyValue, value); err != nil { + return err + } + + case "csv": + if err := awsAwsjson11_deserializeDocumentCSV(&sv.Csv, value); err != nil { + return err + } + + case "dateTimeConverter": + if err := awsAwsjson11_deserializeDocumentDateTimeConverter(&sv.DateTimeConverter, value); err != nil { + return err + } + + case "deleteKeys": + if err := awsAwsjson11_deserializeDocumentDeleteKeys(&sv.DeleteKeys, value); err != nil { + return err + } + + case "grok": + if err := awsAwsjson11_deserializeDocumentGrok(&sv.Grok, value); err != nil { + return err + } + + case "listToMap": + if err := awsAwsjson11_deserializeDocumentListToMap(&sv.ListToMap, value); err != nil { + return err + } + + case "lowerCaseString": + if err := awsAwsjson11_deserializeDocumentLowerCaseString(&sv.LowerCaseString, value); err != nil { + return err + } + + case "moveKeys": + if err := awsAwsjson11_deserializeDocumentMoveKeys(&sv.MoveKeys, value); err != nil { + return err + } + + case "parseCloudfront": + if err := awsAwsjson11_deserializeDocumentParseCloudfront(&sv.ParseCloudfront, value); err != nil { + return err + } + + case "parseJSON": + if err := awsAwsjson11_deserializeDocumentParseJSON(&sv.ParseJSON, value); err != nil { + return err + } + + case "parseKeyValue": + if err := awsAwsjson11_deserializeDocumentParseKeyValue(&sv.ParseKeyValue, value); err != nil { + return err + } + + case "parsePostgres": + if err := awsAwsjson11_deserializeDocumentParsePostgres(&sv.ParsePostgres, value); err != nil { + return err + } + + case "parseRoute53": + if err := awsAwsjson11_deserializeDocumentParseRoute53(&sv.ParseRoute53, value); err != nil { + return err + } + + case "parseToOCSF": + if err := awsAwsjson11_deserializeDocumentParseToOCSF(&sv.ParseToOCSF, value); err != nil { + return err + } + + case "parseVPC": + if err := awsAwsjson11_deserializeDocumentParseVPC(&sv.ParseVPC, value); err != nil { + return err + } + + case "parseWAF": + if err := awsAwsjson11_deserializeDocumentParseWAF(&sv.ParseWAF, value); err != nil { + return err + } + + case "renameKeys": + if err := awsAwsjson11_deserializeDocumentRenameKeys(&sv.RenameKeys, value); err != nil { + return err + } + + case "splitString": + if err := awsAwsjson11_deserializeDocumentSplitString(&sv.SplitString, value); err != nil { + return err + } + + case "substituteString": + if err := awsAwsjson11_deserializeDocumentSubstituteString(&sv.SubstituteString, value); err != nil { + return err + } + + case "trimString": + if err := awsAwsjson11_deserializeDocumentTrimString(&sv.TrimString, value); err != nil { + return err + } + + case "typeConverter": + if err := awsAwsjson11_deserializeDocumentTypeConverter(&sv.TypeConverter, value); err != nil { + return err + } + + case "upperCaseString": + if err := awsAwsjson11_deserializeDocumentUpperCaseString(&sv.UpperCaseString, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentProcessors(v *[]types.Processor, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Processor + if *v == nil { + cv = []types.Processor{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Processor + destAddr := &col + if err := awsAwsjson11_deserializeDocumentProcessor(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentQueryCompileError(v **types.QueryCompileError, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.QueryCompileError + if *v == nil { + sv = &types.QueryCompileError{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "location": + if err := awsAwsjson11_deserializeDocumentQueryCompileErrorLocation(&sv.Location, value); err != nil { + return err + } + + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Message to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentQueryCompileErrorLocation(v **types.QueryCompileErrorLocation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.QueryCompileErrorLocation + if *v == nil { + sv = &types.QueryCompileErrorLocation{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "endCharOffset": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected QueryCharOffset to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.EndCharOffset = ptr.Int32(int32(i64)) + } + + case "startCharOffset": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected QueryCharOffset to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.StartCharOffset = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentQueryDefinition(v **types.QueryDefinition, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.QueryDefinition + if *v == nil { + sv = &types.QueryDefinition{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "lastModified": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.LastModified = ptr.Int64(i64) + } + + case "logGroupNames": + if err := awsAwsjson11_deserializeDocumentLogGroupNames(&sv.LogGroupNames, value); err != nil { + return err + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected QueryDefinitionName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "parameters": + if err := awsAwsjson11_deserializeDocumentQueryParameterList(&sv.Parameters, value); err != nil { + return err + } + + case "queryDefinitionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected QueryId to be of type string, got %T instead", value) + } + sv.QueryDefinitionId = ptr.String(jtv) + } + + case "queryLanguage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected QueryLanguage to be of type string, got %T instead", value) + } + sv.QueryLanguage = types.QueryLanguage(jtv) + } + + case "queryString": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected QueryDefinitionString to be of type string, got %T instead", value) + } + sv.QueryString = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentQueryDefinitionList(v *[]types.QueryDefinition, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.QueryDefinition + if *v == nil { + cv = []types.QueryDefinition{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.QueryDefinition + destAddr := &col + if err := awsAwsjson11_deserializeDocumentQueryDefinition(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentQueryInfo(v **types.QueryInfo, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.QueryInfo + if *v == nil { + sv = &types.QueryInfo{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "bytesScanned": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.BytesScanned = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.BytesScanned = ptr.Float64(f64) + + default: + return fmt.Errorf("expected BytesScannedValue to be a JSON Number, got %T instead", value) + + } + } + + case "createTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.CreateTime = ptr.Int64(i64) + } + + case "logGroupName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LogGroupName to be of type string, got %T instead", value) + } + sv.LogGroupName = ptr.String(jtv) + } + + case "queryDuration": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected QueryDuration to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.QueryDuration = ptr.Int64(i64) + } + + case "queryId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected QueryId to be of type string, got %T instead", value) + } + sv.QueryId = ptr.String(jtv) + } + + case "queryLanguage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected QueryLanguage to be of type string, got %T instead", value) + } + sv.QueryLanguage = types.QueryLanguage(jtv) + } + + case "queryString": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected QueryString to be of type string, got %T instead", value) + } + sv.QueryString = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected QueryStatus to be of type string, got %T instead", value) + } + sv.Status = types.QueryStatus(jtv) + } + + case "userIdentity": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UserIdentity to be of type string, got %T instead", value) + } + sv.UserIdentity = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentQueryInfoList(v *[]types.QueryInfo, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.QueryInfo + if *v == nil { + cv = []types.QueryInfo{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.QueryInfo + destAddr := &col + if err := awsAwsjson11_deserializeDocumentQueryInfo(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentQueryParameter(v **types.QueryParameter, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.QueryParameter + if *v == nil { + sv = &types.QueryParameter{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "defaultValue": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected QueryParameterDefaultValue to be of type string, got %T instead", value) + } + sv.DefaultValue = ptr.String(jtv) + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected QueryParameterDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected QueryParameterName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentQueryParameterList(v *[]types.QueryParameter, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.QueryParameter + if *v == nil { + cv = []types.QueryParameter{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.QueryParameter + destAddr := &col + if err := awsAwsjson11_deserializeDocumentQueryParameter(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentQueryResults(v *[][]types.ResultField, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv [][]types.ResultField + if *v == nil { + cv = [][]types.ResultField{} + } else { + cv = *v + } + + for _, value := range shape { + var col []types.ResultField + if err := awsAwsjson11_deserializeDocumentResultRows(&col, value); err != nil { + return err + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentQueryStatistics(v **types.QueryStatistics, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.QueryStatistics + if *v == nil { + sv = &types.QueryStatistics{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "bytesScanned": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.BytesScanned = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.BytesScanned = f64 + + default: + return fmt.Errorf("expected StatsValue to be a JSON Number, got %T instead", value) + + } + } + + case "estimatedBytesSkipped": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.EstimatedBytesSkipped = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.EstimatedBytesSkipped = f64 + + default: + return fmt.Errorf("expected StatsValue to be a JSON Number, got %T instead", value) + + } + } + + case "estimatedRecordsSkipped": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.EstimatedRecordsSkipped = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.EstimatedRecordsSkipped = f64 + + default: + return fmt.Errorf("expected StatsValue to be a JSON Number, got %T instead", value) + + } + } + + case "logGroupsScanned": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LogGroupsScanned = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.LogGroupsScanned = f64 + + default: + return fmt.Errorf("expected StatsValue to be a JSON Number, got %T instead", value) + + } + } + + case "recordsMatched": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.RecordsMatched = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.RecordsMatched = f64 + + default: + return fmt.Errorf("expected StatsValue to be a JSON Number, got %T instead", value) + + } + } + + case "recordsScanned": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.RecordsScanned = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.RecordsScanned = f64 + + default: + return fmt.Errorf("expected StatsValue to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentRecordField(v **types.RecordField, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.RecordField + if *v == nil { + sv = &types.RecordField{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "mandatory": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.Mandatory = ptr.Bool(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FieldHeader to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentRecordFields(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FieldHeader to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentRejectedEntityInfo(v **types.RejectedEntityInfo, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.RejectedEntityInfo + if *v == nil { + sv = &types.RejectedEntityInfo{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "errorType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EntityRejectionErrorType to be of type string, got %T instead", value) + } + sv.ErrorType = types.EntityRejectionErrorType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentRejectedLogEventsInfo(v **types.RejectedLogEventsInfo, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.RejectedLogEventsInfo + if *v == nil { + sv = &types.RejectedLogEventsInfo{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "expiredLogEventEndIndex": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected LogEventIndex to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ExpiredLogEventEndIndex = ptr.Int32(int32(i64)) + } + + case "tooNewLogEventStartIndex": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected LogEventIndex to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TooNewLogEventStartIndex = ptr.Int32(int32(i64)) + } + + case "tooOldLogEventEndIndex": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected LogEventIndex to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TooOldLogEventEndIndex = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentRenameKeyEntries(v *[]types.RenameKeyEntry, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.RenameKeyEntry + if *v == nil { + cv = []types.RenameKeyEntry{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RenameKeyEntry + destAddr := &col + if err := awsAwsjson11_deserializeDocumentRenameKeyEntry(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentRenameKeyEntry(v **types.RenameKeyEntry, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.RenameKeyEntry + if *v == nil { + sv = &types.RenameKeyEntry{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "key": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Key to be of type string, got %T instead", value) + } + sv.Key = ptr.String(jtv) + } + + case "overwriteIfExists": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected OverwriteIfExists to be of type *bool, got %T instead", value) + } + sv.OverwriteIfExists = jtv + } + + case "renameTo": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RenameTo to be of type string, got %T instead", value) + } + sv.RenameTo = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentRenameKeys(v **types.RenameKeys, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.RenameKeys + if *v == nil { + sv = &types.RenameKeys{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "entries": + if err := awsAwsjson11_deserializeDocumentRenameKeyEntries(&sv.Entries, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentResourceAlreadyExistsException(v **types.ResourceAlreadyExistsException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ResourceAlreadyExistsException + if *v == nil { + sv = &types.ResourceAlreadyExistsException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Message to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentResourceArns(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ResourceNotFoundException + if *v == nil { + sv = &types.ResourceNotFoundException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Message to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentResourcePolicies(v *[]types.ResourcePolicy, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ResourcePolicy + if *v == nil { + cv = []types.ResourcePolicy{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ResourcePolicy + destAddr := &col + if err := awsAwsjson11_deserializeDocumentResourcePolicy(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentResourcePolicy(v **types.ResourcePolicy, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ResourcePolicy + if *v == nil { + sv = &types.ResourcePolicy{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "lastUpdatedTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.LastUpdatedTime = ptr.Int64(i64) + } + + case "policyDocument": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PolicyDocument to be of type string, got %T instead", value) + } + sv.PolicyDocument = ptr.String(jtv) + } + + case "policyName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PolicyName to be of type string, got %T instead", value) + } + sv.PolicyName = ptr.String(jtv) + } + + case "policyScope": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PolicyScope to be of type string, got %T instead", value) + } + sv.PolicyScope = types.PolicyScope(jtv) + } + + case "resourceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.ResourceArn = ptr.String(jtv) + } + + case "revisionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExpectedRevisionId to be of type string, got %T instead", value) + } + sv.RevisionId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentResultField(v **types.ResultField, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ResultField + if *v == nil { + sv = &types.ResultField{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "field": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Field to be of type string, got %T instead", value) + } + sv.Field = ptr.String(jtv) + } + + case "value": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Value to be of type string, got %T instead", value) + } + sv.Value = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentResultRows(v *[]types.ResultField, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ResultField + if *v == nil { + cv = []types.ResultField{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ResultField + destAddr := &col + if err := awsAwsjson11_deserializeDocumentResultField(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentS3Configuration(v **types.S3Configuration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.S3Configuration + if *v == nil { + sv = &types.S3Configuration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "destinationIdentifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3Uri to be of type string, got %T instead", value) + } + sv.DestinationIdentifier = ptr.String(jtv) + } + + case "kmsKeyId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected KmsKeyId to be of type string, got %T instead", value) + } + sv.KmsKeyId = ptr.String(jtv) + } + + case "ownerAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.OwnerAccountId = ptr.String(jtv) + } + + case "roleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value) + } + sv.RoleArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentS3DeliveryConfiguration(v **types.S3DeliveryConfiguration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.S3DeliveryConfiguration + if *v == nil { + sv = &types.S3DeliveryConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "enableHiveCompatiblePath": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.EnableHiveCompatiblePath = ptr.Bool(jtv) + } + + case "suffixPath": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DeliverySuffixPath to be of type string, got %T instead", value) + } + sv.SuffixPath = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentS3TableIntegrationSource(v **types.S3TableIntegrationSource, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.S3TableIntegrationSource + if *v == nil { + sv = &types.S3TableIntegrationSource{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "createdTimeStamp": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.CreatedTimeStamp = ptr.Int64(i64) + } + + case "dataSource": + if err := awsAwsjson11_deserializeDocumentDataSource(&sv.DataSource, value); err != nil { + return err + } + + case "identifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3TableIntegrationSourceIdentifier to be of type string, got %T instead", value) + } + sv.Identifier = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3TableIntegrationSourceStatus to be of type string, got %T instead", value) + } + sv.Status = types.S3TableIntegrationSourceStatus(jtv) + } + + case "statusReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3TableIntegrationSourceStatusReason to be of type string, got %T instead", value) + } + sv.StatusReason = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentS3TableIntegrationSources(v *[]types.S3TableIntegrationSource, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.S3TableIntegrationSource + if *v == nil { + cv = []types.S3TableIntegrationSource{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.S3TableIntegrationSource + destAddr := &col + if err := awsAwsjson11_deserializeDocumentS3TableIntegrationSource(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentScheduledQueryDestination(v **types.ScheduledQueryDestination, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ScheduledQueryDestination + if *v == nil { + sv = &types.ScheduledQueryDestination{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "destinationIdentifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.DestinationIdentifier = ptr.String(jtv) + } + + case "destinationType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ScheduledQueryDestinationType to be of type string, got %T instead", value) + } + sv.DestinationType = types.ScheduledQueryDestinationType(jtv) + } + + case "errorMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ErrorMessage = ptr.String(jtv) + } + + case "processedIdentifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ProcessedIdentifier = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ActionStatus to be of type string, got %T instead", value) + } + sv.Status = types.ActionStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentScheduledQueryDestinationList(v *[]types.ScheduledQueryDestination, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ScheduledQueryDestination + if *v == nil { + cv = []types.ScheduledQueryDestination{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ScheduledQueryDestination + destAddr := &col + if err := awsAwsjson11_deserializeDocumentScheduledQueryDestination(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentScheduledQueryLogGroupIdentifiers(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LogGroupIdentifier to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentScheduledQuerySummary(v **types.ScheduledQuerySummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ScheduledQuerySummary + if *v == nil { + sv = &types.ScheduledQuerySummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "creationTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.CreationTime = ptr.Int64(i64) + } + + case "destinationConfiguration": + if err := awsAwsjson11_deserializeDocumentDestinationConfiguration(&sv.DestinationConfiguration, value); err != nil { + return err + } + + case "lastExecutionStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExecutionStatus to be of type string, got %T instead", value) + } + sv.LastExecutionStatus = types.ExecutionStatus(jtv) + } + + case "lastTriggeredTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.LastTriggeredTime = ptr.Int64(i64) + } + + case "lastUpdatedTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.LastUpdatedTime = ptr.Int64(i64) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ScheduledQueryName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "scheduledQueryArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.ScheduledQueryArn = ptr.String(jtv) + } + + case "scheduleExpression": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ScheduleExpression to be of type string, got %T instead", value) + } + sv.ScheduleExpression = ptr.String(jtv) + } + + case "state": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ScheduledQueryState to be of type string, got %T instead", value) + } + sv.State = types.ScheduledQueryState(jtv) + } + + case "timezone": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ScheduleTimezone to be of type string, got %T instead", value) + } + sv.Timezone = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentScheduledQuerySummaryList(v *[]types.ScheduledQuerySummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ScheduledQuerySummary + if *v == nil { + cv = []types.ScheduledQuerySummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ScheduledQuerySummary + destAddr := &col + if err := awsAwsjson11_deserializeDocumentScheduledQuerySummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentSearchedLogStream(v **types.SearchedLogStream, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.SearchedLogStream + if *v == nil { + sv = &types.SearchedLogStream{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "logStreamName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LogStreamName to be of type string, got %T instead", value) + } + sv.LogStreamName = ptr.String(jtv) + } + + case "searchedCompletely": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected LogStreamSearchedCompletely to be of type *bool, got %T instead", value) + } + sv.SearchedCompletely = ptr.Bool(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentSearchedLogStreams(v *[]types.SearchedLogStream, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.SearchedLogStream + if *v == nil { + cv = []types.SearchedLogStream{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.SearchedLogStream + destAddr := &col + if err := awsAwsjson11_deserializeDocumentSearchedLogStream(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentServiceQuotaExceededException(v **types.ServiceQuotaExceededException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ServiceQuotaExceededException + if *v == nil { + sv = &types.ServiceQuotaExceededException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Message to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentServiceUnavailableException(v **types.ServiceUnavailableException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ServiceUnavailableException + if *v == nil { + sv = &types.ServiceUnavailableException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Message to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentSplitString(v **types.SplitString, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.SplitString + if *v == nil { + sv = &types.SplitString{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "entries": + if err := awsAwsjson11_deserializeDocumentSplitStringEntries(&sv.Entries, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentSplitStringEntries(v *[]types.SplitStringEntry, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.SplitStringEntry + if *v == nil { + cv = []types.SplitStringEntry{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.SplitStringEntry + destAddr := &col + if err := awsAwsjson11_deserializeDocumentSplitStringEntry(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentSplitStringEntry(v **types.SplitStringEntry, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.SplitStringEntry + if *v == nil { + sv = &types.SplitStringEntry{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "delimiter": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SplitStringDelimiter to be of type string, got %T instead", value) + } + sv.Delimiter = ptr.String(jtv) + } + + case "source": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Source to be of type string, got %T instead", value) + } + sv.Source = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentSubscriptionFilter(v **types.SubscriptionFilter, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.SubscriptionFilter + if *v == nil { + sv = &types.SubscriptionFilter{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "applyOnTransformedLogs": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected ApplyOnTransformedLogs to be of type *bool, got %T instead", value) + } + sv.ApplyOnTransformedLogs = jtv + } + + case "creationTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.CreationTime = ptr.Int64(i64) + } + + case "destinationArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DestinationArn to be of type string, got %T instead", value) + } + sv.DestinationArn = ptr.String(jtv) + } + + case "distribution": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Distribution to be of type string, got %T instead", value) + } + sv.Distribution = types.Distribution(jtv) + } + + case "emitSystemFields": + if err := awsAwsjson11_deserializeDocumentEmitSystemFields(&sv.EmitSystemFields, value); err != nil { + return err + } + + case "fieldSelectionCriteria": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FieldSelectionCriteria to be of type string, got %T instead", value) + } + sv.FieldSelectionCriteria = ptr.String(jtv) + } + + case "filterName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FilterName to be of type string, got %T instead", value) + } + sv.FilterName = ptr.String(jtv) + } + + case "filterPattern": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FilterPattern to be of type string, got %T instead", value) + } + sv.FilterPattern = ptr.String(jtv) + } + + case "logGroupName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LogGroupName to be of type string, got %T instead", value) + } + sv.LogGroupName = ptr.String(jtv) + } + + case "roleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value) + } + sv.RoleArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentSubscriptionFilters(v *[]types.SubscriptionFilter, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.SubscriptionFilter + if *v == nil { + cv = []types.SubscriptionFilter{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.SubscriptionFilter + destAddr := &col + if err := awsAwsjson11_deserializeDocumentSubscriptionFilter(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentSubstituteString(v **types.SubstituteString, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.SubstituteString + if *v == nil { + sv = &types.SubstituteString{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "entries": + if err := awsAwsjson11_deserializeDocumentSubstituteStringEntries(&sv.Entries, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentSubstituteStringEntries(v *[]types.SubstituteStringEntry, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.SubstituteStringEntry + if *v == nil { + cv = []types.SubstituteStringEntry{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.SubstituteStringEntry + destAddr := &col + if err := awsAwsjson11_deserializeDocumentSubstituteStringEntry(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentSubstituteStringEntry(v **types.SubstituteStringEntry, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.SubstituteStringEntry + if *v == nil { + sv = &types.SubstituteStringEntry{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "from": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FromKey to be of type string, got %T instead", value) + } + sv.From = ptr.String(jtv) + } + + case "source": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Source to be of type string, got %T instead", value) + } + sv.Source = ptr.String(jtv) + } + + case "to": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ToKey to be of type string, got %T instead", value) + } + sv.To = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentTableFields(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentTags(v *map[string]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]string + if *v == nil { + mv = map[string]string{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TagValue to be of type string, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsAwsjson11_deserializeDocumentThrottlingException(v **types.ThrottlingException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ThrottlingException + if *v == nil { + sv = &types.ThrottlingException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Message to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentTooManyTagsException(v **types.TooManyTagsException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.TooManyTagsException + if *v == nil { + sv = &types.TooManyTagsException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Message to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "resourceName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AmazonResourceName to be of type string, got %T instead", value) + } + sv.ResourceName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentTransformedLogRecord(v **types.TransformedLogRecord, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.TransformedLogRecord + if *v == nil { + sv = &types.TransformedLogRecord{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "eventMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EventMessage to be of type string, got %T instead", value) + } + sv.EventMessage = ptr.String(jtv) + } + + case "eventNumber": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected EventNumber to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.EventNumber = i64 + } + + case "transformedEventMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TransformedEventMessage to be of type string, got %T instead", value) + } + sv.TransformedEventMessage = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentTransformedLogs(v *[]types.TransformedLogRecord, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.TransformedLogRecord + if *v == nil { + cv = []types.TransformedLogRecord{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.TransformedLogRecord + destAddr := &col + if err := awsAwsjson11_deserializeDocumentTransformedLogRecord(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentTriggerHistoryRecord(v **types.TriggerHistoryRecord, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.TriggerHistoryRecord + if *v == nil { + sv = &types.TriggerHistoryRecord{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "destinations": + if err := awsAwsjson11_deserializeDocumentScheduledQueryDestinationList(&sv.Destinations, value); err != nil { + return err + } + + case "errorMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ErrorMessage = ptr.String(jtv) + } + + case "executionStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExecutionStatus to be of type string, got %T instead", value) + } + sv.ExecutionStatus = types.ExecutionStatus(jtv) + } + + case "queryId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected QueryId to be of type string, got %T instead", value) + } + sv.QueryId = ptr.String(jtv) + } + + case "triggeredTimestamp": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TriggeredTimestamp = ptr.Int64(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentTriggerHistoryRecordList(v *[]types.TriggerHistoryRecord, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.TriggerHistoryRecord + if *v == nil { + cv = []types.TriggerHistoryRecord{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.TriggerHistoryRecord + destAddr := &col + if err := awsAwsjson11_deserializeDocumentTriggerHistoryRecord(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentTrimString(v **types.TrimString, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.TrimString + if *v == nil { + sv = &types.TrimString{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "withKeys": + if err := awsAwsjson11_deserializeDocumentTrimStringWithKeys(&sv.WithKeys, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentTrimStringWithKeys(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WithKey to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentTypeConverter(v **types.TypeConverter, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.TypeConverter + if *v == nil { + sv = &types.TypeConverter{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "entries": + if err := awsAwsjson11_deserializeDocumentTypeConverterEntries(&sv.Entries, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentTypeConverterEntries(v *[]types.TypeConverterEntry, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.TypeConverterEntry + if *v == nil { + cv = []types.TypeConverterEntry{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.TypeConverterEntry + destAddr := &col + if err := awsAwsjson11_deserializeDocumentTypeConverterEntry(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentTypeConverterEntry(v **types.TypeConverterEntry, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.TypeConverterEntry + if *v == nil { + sv = &types.TypeConverterEntry{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "key": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Key to be of type string, got %T instead", value) + } + sv.Key = ptr.String(jtv) + } + + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Type to be of type string, got %T instead", value) + } + sv.Type = types.Type(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentUnrecognizedClientException(v **types.UnrecognizedClientException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.UnrecognizedClientException + if *v == nil { + sv = &types.UnrecognizedClientException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Message to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentUpperCaseString(v **types.UpperCaseString, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.UpperCaseString + if *v == nil { + sv = &types.UpperCaseString{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "withKeys": + if err := awsAwsjson11_deserializeDocumentUpperCaseStringWithKeys(&sv.WithKeys, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentUpperCaseStringWithKeys(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WithKey to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentValidationException(v **types.ValidationException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ValidationException + if *v == nil { + sv = &types.ValidationException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Message to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentAssociateSourceToS3TableIntegrationOutput(v **AssociateSourceToS3TableIntegrationOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *AssociateSourceToS3TableIntegrationOutput + if *v == nil { + sv = &AssociateSourceToS3TableIntegrationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "identifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3TableIntegrationSourceIdentifier to be of type string, got %T instead", value) + } + sv.Identifier = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentCancelImportTaskOutput(v **CancelImportTaskOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CancelImportTaskOutput + if *v == nil { + sv = &CancelImportTaskOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "creationTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.CreationTime = ptr.Int64(i64) + } + + case "importId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ImportId to be of type string, got %T instead", value) + } + sv.ImportId = ptr.String(jtv) + } + + case "importStatistics": + if err := awsAwsjson11_deserializeDocumentImportStatistics(&sv.ImportStatistics, value); err != nil { + return err + } + + case "importStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ImportStatus to be of type string, got %T instead", value) + } + sv.ImportStatus = types.ImportStatus(jtv) + } + + case "lastUpdatedTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.LastUpdatedTime = ptr.Int64(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentCreateDeliveryOutput(v **CreateDeliveryOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateDeliveryOutput + if *v == nil { + sv = &CreateDeliveryOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "delivery": + if err := awsAwsjson11_deserializeDocumentDelivery(&sv.Delivery, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentCreateExportTaskOutput(v **CreateExportTaskOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateExportTaskOutput + if *v == nil { + sv = &CreateExportTaskOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "taskId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExportTaskId to be of type string, got %T instead", value) + } + sv.TaskId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentCreateImportTaskOutput(v **CreateImportTaskOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateImportTaskOutput + if *v == nil { + sv = &CreateImportTaskOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "creationTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.CreationTime = ptr.Int64(i64) + } + + case "importDestinationArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.ImportDestinationArn = ptr.String(jtv) + } + + case "importId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ImportId to be of type string, got %T instead", value) + } + sv.ImportId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentCreateLogAnomalyDetectorOutput(v **CreateLogAnomalyDetectorOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateLogAnomalyDetectorOutput + if *v == nil { + sv = &CreateLogAnomalyDetectorOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "anomalyDetectorArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AnomalyDetectorArn to be of type string, got %T instead", value) + } + sv.AnomalyDetectorArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentCreateLookupTableOutput(v **CreateLookupTableOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateLookupTableOutput + if *v == nil { + sv = &CreateLookupTableOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "createdAt": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Int64(i64) + } + + case "lookupTableArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.LookupTableArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentCreateScheduledQueryOutput(v **CreateScheduledQueryOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateScheduledQueryOutput + if *v == nil { + sv = &CreateScheduledQueryOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "scheduledQueryArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.ScheduledQueryArn = ptr.String(jtv) + } + + case "state": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ScheduledQueryState to be of type string, got %T instead", value) + } + sv.State = types.ScheduledQueryState(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDeleteIndexPolicyOutput(v **DeleteIndexPolicyOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeleteIndexPolicyOutput + if *v == nil { + sv = &DeleteIndexPolicyOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDeleteIntegrationOutput(v **DeleteIntegrationOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeleteIntegrationOutput + if *v == nil { + sv = &DeleteIntegrationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDeleteQueryDefinitionOutput(v **DeleteQueryDefinitionOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeleteQueryDefinitionOutput + if *v == nil { + sv = &DeleteQueryDefinitionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "success": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Success to be of type *bool, got %T instead", value) + } + sv.Success = jtv + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDeleteScheduledQueryOutput(v **DeleteScheduledQueryOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeleteScheduledQueryOutput + if *v == nil { + sv = &DeleteScheduledQueryOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeAccountPoliciesOutput(v **DescribeAccountPoliciesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeAccountPoliciesOutput + if *v == nil { + sv = &DescribeAccountPoliciesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "accountPolicies": + if err := awsAwsjson11_deserializeDocumentAccountPolicies(&sv.AccountPolicies, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeConfigurationTemplatesOutput(v **DescribeConfigurationTemplatesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeConfigurationTemplatesOutput + if *v == nil { + sv = &DescribeConfigurationTemplatesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "configurationTemplates": + if err := awsAwsjson11_deserializeDocumentConfigurationTemplates(&sv.ConfigurationTemplates, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeDeliveriesOutput(v **DescribeDeliveriesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeDeliveriesOutput + if *v == nil { + sv = &DescribeDeliveriesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "deliveries": + if err := awsAwsjson11_deserializeDocumentDeliveries(&sv.Deliveries, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeDeliveryDestinationsOutput(v **DescribeDeliveryDestinationsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeDeliveryDestinationsOutput + if *v == nil { + sv = &DescribeDeliveryDestinationsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "deliveryDestinations": + if err := awsAwsjson11_deserializeDocumentDeliveryDestinations(&sv.DeliveryDestinations, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeDeliverySourcesOutput(v **DescribeDeliverySourcesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeDeliverySourcesOutput + if *v == nil { + sv = &DescribeDeliverySourcesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "deliverySources": + if err := awsAwsjson11_deserializeDocumentDeliverySources(&sv.DeliverySources, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeDestinationsOutput(v **DescribeDestinationsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeDestinationsOutput + if *v == nil { + sv = &DescribeDestinationsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "destinations": + if err := awsAwsjson11_deserializeDocumentDestinations(&sv.Destinations, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeExportTasksOutput(v **DescribeExportTasksOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeExportTasksOutput + if *v == nil { + sv = &DescribeExportTasksOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "exportTasks": + if err := awsAwsjson11_deserializeDocumentExportTasks(&sv.ExportTasks, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeFieldIndexesOutput(v **DescribeFieldIndexesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeFieldIndexesOutput + if *v == nil { + sv = &DescribeFieldIndexesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "fieldIndexes": + if err := awsAwsjson11_deserializeDocumentFieldIndexes(&sv.FieldIndexes, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeImportTaskBatchesOutput(v **DescribeImportTaskBatchesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeImportTaskBatchesOutput + if *v == nil { + sv = &DescribeImportTaskBatchesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "importBatches": + if err := awsAwsjson11_deserializeDocumentImportBatchList(&sv.ImportBatches, value); err != nil { + return err + } + + case "importId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ImportId to be of type string, got %T instead", value) + } + sv.ImportId = ptr.String(jtv) + } + + case "importSourceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.ImportSourceArn = ptr.String(jtv) + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeImportTasksOutput(v **DescribeImportTasksOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeImportTasksOutput + if *v == nil { + sv = &DescribeImportTasksOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "imports": + if err := awsAwsjson11_deserializeDocumentImportList(&sv.Imports, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeIndexPoliciesOutput(v **DescribeIndexPoliciesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeIndexPoliciesOutput + if *v == nil { + sv = &DescribeIndexPoliciesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "indexPolicies": + if err := awsAwsjson11_deserializeDocumentIndexPolicies(&sv.IndexPolicies, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeLogGroupsOutput(v **DescribeLogGroupsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeLogGroupsOutput + if *v == nil { + sv = &DescribeLogGroupsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "logGroups": + if err := awsAwsjson11_deserializeDocumentLogGroups(&sv.LogGroups, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeLogStreamsOutput(v **DescribeLogStreamsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeLogStreamsOutput + if *v == nil { + sv = &DescribeLogStreamsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "logStreams": + if err := awsAwsjson11_deserializeDocumentLogStreams(&sv.LogStreams, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeLookupTablesOutput(v **DescribeLookupTablesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeLookupTablesOutput + if *v == nil { + sv = &DescribeLookupTablesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "lookupTables": + if err := awsAwsjson11_deserializeDocumentLookupTables(&sv.LookupTables, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeMetricFiltersOutput(v **DescribeMetricFiltersOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeMetricFiltersOutput + if *v == nil { + sv = &DescribeMetricFiltersOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "metricFilters": + if err := awsAwsjson11_deserializeDocumentMetricFilters(&sv.MetricFilters, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeQueriesOutput(v **DescribeQueriesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeQueriesOutput + if *v == nil { + sv = &DescribeQueriesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "queries": + if err := awsAwsjson11_deserializeDocumentQueryInfoList(&sv.Queries, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeQueryDefinitionsOutput(v **DescribeQueryDefinitionsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeQueryDefinitionsOutput + if *v == nil { + sv = &DescribeQueryDefinitionsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "queryDefinitions": + if err := awsAwsjson11_deserializeDocumentQueryDefinitionList(&sv.QueryDefinitions, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeResourcePoliciesOutput(v **DescribeResourcePoliciesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeResourcePoliciesOutput + if *v == nil { + sv = &DescribeResourcePoliciesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "resourcePolicies": + if err := awsAwsjson11_deserializeDocumentResourcePolicies(&sv.ResourcePolicies, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeSubscriptionFiltersOutput(v **DescribeSubscriptionFiltersOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeSubscriptionFiltersOutput + if *v == nil { + sv = &DescribeSubscriptionFiltersOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "subscriptionFilters": + if err := awsAwsjson11_deserializeDocumentSubscriptionFilters(&sv.SubscriptionFilters, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDisassociateSourceFromS3TableIntegrationOutput(v **DisassociateSourceFromS3TableIntegrationOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DisassociateSourceFromS3TableIntegrationOutput + if *v == nil { + sv = &DisassociateSourceFromS3TableIntegrationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "identifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3TableIntegrationSourceIdentifier to be of type string, got %T instead", value) + } + sv.Identifier = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentFilterLogEventsOutput(v **FilterLogEventsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *FilterLogEventsOutput + if *v == nil { + sv = &FilterLogEventsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "events": + if err := awsAwsjson11_deserializeDocumentFilteredLogEvents(&sv.Events, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "searchedLogStreams": + if err := awsAwsjson11_deserializeDocumentSearchedLogStreams(&sv.SearchedLogStreams, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentGetDataProtectionPolicyOutput(v **GetDataProtectionPolicyOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetDataProtectionPolicyOutput + if *v == nil { + sv = &GetDataProtectionPolicyOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "lastUpdatedTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.LastUpdatedTime = ptr.Int64(i64) + } + + case "logGroupIdentifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LogGroupIdentifier to be of type string, got %T instead", value) + } + sv.LogGroupIdentifier = ptr.String(jtv) + } + + case "policyDocument": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DataProtectionPolicyDocument to be of type string, got %T instead", value) + } + sv.PolicyDocument = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentGetDeliveryDestinationOutput(v **GetDeliveryDestinationOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetDeliveryDestinationOutput + if *v == nil { + sv = &GetDeliveryDestinationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "deliveryDestination": + if err := awsAwsjson11_deserializeDocumentDeliveryDestination(&sv.DeliveryDestination, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentGetDeliveryDestinationPolicyOutput(v **GetDeliveryDestinationPolicyOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetDeliveryDestinationPolicyOutput + if *v == nil { + sv = &GetDeliveryDestinationPolicyOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "policy": + if err := awsAwsjson11_deserializeDocumentPolicy(&sv.Policy, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentGetDeliveryOutput(v **GetDeliveryOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetDeliveryOutput + if *v == nil { + sv = &GetDeliveryOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "delivery": + if err := awsAwsjson11_deserializeDocumentDelivery(&sv.Delivery, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentGetDeliverySourceOutput(v **GetDeliverySourceOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetDeliverySourceOutput + if *v == nil { + sv = &GetDeliverySourceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "deliverySource": + if err := awsAwsjson11_deserializeDocumentDeliverySource(&sv.DeliverySource, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentGetIntegrationOutput(v **GetIntegrationOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetIntegrationOutput + if *v == nil { + sv = &GetIntegrationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "integrationDetails": + if err := awsAwsjson11_deserializeDocumentIntegrationDetails(&sv.IntegrationDetails, value); err != nil { + return err + } + + case "integrationName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IntegrationName to be of type string, got %T instead", value) + } + sv.IntegrationName = ptr.String(jtv) + } + + case "integrationStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IntegrationStatus to be of type string, got %T instead", value) + } + sv.IntegrationStatus = types.IntegrationStatus(jtv) + } + + case "integrationType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IntegrationType to be of type string, got %T instead", value) + } + sv.IntegrationType = types.IntegrationType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentGetLogAnomalyDetectorOutput(v **GetLogAnomalyDetectorOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetLogAnomalyDetectorOutput + if *v == nil { + sv = &GetLogAnomalyDetectorOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "anomalyDetectorStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AnomalyDetectorStatus to be of type string, got %T instead", value) + } + sv.AnomalyDetectorStatus = types.AnomalyDetectorStatus(jtv) + } + + case "anomalyVisibilityTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected AnomalyVisibilityTime to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.AnomalyVisibilityTime = ptr.Int64(i64) + } + + case "creationTimeStamp": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected EpochMillis to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.CreationTimeStamp = i64 + } + + case "detectorName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DetectorName to be of type string, got %T instead", value) + } + sv.DetectorName = ptr.String(jtv) + } + + case "evaluationFrequency": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EvaluationFrequency to be of type string, got %T instead", value) + } + sv.EvaluationFrequency = types.EvaluationFrequency(jtv) + } + + case "filterPattern": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FilterPattern to be of type string, got %T instead", value) + } + sv.FilterPattern = ptr.String(jtv) + } + + case "kmsKeyId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected KmsKeyId to be of type string, got %T instead", value) + } + sv.KmsKeyId = ptr.String(jtv) + } + + case "lastModifiedTimeStamp": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected EpochMillis to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.LastModifiedTimeStamp = i64 + } + + case "logGroupArnList": + if err := awsAwsjson11_deserializeDocumentLogGroupArnList(&sv.LogGroupArnList, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentGetLogEventsOutput(v **GetLogEventsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetLogEventsOutput + if *v == nil { + sv = &GetLogEventsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "events": + if err := awsAwsjson11_deserializeDocumentOutputLogEvents(&sv.Events, value); err != nil { + return err + } + + case "nextBackwardToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextBackwardToken = ptr.String(jtv) + } + + case "nextForwardToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextForwardToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentGetLogFieldsOutput(v **GetLogFieldsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetLogFieldsOutput + if *v == nil { + sv = &GetLogFieldsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "logFields": + if err := awsAwsjson11_deserializeDocumentLogFieldsList(&sv.LogFields, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentGetLogGroupFieldsOutput(v **GetLogGroupFieldsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetLogGroupFieldsOutput + if *v == nil { + sv = &GetLogGroupFieldsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "logGroupFields": + if err := awsAwsjson11_deserializeDocumentLogGroupFieldList(&sv.LogGroupFields, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentGetLogRecordOutput(v **GetLogRecordOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetLogRecordOutput + if *v == nil { + sv = &GetLogRecordOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "logRecord": + if err := awsAwsjson11_deserializeDocumentLogRecord(&sv.LogRecord, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentGetLookupTableOutput(v **GetLookupTableOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetLookupTableOutput + if *v == nil { + sv = &GetLookupTableOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LookupTableDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "kmsKeyId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected KmsKeyId to be of type string, got %T instead", value) + } + sv.KmsKeyId = ptr.String(jtv) + } + + case "lastUpdatedTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.LastUpdatedTime = ptr.Int64(i64) + } + + case "lookupTableArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.LookupTableArn = ptr.String(jtv) + } + + case "lookupTableName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LookupTableName to be of type string, got %T instead", value) + } + sv.LookupTableName = ptr.String(jtv) + } + + case "sizeBytes": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected StoredBytes to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.SizeBytes = ptr.Int64(i64) + } + + case "tableBody": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TableBody to be of type string, got %T instead", value) + } + sv.TableBody = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentGetQueryResultsOutput(v **GetQueryResultsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetQueryResultsOutput + if *v == nil { + sv = &GetQueryResultsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "encryptionKey": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EncryptionKey to be of type string, got %T instead", value) + } + sv.EncryptionKey = ptr.String(jtv) + } + + case "queryLanguage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected QueryLanguage to be of type string, got %T instead", value) + } + sv.QueryLanguage = types.QueryLanguage(jtv) + } + + case "results": + if err := awsAwsjson11_deserializeDocumentQueryResults(&sv.Results, value); err != nil { + return err + } + + case "statistics": + if err := awsAwsjson11_deserializeDocumentQueryStatistics(&sv.Statistics, value); err != nil { + return err + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected QueryStatus to be of type string, got %T instead", value) + } + sv.Status = types.QueryStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentGetScheduledQueryHistoryOutput(v **GetScheduledQueryHistoryOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetScheduledQueryHistoryOutput + if *v == nil { + sv = &GetScheduledQueryHistoryOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ScheduledQueryName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "scheduledQueryArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.ScheduledQueryArn = ptr.String(jtv) + } + + case "triggerHistory": + if err := awsAwsjson11_deserializeDocumentTriggerHistoryRecordList(&sv.TriggerHistory, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentGetScheduledQueryOutput(v **GetScheduledQueryOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetScheduledQueryOutput + if *v == nil { + sv = &GetScheduledQueryOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "creationTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.CreationTime = ptr.Int64(i64) + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ScheduledQueryDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "destinationConfiguration": + if err := awsAwsjson11_deserializeDocumentDestinationConfiguration(&sv.DestinationConfiguration, value); err != nil { + return err + } + + case "executionRoleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value) + } + sv.ExecutionRoleArn = ptr.String(jtv) + } + + case "lastExecutionStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExecutionStatus to be of type string, got %T instead", value) + } + sv.LastExecutionStatus = types.ExecutionStatus(jtv) + } + + case "lastTriggeredTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.LastTriggeredTime = ptr.Int64(i64) + } + + case "lastUpdatedTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.LastUpdatedTime = ptr.Int64(i64) + } + + case "logGroupIdentifiers": + if err := awsAwsjson11_deserializeDocumentScheduledQueryLogGroupIdentifiers(&sv.LogGroupIdentifiers, value); err != nil { + return err + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ScheduledQueryName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "queryLanguage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected QueryLanguage to be of type string, got %T instead", value) + } + sv.QueryLanguage = types.QueryLanguage(jtv) + } + + case "queryString": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected QueryString to be of type string, got %T instead", value) + } + sv.QueryString = ptr.String(jtv) + } + + case "scheduledQueryArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.ScheduledQueryArn = ptr.String(jtv) + } + + case "scheduleEndTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ScheduleEndTime = ptr.Int64(i64) + } + + case "scheduleExpression": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ScheduleExpression to be of type string, got %T instead", value) + } + sv.ScheduleExpression = ptr.String(jtv) + } + + case "scheduleStartTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ScheduleStartTime = ptr.Int64(i64) + } + + case "startTimeOffset": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected StartTimeOffset to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.StartTimeOffset = ptr.Int64(i64) + } + + case "state": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ScheduledQueryState to be of type string, got %T instead", value) + } + sv.State = types.ScheduledQueryState(jtv) + } + + case "timezone": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ScheduleTimezone to be of type string, got %T instead", value) + } + sv.Timezone = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentGetTransformerOutput(v **GetTransformerOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetTransformerOutput + if *v == nil { + sv = &GetTransformerOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "creationTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.CreationTime = ptr.Int64(i64) + } + + case "lastModifiedTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.LastModifiedTime = ptr.Int64(i64) + } + + case "logGroupIdentifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LogGroupIdentifier to be of type string, got %T instead", value) + } + sv.LogGroupIdentifier = ptr.String(jtv) + } + + case "transformerConfig": + if err := awsAwsjson11_deserializeDocumentProcessors(&sv.TransformerConfig, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentListAggregateLogGroupSummariesOutput(v **ListAggregateLogGroupSummariesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListAggregateLogGroupSummariesOutput + if *v == nil { + sv = &ListAggregateLogGroupSummariesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "aggregateLogGroupSummaries": + if err := awsAwsjson11_deserializeDocumentAggregateLogGroupSummaries(&sv.AggregateLogGroupSummaries, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentListAnomaliesOutput(v **ListAnomaliesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListAnomaliesOutput + if *v == nil { + sv = &ListAnomaliesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "anomalies": + if err := awsAwsjson11_deserializeDocumentAnomalies(&sv.Anomalies, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentListIntegrationsOutput(v **ListIntegrationsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListIntegrationsOutput + if *v == nil { + sv = &ListIntegrationsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "integrationSummaries": + if err := awsAwsjson11_deserializeDocumentIntegrationSummaries(&sv.IntegrationSummaries, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentListLogAnomalyDetectorsOutput(v **ListLogAnomalyDetectorsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListLogAnomalyDetectorsOutput + if *v == nil { + sv = &ListLogAnomalyDetectorsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "anomalyDetectors": + if err := awsAwsjson11_deserializeDocumentAnomalyDetectors(&sv.AnomalyDetectors, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentListLogGroupsForQueryOutput(v **ListLogGroupsForQueryOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListLogGroupsForQueryOutput + if *v == nil { + sv = &ListLogGroupsForQueryOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "logGroupIdentifiers": + if err := awsAwsjson11_deserializeDocumentLogGroupIdentifiers(&sv.LogGroupIdentifiers, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentListLogGroupsOutput(v **ListLogGroupsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListLogGroupsOutput + if *v == nil { + sv = &ListLogGroupsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "logGroups": + if err := awsAwsjson11_deserializeDocumentLogGroupSummaries(&sv.LogGroups, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentListScheduledQueriesOutput(v **ListScheduledQueriesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListScheduledQueriesOutput + if *v == nil { + sv = &ListScheduledQueriesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "scheduledQueries": + if err := awsAwsjson11_deserializeDocumentScheduledQuerySummaryList(&sv.ScheduledQueries, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentListSourcesForS3TableIntegrationOutput(v **ListSourcesForS3TableIntegrationOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListSourcesForS3TableIntegrationOutput + if *v == nil { + sv = &ListSourcesForS3TableIntegrationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "sources": + if err := awsAwsjson11_deserializeDocumentS3TableIntegrationSources(&sv.Sources, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListTagsForResourceOutput + if *v == nil { + sv = &ListTagsForResourceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "tags": + if err := awsAwsjson11_deserializeDocumentTags(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentListTagsLogGroupOutput(v **ListTagsLogGroupOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListTagsLogGroupOutput + if *v == nil { + sv = &ListTagsLogGroupOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "tags": + if err := awsAwsjson11_deserializeDocumentTags(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentPutAccountPolicyOutput(v **PutAccountPolicyOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *PutAccountPolicyOutput + if *v == nil { + sv = &PutAccountPolicyOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "accountPolicy": + if err := awsAwsjson11_deserializeDocumentAccountPolicy(&sv.AccountPolicy, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentPutDataProtectionPolicyOutput(v **PutDataProtectionPolicyOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *PutDataProtectionPolicyOutput + if *v == nil { + sv = &PutDataProtectionPolicyOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "lastUpdatedTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.LastUpdatedTime = ptr.Int64(i64) + } + + case "logGroupIdentifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LogGroupIdentifier to be of type string, got %T instead", value) + } + sv.LogGroupIdentifier = ptr.String(jtv) + } + + case "policyDocument": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DataProtectionPolicyDocument to be of type string, got %T instead", value) + } + sv.PolicyDocument = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentPutDeliveryDestinationOutput(v **PutDeliveryDestinationOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *PutDeliveryDestinationOutput + if *v == nil { + sv = &PutDeliveryDestinationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "deliveryDestination": + if err := awsAwsjson11_deserializeDocumentDeliveryDestination(&sv.DeliveryDestination, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentPutDeliveryDestinationPolicyOutput(v **PutDeliveryDestinationPolicyOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *PutDeliveryDestinationPolicyOutput + if *v == nil { + sv = &PutDeliveryDestinationPolicyOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "policy": + if err := awsAwsjson11_deserializeDocumentPolicy(&sv.Policy, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentPutDeliverySourceOutput(v **PutDeliverySourceOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *PutDeliverySourceOutput + if *v == nil { + sv = &PutDeliverySourceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "deliverySource": + if err := awsAwsjson11_deserializeDocumentDeliverySource(&sv.DeliverySource, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentPutDestinationOutput(v **PutDestinationOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *PutDestinationOutput + if *v == nil { + sv = &PutDestinationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "destination": + if err := awsAwsjson11_deserializeDocumentDestination(&sv.Destination, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentPutIndexPolicyOutput(v **PutIndexPolicyOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *PutIndexPolicyOutput + if *v == nil { + sv = &PutIndexPolicyOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "indexPolicy": + if err := awsAwsjson11_deserializeDocumentIndexPolicy(&sv.IndexPolicy, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentPutIntegrationOutput(v **PutIntegrationOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *PutIntegrationOutput + if *v == nil { + sv = &PutIntegrationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "integrationName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IntegrationName to be of type string, got %T instead", value) + } + sv.IntegrationName = ptr.String(jtv) + } + + case "integrationStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IntegrationStatus to be of type string, got %T instead", value) + } + sv.IntegrationStatus = types.IntegrationStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentPutLogEventsOutput(v **PutLogEventsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *PutLogEventsOutput + if *v == nil { + sv = &PutLogEventsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "nextSequenceToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SequenceToken to be of type string, got %T instead", value) + } + sv.NextSequenceToken = ptr.String(jtv) + } + + case "rejectedEntityInfo": + if err := awsAwsjson11_deserializeDocumentRejectedEntityInfo(&sv.RejectedEntityInfo, value); err != nil { + return err + } + + case "rejectedLogEventsInfo": + if err := awsAwsjson11_deserializeDocumentRejectedLogEventsInfo(&sv.RejectedLogEventsInfo, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentPutQueryDefinitionOutput(v **PutQueryDefinitionOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *PutQueryDefinitionOutput + if *v == nil { + sv = &PutQueryDefinitionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "queryDefinitionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected QueryId to be of type string, got %T instead", value) + } + sv.QueryDefinitionId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentPutResourcePolicyOutput(v **PutResourcePolicyOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *PutResourcePolicyOutput + if *v == nil { + sv = &PutResourcePolicyOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "resourcePolicy": + if err := awsAwsjson11_deserializeDocumentResourcePolicy(&sv.ResourcePolicy, value); err != nil { + return err + } + + case "revisionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExpectedRevisionId to be of type string, got %T instead", value) + } + sv.RevisionId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentStartQueryOutput(v **StartQueryOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *StartQueryOutput + if *v == nil { + sv = &StartQueryOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "queryId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected QueryId to be of type string, got %T instead", value) + } + sv.QueryId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentStopQueryOutput(v **StopQueryOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *StopQueryOutput + if *v == nil { + sv = &StopQueryOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "success": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Success to be of type *bool, got %T instead", value) + } + sv.Success = jtv + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentTestMetricFilterOutput(v **TestMetricFilterOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *TestMetricFilterOutput + if *v == nil { + sv = &TestMetricFilterOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "matches": + if err := awsAwsjson11_deserializeDocumentMetricFilterMatches(&sv.Matches, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentTestTransformerOutput(v **TestTransformerOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *TestTransformerOutput + if *v == nil { + sv = &TestTransformerOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "transformedLogs": + if err := awsAwsjson11_deserializeDocumentTransformedLogs(&sv.TransformedLogs, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentUpdateDeliveryConfigurationOutput(v **UpdateDeliveryConfigurationOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateDeliveryConfigurationOutput + if *v == nil { + sv = &UpdateDeliveryConfigurationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentUpdateLookupTableOutput(v **UpdateLookupTableOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateLookupTableOutput + if *v == nil { + sv = &UpdateLookupTableOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "lastUpdatedTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.LastUpdatedTime = ptr.Int64(i64) + } + + case "lookupTableArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.LookupTableArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentUpdateScheduledQueryOutput(v **UpdateScheduledQueryOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateScheduledQueryOutput + if *v == nil { + sv = &UpdateScheduledQueryOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "creationTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.CreationTime = ptr.Int64(i64) + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ScheduledQueryDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "destinationConfiguration": + if err := awsAwsjson11_deserializeDocumentDestinationConfiguration(&sv.DestinationConfiguration, value); err != nil { + return err + } + + case "executionRoleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value) + } + sv.ExecutionRoleArn = ptr.String(jtv) + } + + case "lastExecutionStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExecutionStatus to be of type string, got %T instead", value) + } + sv.LastExecutionStatus = types.ExecutionStatus(jtv) + } + + case "lastTriggeredTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.LastTriggeredTime = ptr.Int64(i64) + } + + case "lastUpdatedTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.LastUpdatedTime = ptr.Int64(i64) + } + + case "logGroupIdentifiers": + if err := awsAwsjson11_deserializeDocumentScheduledQueryLogGroupIdentifiers(&sv.LogGroupIdentifiers, value); err != nil { + return err + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ScheduledQueryName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "queryLanguage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected QueryLanguage to be of type string, got %T instead", value) + } + sv.QueryLanguage = types.QueryLanguage(jtv) + } + + case "queryString": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected QueryString to be of type string, got %T instead", value) + } + sv.QueryString = ptr.String(jtv) + } + + case "scheduledQueryArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.ScheduledQueryArn = ptr.String(jtv) + } + + case "scheduleEndTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ScheduleEndTime = ptr.Int64(i64) + } + + case "scheduleExpression": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ScheduleExpression to be of type string, got %T instead", value) + } + sv.ScheduleExpression = ptr.String(jtv) + } + + case "scheduleStartTime": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Timestamp to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ScheduleStartTime = ptr.Int64(i64) + } + + case "startTimeOffset": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected StartTimeOffset to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.StartTimeOffset = ptr.Int64(i64) + } + + case "state": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ScheduledQueryState to be of type string, got %T instead", value) + } + sv.State = types.ScheduledQueryState(jtv) + } + + case "timezone": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ScheduleTimezone to be of type string, got %T instead", value) + } + sv.Timezone = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type protocolErrorInfo struct { + Type string `json:"__type"` + Message string + Code any // nonstandard for awsjson but some services do present the type here +} + +func getProtocolErrorInfo(decoder *json.Decoder) (protocolErrorInfo, error) { + var errInfo protocolErrorInfo + if err := decoder.Decode(&errInfo); err != nil { + if err == io.EOF { + return errInfo, nil + } + return errInfo, err + } + + return errInfo, nil +} + +func resolveProtocolErrorType(headerType string, bodyInfo protocolErrorInfo) (string, bool) { + if len(headerType) != 0 { + return headerType, true + } else if len(bodyInfo.Type) != 0 { + return bodyInfo.Type, true + } else if code, ok := bodyInfo.Code.(string); ok && len(code) != 0 { + return code, true + } + return "", false +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/doc.go new file mode 100644 index 00000000000..a74e5e1eade --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/doc.go @@ -0,0 +1,35 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +// Package cloudwatchlogs provides the API client, operations, and parameter types +// for Amazon CloudWatch Logs. +// +// You can use Amazon CloudWatch Logs to monitor, store, and access your log files +// from EC2 instances, CloudTrail, and other sources. You can then retrieve the +// associated log data from CloudWatch Logs using the CloudWatch console. +// Alternatively, you can use CloudWatch Logs commands in the Amazon Web Services +// CLI, CloudWatch Logs API, or CloudWatch Logs SDK. +// +// You can use CloudWatch Logs to: +// +// - Monitor logs from EC2 instances in real time: You can use CloudWatch Logs +// to monitor applications and systems using log data. For example, CloudWatch Logs +// can track the number of errors that occur in your application logs. Then, it can +// send you a notification whenever the rate of errors exceeds a threshold that you +// specify. CloudWatch Logs uses your log data for monitoring so no code changes +// are required. For example, you can monitor application logs for specific literal +// terms (such as "NullReferenceException"). You can also count the number of +// occurrences of a literal term at a particular position in log data (such as +// "404" status codes in an Apache access log). When the term you are searching for +// is found, CloudWatch Logs reports the data to a CloudWatch metric that you +// specify. +// +// - Monitor CloudTrail logged events: You can create alarms in CloudWatch and +// receive notifications of particular API activity as captured by CloudTrail. You +// can use the notification to perform troubleshooting. +// +// - Archive log data: You can use CloudWatch Logs to store your log data in +// highly durable storage. You can change the log retention setting so that any log +// events earlier than this setting are automatically deleted. The CloudWatch Logs +// agent helps to quickly send both rotated and non-rotated log data off of a host +// and into the log service. You can then access the raw log data when you need it. +package cloudwatchlogs diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/endpoints.go new file mode 100644 index 00000000000..4e3861bbd98 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/endpoints.go @@ -0,0 +1,578 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" + "github.com/aws/aws-sdk-go-v2/internal/endpoints" + "github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn" + internalendpoints "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/internal/endpoints" + smithyauth "github.com/aws/smithy-go/auth" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/endpoints/private/rulesfn" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/ptr" + "github.com/aws/smithy-go/tracing" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net/http" + "net/url" + "os" + "strings" +) + +// EndpointResolverOptions is the service endpoint resolver options +type EndpointResolverOptions = internalendpoints.Options + +// EndpointResolver interface for resolving service endpoints. +type EndpointResolver interface { + ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error) +} + +var _ EndpointResolver = &internalendpoints.Resolver{} + +// NewDefaultEndpointResolver constructs a new service endpoint resolver +func NewDefaultEndpointResolver() *internalendpoints.Resolver { + return internalendpoints.New() +} + +// EndpointResolverFunc is a helper utility that wraps a function so it satisfies +// the EndpointResolver interface. This is useful when you want to add additional +// endpoint resolving logic, or stub out specific endpoints with custom values. +type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error) + +func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { + return fn(region, options) +} + +// 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, +) { + if !awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.Resolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + eo := m.Options + eo.Logger = middleware.GetLogger(ctx) + + var endpoint aws.Endpoint + endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo) + if err != nil { + nf := (&aws.EndpointNotFoundError{}) + if errors.As(err, &nf) { + ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, false) + return next.HandleSerialize(ctx, in) + } + 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 = "logs" + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + } + ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source) + ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable) + ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion) + ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID) + return next.HandleSerialize(ctx, in) +} +func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error { + return stack.Serialize.Insert(&ResolveEndpoint{ + Resolver: o.EndpointResolver, + Options: o.EndpointOptions, + }, "OperationSerializer", middleware.Before) +} + +func removeResolveEndpointMiddleware(stack *middleware.Stack) error { + _, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID()) + return err +} + +type wrappedEndpointResolver struct { + awsResolver aws.EndpointResolverWithOptions +} + +func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { + return w.awsResolver.ResolveEndpoint(ServiceID, region, options) +} + +type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error) + +func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, options ...interface{}) (aws.Endpoint, error) { + return a(service, region) +} + +var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil) + +// withEndpointResolver returns an aws.EndpointResolverWithOptions that first delegates endpoint resolution to the awsResolver. +// If awsResolver returns aws.EndpointNotFoundError error, the v1 resolver middleware will swallow the error, +// and set an appropriate context flag such that fallback will occur when EndpointResolverV2 is invoked +// via its middleware. +// +// If another error (besides aws.EndpointNotFoundError) is returned, then that error will be propagated. +func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions) EndpointResolver { + var resolver aws.EndpointResolverWithOptions + + if awsResolverWithOptions != nil { + resolver = awsResolverWithOptions + } else if awsResolver != nil { + resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint) + } + + return &wrappedEndpointResolver{ + awsResolver: resolver, + } +} + +func finalizeClientEndpointResolverOptions(options *Options) { + options.EndpointOptions.LogDeprecated = options.ClientLogMode.IsDeprecatedUsage() + + if len(options.EndpointOptions.ResolvedRegion) == 0 { + const fipsInfix = "-fips-" + const fipsPrefix = "fips-" + const fipsSuffix = "-fips" + + if strings.Contains(options.Region, fipsInfix) || + strings.Contains(options.Region, fipsPrefix) || + strings.Contains(options.Region, fipsSuffix) { + options.EndpointOptions.ResolvedRegion = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll( + options.Region, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "") + options.EndpointOptions.UseFIPSEndpoint = aws.FIPSEndpointStateEnabled + } + } + +} + +func resolveEndpointResolverV2(options *Options) { + if options.EndpointResolverV2 == nil { + options.EndpointResolverV2 = NewDefaultEndpointResolverV2() + } +} + +func resolveBaseEndpoint(cfg aws.Config, o *Options) { + if cfg.BaseEndpoint != nil { + o.BaseEndpoint = cfg.BaseEndpoint + } + + _, g := os.LookupEnv("AWS_ENDPOINT_URL") + _, s := os.LookupEnv("AWS_ENDPOINT_URL_CLOUDWATCH_LOGS") + + if g && !s { + return + } + + value, found, err := internalConfig.ResolveServiceBaseEndpoint(context.Background(), "CloudWatch Logs", cfg.ConfigSources) + if found && err == nil { + o.BaseEndpoint = &value + } +} + +func bindRegion(region string) (*string, error) { + if region == "" { + return nil, nil + } + if !rulesfn.IsValidHostLabel(region, true) { + return nil, fmt.Errorf("invalid input region %s", region) + } + + return aws.String(endpoints.MapFIPSRegion(region)), nil +} + +// EndpointParameters provides the parameters that influence how endpoints are +// resolved. +type EndpointParameters struct { + // The AWS region used to dispatch the request. + // + // Parameter is + // required. + // + // AWS::Region + Region *string + + // When true, use the dual-stack endpoint. If the configured endpoint does not + // support dual-stack, dispatching the request MAY return an error. + // + // Defaults to + // false if no value is provided. + // + // AWS::UseDualStack + UseDualStack *bool + + // When true, send this request to the FIPS-compliant regional endpoint. If the + // configured endpoint does not have a FIPS compliant endpoint, dispatching the + // request will return an error. + // + // Defaults to false if no value is + // provided. + // + // AWS::UseFIPS + UseFIPS *bool + + // Override the endpoint used to send this request + // + // Parameter is + // required. + // + // SDK::Endpoint + Endpoint *string +} + +// ValidateRequired validates required parameters are set. +func (p EndpointParameters) ValidateRequired() error { + if p.UseDualStack == nil { + return fmt.Errorf("parameter UseDualStack is required") + } + + if p.UseFIPS == nil { + return fmt.Errorf("parameter UseFIPS is required") + } + + return nil +} + +// WithDefaults returns a shallow copy of EndpointParameterswith default values +// applied to members where applicable. +func (p EndpointParameters) WithDefaults() EndpointParameters { + if p.UseDualStack == nil { + p.UseDualStack = ptr.Bool(false) + } + + if p.UseFIPS == nil { + p.UseFIPS = ptr.Bool(false) + } + return p +} + +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + +// EndpointResolverV2 provides the interface for resolving service endpoints. +type EndpointResolverV2 interface { + // ResolveEndpoint attempts to resolve the endpoint with the provided options, + // returning the endpoint if found. Otherwise an error is returned. + ResolveEndpoint(ctx context.Context, params EndpointParameters) ( + smithyendpoints.Endpoint, error, + ) +} + +// resolver provides the implementation for resolving endpoints. +type resolver struct{} + +func NewDefaultEndpointResolverV2() EndpointResolverV2 { + return &resolver{} +} + +// ResolveEndpoint attempts to resolve the endpoint with the provided options, +// returning the endpoint if found. Otherwise an error is returned. +func (r *resolver) ResolveEndpoint( + ctx context.Context, params EndpointParameters, +) ( + endpoint smithyendpoints.Endpoint, err error, +) { + params = params.WithDefaults() + if err = params.ValidateRequired(); err != nil { + return endpoint, fmt.Errorf("endpoint parameters are not valid, %w", err) + } + _UseDualStack := *params.UseDualStack + _ = _UseDualStack + _UseFIPS := *params.UseFIPS + _ = _UseFIPS + + if exprVal := params.Endpoint; exprVal != nil { + _Endpoint := *exprVal + _ = _Endpoint + if _UseFIPS == true { + return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: FIPS and custom endpoint are not supported") + } + if _UseDualStack == true { + return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Dualstack and custom endpoint are not supported") + } + uriString := _Endpoint + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + } + if exprVal := params.Region; exprVal != nil { + _Region := *exprVal + _ = _Region + if exprVal := awsrulesfn.GetPartition(_Region); exprVal != nil { + _PartitionResult := *exprVal + _ = _PartitionResult + if _UseFIPS == true { + if _UseDualStack == true { + if true == _PartitionResult.SupportsFIPS { + if true == _PartitionResult.SupportsDualStack { + uriString := func() string { + var out strings.Builder + out.WriteString("https://logs-fips.") + out.WriteString(_Region) + out.WriteString(".") + out.WriteString(_PartitionResult.DualStackDnsSuffix) + return out.String() + }() + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + } + } + return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS and DualStack are enabled, but this partition does not support one or both") + } + } + if _UseFIPS == true { + if _PartitionResult.SupportsFIPS == true { + if _Region == "us-gov-east-1" { + uriString := "https://logs.us-gov-east-1.amazonaws.com" + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + } + if _Region == "us-gov-west-1" { + uriString := "https://logs.us-gov-west-1.amazonaws.com" + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + } + uriString := func() string { + var out strings.Builder + out.WriteString("https://logs-fips.") + out.WriteString(_Region) + out.WriteString(".") + out.WriteString(_PartitionResult.DnsSuffix) + return out.String() + }() + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + } + return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS is enabled but this partition does not support FIPS") + } + if _UseDualStack == true { + if true == _PartitionResult.SupportsDualStack { + uriString := func() string { + var out strings.Builder + out.WriteString("https://logs.") + out.WriteString(_Region) + out.WriteString(".") + out.WriteString(_PartitionResult.DualStackDnsSuffix) + return out.String() + }() + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + } + return endpoint, fmt.Errorf("endpoint rule error, %s", "DualStack is enabled but this partition does not support DualStack") + } + uriString := func() string { + var out strings.Builder + out.WriteString("https://logs.") + out.WriteString(_Region) + out.WriteString(".") + out.WriteString(_PartitionResult.DnsSuffix) + return out.String() + }() + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + } + return endpoint, fmt.Errorf("Endpoint resolution failed. Invalid operation or environment input.") + } + return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Missing Region") +} + +type endpointParamsBinder interface { + bindEndpointParams(*EndpointParameters) +} + +func bindEndpointParams(ctx context.Context, input interface{}, options Options) (*EndpointParameters, error) { + params := &EndpointParameters{} + + region, err := bindRegion(options.Region) + if err != nil { + return nil, err + } + params.Region = region + + params.UseDualStack = aws.Bool(options.EndpointOptions.UseDualStackEndpoint == aws.DualStackEndpointStateEnabled) + params.UseFIPS = aws.Bool(options.EndpointOptions.UseFIPSEndpoint == aws.FIPSEndpointStateEnabled) + params.Endpoint = options.BaseEndpoint + + if b, ok := input.(endpointParamsBinder); ok { + b.bindEndpointParams(params) + } + + return params, nil +} + +type resolveEndpointV2Middleware struct { + options Options +} + +func (*resolveEndpointV2Middleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "ResolveEndpoint") + defer span.End() + + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.options.EndpointResolverV2 == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params, err := bindEndpointParams(ctx, getOperationInput(ctx), m.options) + if err != nil { + return out, metadata, fmt.Errorf("failed to bind endpoint params, %w", err) + } + endpt, err := timeOperationMetric(ctx, "client.call.resolve_endpoint_duration", + func() (smithyendpoints.Endpoint, error) { + return m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params) + }) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + span.SetProperty("client.call.resolved_endpoint", endpt.URI.String()) + + if endpt.URI.RawPath == "" && req.URL.RawPath != "" { + endpt.URI.RawPath = endpt.URI.Path + } + req.URL.Scheme = endpt.URI.Scheme + req.URL.Host = endpt.URI.Host + req.URL.Path = smithyhttp.JoinPath(endpt.URI.Path, req.URL.Path) + req.URL.RawPath = smithyhttp.JoinPath(endpt.URI.RawPath, req.URL.RawPath) + for k := range endpt.Headers { + req.Header.Set(k, endpt.Headers.Get(k)) + } + + rscheme := getResolvedAuthScheme(ctx) + if rscheme == nil { + return out, metadata, fmt.Errorf("no resolved auth scheme") + } + + opts, _ := smithyauth.GetAuthOptions(&endpt.Properties) + for _, o := range opts { + rscheme.SignerProperties.SetAll(&o.SignerProperties) + } + + span.End() + return next.HandleFinalize(ctx, in) +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/eventstream.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/eventstream.go new file mode 100644 index 00000000000..66b4729631f --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/eventstream.go @@ -0,0 +1,628 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream" + "github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/eventstreamapi" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/middleware" + smithysync "github.com/aws/smithy-go/sync" + smithyhttp "github.com/aws/smithy-go/transport/http" + "io" + "io/ioutil" + "sync" +) + +// GetLogObjectResponseStreamReader provides the interface for reading events from +// a stream. +// +// The writer's Close method must allow multiple concurrent calls. +type GetLogObjectResponseStreamReader interface { + Events() <-chan types.GetLogObjectResponseStream + Close() error + Err() error +} + +// StartLiveTailResponseStreamReader provides the interface for reading events +// from a stream. +// +// The writer's Close method must allow multiple concurrent calls. +type StartLiveTailResponseStreamReader interface { + Events() <-chan types.StartLiveTailResponseStream + Close() error + Err() error +} + +type startLiveTailResponseStreamReadEvent interface { + isStartLiveTailResponseStreamReadEvent() +} + +type startLiveTailResponseStreamReadEventMessage struct { + Value types.StartLiveTailResponseStream +} + +func (*startLiveTailResponseStreamReadEventMessage) isStartLiveTailResponseStreamReadEvent() {} + +type startLiveTailResponseStreamReadEventInitialResponse struct { + Value interface{} +} + +func (*startLiveTailResponseStreamReadEventInitialResponse) isStartLiveTailResponseStreamReadEvent() { +} + +type startLiveTailResponseStreamReader struct { + stream chan types.StartLiveTailResponseStream + decoder *eventstream.Decoder + eventStream io.ReadCloser + err *smithysync.OnceErr + payloadBuf []byte + done chan struct{} + closeOnce sync.Once + initialResponseDeserializer func(*eventstream.Message) (interface{}, error) + initialResponse chan interface{} +} + +func newStartLiveTailResponseStreamReader(readCloser io.ReadCloser, decoder *eventstream.Decoder, ird func(*eventstream.Message) (interface{}, error)) *startLiveTailResponseStreamReader { + w := &startLiveTailResponseStreamReader{ + stream: make(chan types.StartLiveTailResponseStream), + decoder: decoder, + eventStream: readCloser, + err: smithysync.NewOnceErr(), + done: make(chan struct{}), + payloadBuf: make([]byte, 10*1024), + initialResponseDeserializer: ird, + initialResponse: make(chan interface{}, 1), + } + + go w.readEventStream() + + return w +} + +func (r *startLiveTailResponseStreamReader) Events() <-chan types.StartLiveTailResponseStream { + return r.stream +} + +func (r *startLiveTailResponseStreamReader) readEventStream() { + defer r.Close() + defer close(r.stream) + + defer close(r.initialResponse) + + for { + r.payloadBuf = r.payloadBuf[0:0] + decodedMessage, err := r.decoder.Decode(r.eventStream, r.payloadBuf) + if err != nil { + if err == io.EOF { + return + } + select { + case <-r.done: + return + default: + r.err.SetError(err) + return + } + } + + event, err := r.deserializeEventMessage(&decodedMessage) + if err != nil { + r.err.SetError(err) + return + } + + switch ev := event.(type) { + case *startLiveTailResponseStreamReadEventInitialResponse: + select { + case r.initialResponse <- ev.Value: + case <-r.done: + return + default: + } + case *startLiveTailResponseStreamReadEventMessage: + select { + case r.stream <- ev.Value: + case <-r.done: + return + } + default: + r.err.SetError(fmt.Errorf("unexpected event wrapper: %T", event)) + return + } + + } +} + +func (r *startLiveTailResponseStreamReader) deserializeEventMessage(msg *eventstream.Message) (startLiveTailResponseStreamReadEvent, error) { + messageType := msg.Headers.Get(eventstreamapi.MessageTypeHeader) + if messageType == nil { + return nil, fmt.Errorf("%s event header not present", eventstreamapi.MessageTypeHeader) + } + + switch messageType.String() { + case eventstreamapi.EventMessageType: + eventType := msg.Headers.Get(eventstreamapi.EventTypeHeader) + if eventType == nil { + return nil, fmt.Errorf("%s event header not present", eventstreamapi.EventTypeHeader) + } + + if eventType.String() == "initial-response" { + v, err := r.initialResponseDeserializer(msg) + if err != nil { + return nil, err + } + return &startLiveTailResponseStreamReadEventInitialResponse{Value: v}, nil + } + + var v types.StartLiveTailResponseStream + if err := awsAwsjson11_deserializeEventStreamStartLiveTailResponseStream(&v, msg); err != nil { + return nil, err + } + return &startLiveTailResponseStreamReadEventMessage{Value: v}, nil + + case eventstreamapi.ExceptionMessageType: + return nil, awsAwsjson11_deserializeEventStreamExceptionStartLiveTailResponseStream(msg) + + case eventstreamapi.ErrorMessageType: + errorCode := "UnknownError" + errorMessage := errorCode + if header := msg.Headers.Get(eventstreamapi.ErrorCodeHeader); header != nil { + errorCode = header.String() + } + if header := msg.Headers.Get(eventstreamapi.ErrorMessageHeader); header != nil { + errorMessage = header.String() + } + return nil, &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + + default: + mc := msg.Clone() + return nil, &UnknownEventMessageError{ + Type: messageType.String(), + Message: &mc, + } + + } +} + +func (r *startLiveTailResponseStreamReader) ErrorSet() <-chan struct{} { + return r.err.ErrorSet() +} + +func (r *startLiveTailResponseStreamReader) Close() error { + r.closeOnce.Do(r.safeClose) + return r.Err() +} + +func (r *startLiveTailResponseStreamReader) safeClose() { + close(r.done) + r.eventStream.Close() + +} + +func (r *startLiveTailResponseStreamReader) Err() error { + return r.err.Err() +} + +func (r *startLiveTailResponseStreamReader) Closed() <-chan struct{} { + return r.done +} + +type getLogObjectResponseStreamReadEvent interface { + isGetLogObjectResponseStreamReadEvent() +} + +type getLogObjectResponseStreamReadEventMessage struct { + Value types.GetLogObjectResponseStream +} + +func (*getLogObjectResponseStreamReadEventMessage) isGetLogObjectResponseStreamReadEvent() {} + +type getLogObjectResponseStreamReadEventInitialResponse struct { + Value interface{} +} + +func (*getLogObjectResponseStreamReadEventInitialResponse) isGetLogObjectResponseStreamReadEvent() {} + +type getLogObjectResponseStreamReader struct { + stream chan types.GetLogObjectResponseStream + decoder *eventstream.Decoder + eventStream io.ReadCloser + err *smithysync.OnceErr + payloadBuf []byte + done chan struct{} + closeOnce sync.Once + initialResponseDeserializer func(*eventstream.Message) (interface{}, error) + initialResponse chan interface{} +} + +func newGetLogObjectResponseStreamReader(readCloser io.ReadCloser, decoder *eventstream.Decoder, ird func(*eventstream.Message) (interface{}, error)) *getLogObjectResponseStreamReader { + w := &getLogObjectResponseStreamReader{ + stream: make(chan types.GetLogObjectResponseStream), + decoder: decoder, + eventStream: readCloser, + err: smithysync.NewOnceErr(), + done: make(chan struct{}), + payloadBuf: make([]byte, 10*1024), + initialResponseDeserializer: ird, + initialResponse: make(chan interface{}, 1), + } + + go w.readEventStream() + + return w +} + +func (r *getLogObjectResponseStreamReader) Events() <-chan types.GetLogObjectResponseStream { + return r.stream +} + +func (r *getLogObjectResponseStreamReader) readEventStream() { + defer r.Close() + defer close(r.stream) + + defer close(r.initialResponse) + + for { + r.payloadBuf = r.payloadBuf[0:0] + decodedMessage, err := r.decoder.Decode(r.eventStream, r.payloadBuf) + if err != nil { + if err == io.EOF { + return + } + select { + case <-r.done: + return + default: + r.err.SetError(err) + return + } + } + + event, err := r.deserializeEventMessage(&decodedMessage) + if err != nil { + r.err.SetError(err) + return + } + + switch ev := event.(type) { + case *getLogObjectResponseStreamReadEventInitialResponse: + select { + case r.initialResponse <- ev.Value: + case <-r.done: + return + default: + } + case *getLogObjectResponseStreamReadEventMessage: + select { + case r.stream <- ev.Value: + case <-r.done: + return + } + default: + r.err.SetError(fmt.Errorf("unexpected event wrapper: %T", event)) + return + } + + } +} + +func (r *getLogObjectResponseStreamReader) deserializeEventMessage(msg *eventstream.Message) (getLogObjectResponseStreamReadEvent, error) { + messageType := msg.Headers.Get(eventstreamapi.MessageTypeHeader) + if messageType == nil { + return nil, fmt.Errorf("%s event header not present", eventstreamapi.MessageTypeHeader) + } + + switch messageType.String() { + case eventstreamapi.EventMessageType: + eventType := msg.Headers.Get(eventstreamapi.EventTypeHeader) + if eventType == nil { + return nil, fmt.Errorf("%s event header not present", eventstreamapi.EventTypeHeader) + } + + if eventType.String() == "initial-response" { + v, err := r.initialResponseDeserializer(msg) + if err != nil { + return nil, err + } + return &getLogObjectResponseStreamReadEventInitialResponse{Value: v}, nil + } + + var v types.GetLogObjectResponseStream + if err := awsAwsjson11_deserializeEventStreamGetLogObjectResponseStream(&v, msg); err != nil { + return nil, err + } + return &getLogObjectResponseStreamReadEventMessage{Value: v}, nil + + case eventstreamapi.ExceptionMessageType: + return nil, awsAwsjson11_deserializeEventStreamExceptionGetLogObjectResponseStream(msg) + + case eventstreamapi.ErrorMessageType: + errorCode := "UnknownError" + errorMessage := errorCode + if header := msg.Headers.Get(eventstreamapi.ErrorCodeHeader); header != nil { + errorCode = header.String() + } + if header := msg.Headers.Get(eventstreamapi.ErrorMessageHeader); header != nil { + errorMessage = header.String() + } + return nil, &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + + default: + mc := msg.Clone() + return nil, &UnknownEventMessageError{ + Type: messageType.String(), + Message: &mc, + } + + } +} + +func (r *getLogObjectResponseStreamReader) ErrorSet() <-chan struct{} { + return r.err.ErrorSet() +} + +func (r *getLogObjectResponseStreamReader) Close() error { + r.closeOnce.Do(r.safeClose) + return r.Err() +} + +func (r *getLogObjectResponseStreamReader) safeClose() { + close(r.done) + r.eventStream.Close() + +} + +func (r *getLogObjectResponseStreamReader) Err() error { + return r.err.Err() +} + +func (r *getLogObjectResponseStreamReader) Closed() <-chan struct{} { + return r.done +} + +type awsAwsjson11_deserializeOpEventStreamGetLogObject struct { + LogEventStreamWrites bool + LogEventStreamReads bool +} + +func (*awsAwsjson11_deserializeOpEventStreamGetLogObject) ID() string { + return "OperationEventStreamDeserializer" +} + +func (m *awsAwsjson11_deserializeOpEventStreamGetLogObject) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + defer func() { + if err == nil { + return + } + m.closeResponseBody(out) + }() + + logger := middleware.GetLogger(ctx) + + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type: %T", in.Request) + } + _ = request + + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + deserializeOutput, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type: %T", out.RawResponse) + } + _ = deserializeOutput + + output, ok := out.Result.(*GetLogObjectOutput) + if out.Result != nil && !ok { + return out, metadata, fmt.Errorf("unexpected output result type: %T", out.Result) + } else if out.Result == nil { + output = &GetLogObjectOutput{} + out.Result = output + } + + eventReader := newGetLogObjectResponseStreamReader( + deserializeOutput.Body, + eventstream.NewDecoder(func(options *eventstream.DecoderOptions) { + options.Logger = logger + options.LogMessages = m.LogEventStreamReads + + }), + awsAwsjson11_deserializeEventMessageResponseGetLogObjectOutput, + ) + defer func() { + if err == nil { + return + } + _ = eventReader.Close() + }() + + ir := <-eventReader.initialResponse + irv, ok := ir.(*GetLogObjectOutput) + if !ok { + return out, metadata, fmt.Errorf("unexpected output result type: %T", ir) + } + *output = *irv + + output.eventStream = NewGetLogObjectEventStream(func(stream *GetLogObjectEventStream) { + stream.Reader = eventReader + }) + + go output.eventStream.waitStreamClose() + + return out, metadata, nil +} + +func (*awsAwsjson11_deserializeOpEventStreamGetLogObject) closeResponseBody(out middleware.DeserializeOutput) { + if resp, ok := out.RawResponse.(*smithyhttp.Response); ok && resp != nil && resp.Body != nil { + _, _ = io.Copy(ioutil.Discard, resp.Body) + _ = resp.Body.Close() + } +} + +func addEventStreamGetLogObjectMiddleware(stack *middleware.Stack, options Options) error { + if err := stack.Deserialize.Insert(&awsAwsjson11_deserializeOpEventStreamGetLogObject{ + LogEventStreamWrites: options.ClientLogMode.IsRequestEventMessage(), + LogEventStreamReads: options.ClientLogMode.IsResponseEventMessage(), + }, "OperationDeserializer", middleware.Before); err != nil { + return err + } + return nil + +} + +type awsAwsjson11_deserializeOpEventStreamStartLiveTail struct { + LogEventStreamWrites bool + LogEventStreamReads bool +} + +func (*awsAwsjson11_deserializeOpEventStreamStartLiveTail) ID() string { + return "OperationEventStreamDeserializer" +} + +func (m *awsAwsjson11_deserializeOpEventStreamStartLiveTail) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + defer func() { + if err == nil { + return + } + m.closeResponseBody(out) + }() + + logger := middleware.GetLogger(ctx) + + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type: %T", in.Request) + } + _ = request + + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + deserializeOutput, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type: %T", out.RawResponse) + } + _ = deserializeOutput + + output, ok := out.Result.(*StartLiveTailOutput) + if out.Result != nil && !ok { + return out, metadata, fmt.Errorf("unexpected output result type: %T", out.Result) + } else if out.Result == nil { + output = &StartLiveTailOutput{} + out.Result = output + } + + eventReader := newStartLiveTailResponseStreamReader( + deserializeOutput.Body, + eventstream.NewDecoder(func(options *eventstream.DecoderOptions) { + options.Logger = logger + options.LogMessages = m.LogEventStreamReads + + }), + awsAwsjson11_deserializeEventMessageResponseStartLiveTailOutput, + ) + defer func() { + if err == nil { + return + } + _ = eventReader.Close() + }() + + ir := <-eventReader.initialResponse + irv, ok := ir.(*StartLiveTailOutput) + if !ok { + return out, metadata, fmt.Errorf("unexpected output result type: %T", ir) + } + *output = *irv + + output.eventStream = NewStartLiveTailEventStream(func(stream *StartLiveTailEventStream) { + stream.Reader = eventReader + }) + + go output.eventStream.waitStreamClose() + + return out, metadata, nil +} + +func (*awsAwsjson11_deserializeOpEventStreamStartLiveTail) closeResponseBody(out middleware.DeserializeOutput) { + if resp, ok := out.RawResponse.(*smithyhttp.Response); ok && resp != nil && resp.Body != nil { + _, _ = io.Copy(ioutil.Discard, resp.Body) + _ = resp.Body.Close() + } +} + +func addEventStreamStartLiveTailMiddleware(stack *middleware.Stack, options Options) error { + if err := stack.Deserialize.Insert(&awsAwsjson11_deserializeOpEventStreamStartLiveTail{ + LogEventStreamWrites: options.ClientLogMode.IsRequestEventMessage(), + LogEventStreamReads: options.ClientLogMode.IsResponseEventMessage(), + }, "OperationDeserializer", middleware.Before); err != nil { + return err + } + return nil + +} + +// UnknownEventMessageError provides an error when a message is received from the stream, +// but the reader is unable to determine what kind of message it is. +type UnknownEventMessageError struct { + Type string + Message *eventstream.Message +} + +// Error retruns the error message string. +func (e *UnknownEventMessageError) Error() string { + return "unknown event stream message type, " + e.Type +} + +func setSafeEventStreamClientLogMode(o *Options, operation string) { + switch operation { + case "GetLogObject": + toggleEventStreamClientLogMode(o, false, true) + return + + case "StartLiveTail": + toggleEventStreamClientLogMode(o, false, true) + return + + default: + return + + } +} +func toggleEventStreamClientLogMode(o *Options, request, response bool) { + mode := o.ClientLogMode + + if request && mode.IsRequestWithBody() { + mode.ClearRequestWithBody() + mode |= aws.LogRequest + } + + if response && mode.IsResponseWithBody() { + mode.ClearResponseWithBody() + mode |= aws.LogResponse + } + + o.ClientLogMode = mode + +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/generated.json new file mode 100644 index 00000000000..3a5eb69b67d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/generated.json @@ -0,0 +1,148 @@ +{ + "dependencies": { + "github.com/aws/aws-sdk-go-v2": "v1.4.0", + "github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream": "v0.0.0-00010101000000-000000000000", + "github.com/aws/aws-sdk-go-v2/internal/configsources": "v0.0.0-00010101000000-000000000000", + "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2": "v2.0.0-00010101000000-000000000000", + "github.com/aws/smithy-go": "v1.4.0" + }, + "files": [ + "api_client.go", + "api_client_test.go", + "api_op_AssociateKmsKey.go", + "api_op_AssociateSourceToS3TableIntegration.go", + "api_op_CancelExportTask.go", + "api_op_CancelImportTask.go", + "api_op_CreateDelivery.go", + "api_op_CreateExportTask.go", + "api_op_CreateImportTask.go", + "api_op_CreateLogAnomalyDetector.go", + "api_op_CreateLogGroup.go", + "api_op_CreateLogStream.go", + "api_op_CreateLookupTable.go", + "api_op_CreateScheduledQuery.go", + "api_op_DeleteAccountPolicy.go", + "api_op_DeleteDataProtectionPolicy.go", + "api_op_DeleteDelivery.go", + "api_op_DeleteDeliveryDestination.go", + "api_op_DeleteDeliveryDestinationPolicy.go", + "api_op_DeleteDeliverySource.go", + "api_op_DeleteDestination.go", + "api_op_DeleteIndexPolicy.go", + "api_op_DeleteIntegration.go", + "api_op_DeleteLogAnomalyDetector.go", + "api_op_DeleteLogGroup.go", + "api_op_DeleteLogStream.go", + "api_op_DeleteLookupTable.go", + "api_op_DeleteMetricFilter.go", + "api_op_DeleteQueryDefinition.go", + "api_op_DeleteResourcePolicy.go", + "api_op_DeleteRetentionPolicy.go", + "api_op_DeleteScheduledQuery.go", + "api_op_DeleteSubscriptionFilter.go", + "api_op_DeleteTransformer.go", + "api_op_DescribeAccountPolicies.go", + "api_op_DescribeConfigurationTemplates.go", + "api_op_DescribeDeliveries.go", + "api_op_DescribeDeliveryDestinations.go", + "api_op_DescribeDeliverySources.go", + "api_op_DescribeDestinations.go", + "api_op_DescribeExportTasks.go", + "api_op_DescribeFieldIndexes.go", + "api_op_DescribeImportTaskBatches.go", + "api_op_DescribeImportTasks.go", + "api_op_DescribeIndexPolicies.go", + "api_op_DescribeLogGroups.go", + "api_op_DescribeLogStreams.go", + "api_op_DescribeLookupTables.go", + "api_op_DescribeMetricFilters.go", + "api_op_DescribeQueries.go", + "api_op_DescribeQueryDefinitions.go", + "api_op_DescribeResourcePolicies.go", + "api_op_DescribeSubscriptionFilters.go", + "api_op_DisassociateKmsKey.go", + "api_op_DisassociateSourceFromS3TableIntegration.go", + "api_op_FilterLogEvents.go", + "api_op_GetDataProtectionPolicy.go", + "api_op_GetDelivery.go", + "api_op_GetDeliveryDestination.go", + "api_op_GetDeliveryDestinationPolicy.go", + "api_op_GetDeliverySource.go", + "api_op_GetIntegration.go", + "api_op_GetLogAnomalyDetector.go", + "api_op_GetLogEvents.go", + "api_op_GetLogFields.go", + "api_op_GetLogGroupFields.go", + "api_op_GetLogObject.go", + "api_op_GetLogRecord.go", + "api_op_GetLookupTable.go", + "api_op_GetQueryResults.go", + "api_op_GetScheduledQuery.go", + "api_op_GetScheduledQueryHistory.go", + "api_op_GetTransformer.go", + "api_op_ListAggregateLogGroupSummaries.go", + "api_op_ListAnomalies.go", + "api_op_ListIntegrations.go", + "api_op_ListLogAnomalyDetectors.go", + "api_op_ListLogGroups.go", + "api_op_ListLogGroupsForQuery.go", + "api_op_ListScheduledQueries.go", + "api_op_ListSourcesForS3TableIntegration.go", + "api_op_ListTagsForResource.go", + "api_op_ListTagsLogGroup.go", + "api_op_PutAccountPolicy.go", + "api_op_PutBearerTokenAuthentication.go", + "api_op_PutDataProtectionPolicy.go", + "api_op_PutDeliveryDestination.go", + "api_op_PutDeliveryDestinationPolicy.go", + "api_op_PutDeliverySource.go", + "api_op_PutDestination.go", + "api_op_PutDestinationPolicy.go", + "api_op_PutIndexPolicy.go", + "api_op_PutIntegration.go", + "api_op_PutLogEvents.go", + "api_op_PutLogGroupDeletionProtection.go", + "api_op_PutMetricFilter.go", + "api_op_PutQueryDefinition.go", + "api_op_PutResourcePolicy.go", + "api_op_PutRetentionPolicy.go", + "api_op_PutSubscriptionFilter.go", + "api_op_PutTransformer.go", + "api_op_StartLiveTail.go", + "api_op_StartQuery.go", + "api_op_StopQuery.go", + "api_op_TagLogGroup.go", + "api_op_TagResource.go", + "api_op_TestMetricFilter.go", + "api_op_TestTransformer.go", + "api_op_UntagLogGroup.go", + "api_op_UntagResource.go", + "api_op_UpdateAnomaly.go", + "api_op_UpdateDeliveryConfiguration.go", + "api_op_UpdateLogAnomalyDetector.go", + "api_op_UpdateLookupTable.go", + "api_op_UpdateScheduledQuery.go", + "auth.go", + "deserializers.go", + "doc.go", + "endpoints.go", + "endpoints_config_test.go", + "endpoints_test.go", + "eventstream.go", + "generated.json", + "internal/endpoints/endpoints.go", + "internal/endpoints/endpoints_test.go", + "options.go", + "serializers.go", + "snapshot_test.go", + "sra_operation_order_test.go", + "types/enums.go", + "types/errors.go", + "types/types.go", + "types/types_exported_test.go", + "validators.go" + ], + "go": "1.24", + "module": "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs", + "unstable": false +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/go_module_metadata.go new file mode 100644 index 00000000000..b1f4dc4b530 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/go_module_metadata.go @@ -0,0 +1,6 @@ +// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. + +package cloudwatchlogs + +// goModuleVersion is the tagged release for this module +const goModuleVersion = "1.68.0" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/internal/endpoints/endpoints.go new file mode 100644 index 00000000000..611159cdf0e --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/internal/endpoints/endpoints.go @@ -0,0 +1,805 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package endpoints + +import ( + "github.com/aws/aws-sdk-go-v2/aws" + endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2" + "github.com/aws/smithy-go/logging" + "regexp" +) + +// Options is the endpoint resolver configuration options +type Options struct { + // Logger is a logging implementation that log events should be sent to. + Logger logging.Logger + + // LogDeprecated indicates that deprecated endpoints should be logged to the + // provided logger. + LogDeprecated bool + + // ResolvedRegion is used to override the region to be resolved, rather then the + // using the value passed to the ResolveEndpoint method. This value is used by the + // SDK to translate regions like fips-us-east-1 or us-east-1-fips to an alternative + // name. You must not set this value directly in your application. + ResolvedRegion string + + // DisableHTTPS informs the resolver to return an endpoint that does not use the + // HTTPS scheme. + DisableHTTPS bool + + // UseDualStackEndpoint specifies the resolver must resolve a dual-stack endpoint. + UseDualStackEndpoint aws.DualStackEndpointState + + // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint. + UseFIPSEndpoint aws.FIPSEndpointState +} + +func (o Options) GetResolvedRegion() string { + return o.ResolvedRegion +} + +func (o Options) GetDisableHTTPS() bool { + return o.DisableHTTPS +} + +func (o Options) GetUseDualStackEndpoint() aws.DualStackEndpointState { + return o.UseDualStackEndpoint +} + +func (o Options) GetUseFIPSEndpoint() aws.FIPSEndpointState { + return o.UseFIPSEndpoint +} + +func transformToSharedOptions(options Options) endpoints.Options { + return endpoints.Options{ + Logger: options.Logger, + LogDeprecated: options.LogDeprecated, + ResolvedRegion: options.ResolvedRegion, + DisableHTTPS: options.DisableHTTPS, + UseDualStackEndpoint: options.UseDualStackEndpoint, + UseFIPSEndpoint: options.UseFIPSEndpoint, + } +} + +// Resolver CloudWatch Logs endpoint resolver +type Resolver struct { + partitions endpoints.Partitions +} + +// ResolveEndpoint resolves the service endpoint for the given region and options +func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) { + if len(region) == 0 { + return endpoint, &aws.MissingRegionError{} + } + + opt := transformToSharedOptions(options) + return r.partitions.ResolveEndpoint(region, opt) +} + +// New returns a new Resolver +func New() *Resolver { + return &Resolver{ + partitions: defaultPartitions, + } +} + +var partitionRegexp = struct { + Aws *regexp.Regexp + AwsCn *regexp.Regexp + AwsEusc *regexp.Regexp + AwsIso *regexp.Regexp + AwsIsoB *regexp.Regexp + AwsIsoE *regexp.Regexp + AwsIsoF *regexp.Regexp + AwsUsGov *regexp.Regexp +}{ + + Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$"), + AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), + AwsEusc: regexp.MustCompile("^eusc\\-(de)\\-\\w+\\-\\d+$"), + AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), + AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), + AwsIsoE: regexp.MustCompile("^eu\\-isoe\\-\\w+\\-\\d+$"), + AwsIsoF: regexp.MustCompile("^us\\-isof\\-\\w+\\-\\d+$"), + AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"), +} + +var defaultPartitions = endpoints.Partitions{ + { + ID: "aws", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "logs.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "logs-fips.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "logs-fips.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "logs.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.Aws, + IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "af-south-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "af-south-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "logs.af-south-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "ap-east-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-east-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "logs.ap-east-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "ap-east-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-northeast-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-northeast-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "logs.ap-northeast-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "ap-northeast-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-northeast-2", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "logs.ap-northeast-2.api.aws", + }, + endpoints.EndpointKey{ + Region: "ap-northeast-3", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-northeast-3", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "logs.ap-northeast-3.api.aws", + }, + endpoints.EndpointKey{ + Region: "ap-south-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-south-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "logs.ap-south-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "ap-south-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-south-2", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "logs.ap-south-2.api.aws", + }, + endpoints.EndpointKey{ + Region: "ap-southeast-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "logs.ap-southeast-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "ap-southeast-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-2", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "logs.ap-southeast-2.api.aws", + }, + endpoints.EndpointKey{ + Region: "ap-southeast-3", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-3", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "logs.ap-southeast-3.api.aws", + }, + endpoints.EndpointKey{ + Region: "ap-southeast-4", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-4", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "logs.ap-southeast-4.api.aws", + }, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-6", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-7", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ca-central-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ca-central-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "logs-fips.ca-central-1.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "ca-central-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "logs.ca-central-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "ca-west-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ca-west-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "logs-fips.ca-west-1.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "ca-west-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "logs.ca-west-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "eu-central-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-central-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "logs.eu-central-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "eu-central-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-central-2", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "logs.eu-central-2.api.aws", + }, + endpoints.EndpointKey{ + Region: "eu-north-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-north-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "logs.eu-north-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "eu-south-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "logs.eu-south-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "logs.eu-south-2.api.aws", + }, + endpoints.EndpointKey{ + Region: "eu-west-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-west-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "logs.eu-west-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "eu-west-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-west-2", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "logs.eu-west-2.api.aws", + }, + endpoints.EndpointKey{ + Region: "eu-west-3", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-west-3", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "logs.eu-west-3.api.aws", + }, + endpoints.EndpointKey{ + Region: "fips-ca-central-1", + }: endpoints.Endpoint{ + Hostname: "logs-fips.ca-central-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "ca-central-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-ca-west-1", + }: endpoints.Endpoint{ + Hostname: "logs-fips.ca-west-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "ca-west-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-us-east-1", + }: endpoints.Endpoint{ + Hostname: "logs-fips.us-east-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-east-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-us-east-2", + }: endpoints.Endpoint{ + Hostname: "logs-fips.us-east-2.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-east-2", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-us-west-1", + }: endpoints.Endpoint{ + Hostname: "logs-fips.us-west-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-west-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-us-west-2", + }: endpoints.Endpoint{ + Hostname: "logs-fips.us-west-2.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-west-2", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "il-central-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "il-central-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "logs.il-central-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "me-central-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "me-central-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "logs.me-central-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "me-south-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "me-south-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "logs.me-south-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "mx-central-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "sa-east-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "sa-east-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "logs.sa-east-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "us-east-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-east-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "logs-fips.us-east-1.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "us-east-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "logs.us-east-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "us-east-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-east-2", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "logs-fips.us-east-2.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "us-east-2", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "logs.us-east-2.api.aws", + }, + endpoints.EndpointKey{ + Region: "us-west-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-west-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "logs-fips.us-west-1.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "us-west-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "logs.us-west-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "us-west-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-west-2", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "logs-fips.us-west-2.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "us-west-2", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "logs.us-west-2.api.aws", + }, + }, + }, + { + ID: "aws-cn", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "logs.{region}.api.amazonwebservices.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "logs-fips.{region}.amazonaws.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "logs-fips.{region}.api.amazonwebservices.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "logs.{region}.amazonaws.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsCn, + IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "cn-north-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "cn-north-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "logs.cn-north-1.api.amazonwebservices.com.cn", + }, + endpoints.EndpointKey{ + Region: "cn-northwest-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "cn-northwest-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "logs.cn-northwest-1.api.amazonwebservices.com.cn", + }, + }, + }, + { + ID: "aws-eusc", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "logs.{region}.api.amazonwebservices.eu", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "logs-fips.{region}.amazonaws.eu", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "logs-fips.{region}.api.amazonwebservices.eu", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "logs.{region}.amazonaws.eu", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsEusc, + IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "eusc-de-east-1", + }: endpoints.Endpoint{}, + }, + }, + { + ID: "aws-iso", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "logs-fips.{region}.c2s.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "logs.{region}.c2s.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIso, + IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "us-iso-east-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-iso-west-1", + }: endpoints.Endpoint{}, + }, + }, + { + ID: "aws-iso-b", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "logs-fips.{region}.sc2s.sgov.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "logs.{region}.sc2s.sgov.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIsoB, + IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "us-isob-east-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-isob-west-1", + }: endpoints.Endpoint{}, + }, + }, + { + ID: "aws-iso-e", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "logs-fips.{region}.cloud.adc-e.uk", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "logs.{region}.cloud.adc-e.uk", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIsoE, + IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "eu-isoe-west-1", + }: endpoints.Endpoint{}, + }, + }, + { + ID: "aws-iso-f", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "logs-fips.{region}.csp.hci.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "logs.{region}.csp.hci.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIsoF, + IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "us-isof-east-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-isof-south-1", + }: endpoints.Endpoint{}, + }, + }, + { + ID: "aws-us-gov", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "logs.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "logs-fips.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "logs-fips.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "logs.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsUsGov, + IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "fips-us-gov-east-1", + }: endpoints.Endpoint{ + Hostname: "logs.us-gov-east-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-gov-east-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-us-gov-west-1", + }: endpoints.Endpoint{ + Hostname: "logs.us-gov-west-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-gov-west-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "us-gov-east-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-gov-east-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "logs.us-gov-east-1.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "us-gov-east-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "logs.us-gov-east-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "us-gov-west-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-gov-west-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "logs.us-gov-west-1.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "us-gov-west-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "logs.us-gov-west-1.api.aws", + }, + }, + }, +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/options.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/options.go new file mode 100644 index 00000000000..325abe180cf --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/options.go @@ -0,0 +1,242 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy" + smithyauth "github.com/aws/smithy-go/auth" + "github.com/aws/smithy-go/logging" + "github.com/aws/smithy-go/metrics" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net/http" +) + +type HTTPClient interface { + Do(*http.Request) (*http.Response, error) +} + +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 optional application specific identifier appended to the User-Agent header. + AppID string + + // This endpoint will be given as input to an EndpointResolverV2. It is used for + // providing a custom base endpoint that is subject to modifications by the + // processing EndpointResolverV2. + BaseEndpoint *string + + // Configures the events that will be sent to the configured logger. + ClientLogMode aws.ClientLogMode + + // The credentials object to use when signing requests. + Credentials aws.CredentialsProvider + + // The configuration DefaultsMode that the SDK should use when constructing the + // clients initial default settings. + DefaultsMode aws.DefaultsMode + + // The endpoint options to be used when attempting to resolve an endpoint. + EndpointOptions EndpointResolverOptions + + // The service endpoint resolver. + // + // Deprecated: Deprecated: EndpointResolver and WithEndpointResolver. Providing a + // value for this field will likely prevent you from using any endpoint-related + // service features released after the introduction of EndpointResolverV2 and + // BaseEndpoint. + // + // To migrate an EndpointResolver implementation that uses a custom endpoint, set + // the client option BaseEndpoint instead. + EndpointResolver EndpointResolver + + // Resolves the endpoint used for a particular service operation. + EndpointResolverV2 EndpointResolverV2 + + // 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 client meter provider. + MeterProvider metrics.MeterProvider + + // The region to send requests to. (Required) + Region string + + // RetryMaxAttempts specifies the maximum number attempts an API client will call + // an operation that fails with a retryable error. A value of 0 is ignored, and + // will not be used to configure the API client created default retryer, or modify + // per operation call's retry max attempts. + // + // If specified in an operation call's functional options with a value that is + // different than the constructed client's Options, the Client's Retryer will be + // wrapped to use the operation's specific RetryMaxAttempts value. + RetryMaxAttempts int + + // RetryMode specifies the retry mode the API client will be created with, if + // Retryer option is not also specified. + // + // When creating a new API Clients this member will only be used if the Retryer + // Options member is nil. This value will be ignored if Retryer is not nil. + // + // Currently does not support per operation call overrides, may in the future. + RetryMode aws.RetryMode + + // Retryer guides how HTTP requests should be retried in case of recoverable + // failures. When nil the API client will use a default retryer. The kind of + // default retry created by the API client can be changed with the RetryMode + // option. + Retryer aws.Retryer + + // The RuntimeEnvironment configuration, only populated if the DefaultsMode is set + // to DefaultsModeAuto and is initialized using config.LoadDefaultConfig . You + // should not populate this structure programmatically, or rely on the values here + // within your applications. + RuntimeEnvironment aws.RuntimeEnvironment + + // The client tracer provider. + TracerProvider tracing.TracerProvider + + // The initial DefaultsMode used when the client options were constructed. If the + // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved + // value was at that point in time. + // + // Currently does not support per operation call overrides, may in the future. + resolvedDefaultsMode aws.DefaultsMode + + // The HTTP client to invoke API calls with. Defaults to client's default HTTP + // implementation if nil. + HTTPClient HTTPClient + + // Client registry of operation interceptors. + Interceptors smithyhttp.InterceptorRegistry + + // The auth scheme resolver which determines how to authenticate for each + // operation. + AuthSchemeResolver AuthSchemeResolver + + // The list of auth schemes supported by the client. + AuthSchemes []smithyhttp.AuthScheme + + // Priority list of preferred auth scheme names (e.g. sigv4a). + AuthSchemePreference []string +} + +// 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) + to.Interceptors = o.Interceptors.Copy() + + return to +} + +func (o Options) GetIdentityResolver(schemeID string) smithyauth.IdentityResolver { + if schemeID == "aws.auth#sigv4" { + return getSigV4IdentityResolver(o) + } + if schemeID == "smithy.api#noAuth" { + return &smithyauth.AnonymousIdentityResolver{} + } + return nil +} + +// 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...) + } +} + +// Deprecated: EndpointResolver and WithEndpointResolver. Providing a value for +// this field will likely prevent you from using any endpoint-related service +// features released after the introduction of EndpointResolverV2 and BaseEndpoint. +// +// To migrate an EndpointResolver implementation that uses a custom endpoint, set +// the client option BaseEndpoint instead. +func WithEndpointResolver(v EndpointResolver) func(*Options) { + return func(o *Options) { + o.EndpointResolver = v + } +} + +// WithEndpointResolverV2 returns a functional option for setting the Client's +// EndpointResolverV2 option. +func WithEndpointResolverV2(v EndpointResolverV2) func(*Options) { + return func(o *Options) { + o.EndpointResolverV2 = v + } +} + +func getSigV4IdentityResolver(o Options) smithyauth.IdentityResolver { + if o.Credentials != nil { + return &internalauthsmithy.CredentialsProviderAdapter{Provider: o.Credentials} + } + return nil +} + +// WithSigV4SigningName applies an override to the authentication workflow to +// use the given signing name for SigV4-authenticated operations. +// +// This is an advanced setting. The value here is FINAL, taking precedence over +// the resolved signing name from both auth scheme resolution and endpoint +// resolution. +func WithSigV4SigningName(name string) func(*Options) { + fn := func(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, + ) { + return next.HandleInitialize(awsmiddleware.SetSigningName(ctx, name), in) + } + return func(o *Options) { + o.APIOptions = append(o.APIOptions, func(s *middleware.Stack) error { + return s.Initialize.Add( + middleware.InitializeMiddlewareFunc("withSigV4SigningName", fn), + middleware.Before, + ) + }) + } +} + +// WithSigV4SigningRegion applies an override to the authentication workflow to +// use the given signing region for SigV4-authenticated operations. +// +// This is an advanced setting. The value here is FINAL, taking precedence over +// the resolved signing region from both auth scheme resolution and endpoint +// resolution. +func WithSigV4SigningRegion(region string) func(*Options) { + fn := func(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, + ) { + return next.HandleInitialize(awsmiddleware.SetSigningRegion(ctx, region), in) + } + return func(o *Options) { + o.APIOptions = append(o.APIOptions, func(s *middleware.Stack) error { + return s.Initialize.Add( + middleware.InitializeMiddlewareFunc("withSigV4SigningRegion", fn), + middleware.Before, + ) + }) + } +} + +func ignoreAnonymousAuth(options *Options) { + if aws.IsCredentialsProvider(options.Credentials, (*aws.AnonymousCredentials)(nil)) { + options.Credentials = nil + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/serializers.go new file mode 100644 index 00000000000..919493fdbe8 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/serializers.go @@ -0,0 +1,11236 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "bytes" + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/encoding/httpbinding" + smithyjson "github.com/aws/smithy-go/encoding/json" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" + smithyhttp "github.com/aws/smithy-go/transport/http" + "math" + "path" +) + +type awsAwsjson11_serializeOpAssociateKmsKey struct { +} + +func (*awsAwsjson11_serializeOpAssociateKmsKey) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpAssociateKmsKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*AssociateKmsKeyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.AssociateKmsKey") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentAssociateKmsKeyInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpAssociateSourceToS3TableIntegration struct { +} + +func (*awsAwsjson11_serializeOpAssociateSourceToS3TableIntegration) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpAssociateSourceToS3TableIntegration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*AssociateSourceToS3TableIntegrationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.AssociateSourceToS3TableIntegration") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentAssociateSourceToS3TableIntegrationInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpCancelExportTask struct { +} + +func (*awsAwsjson11_serializeOpCancelExportTask) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpCancelExportTask) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := 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)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.CancelExportTask") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentCancelExportTaskInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpCancelImportTask struct { +} + +func (*awsAwsjson11_serializeOpCancelImportTask) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpCancelImportTask) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := 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)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.CancelImportTask") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentCancelImportTaskInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpCreateDelivery struct { +} + +func (*awsAwsjson11_serializeOpCreateDelivery) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpCreateDelivery) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateDeliveryInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.CreateDelivery") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentCreateDeliveryInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpCreateExportTask struct { +} + +func (*awsAwsjson11_serializeOpCreateExportTask) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpCreateExportTask) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateExportTaskInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.CreateExportTask") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentCreateExportTaskInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpCreateImportTask struct { +} + +func (*awsAwsjson11_serializeOpCreateImportTask) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpCreateImportTask) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateImportTaskInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.CreateImportTask") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentCreateImportTaskInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpCreateLogAnomalyDetector struct { +} + +func (*awsAwsjson11_serializeOpCreateLogAnomalyDetector) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpCreateLogAnomalyDetector) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateLogAnomalyDetectorInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.CreateLogAnomalyDetector") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentCreateLogAnomalyDetectorInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpCreateLogGroup struct { +} + +func (*awsAwsjson11_serializeOpCreateLogGroup) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpCreateLogGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateLogGroupInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.CreateLogGroup") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentCreateLogGroupInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpCreateLogStream struct { +} + +func (*awsAwsjson11_serializeOpCreateLogStream) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpCreateLogStream) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateLogStreamInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.CreateLogStream") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentCreateLogStreamInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpCreateLookupTable struct { +} + +func (*awsAwsjson11_serializeOpCreateLookupTable) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpCreateLookupTable) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateLookupTableInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.CreateLookupTable") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentCreateLookupTableInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpCreateScheduledQuery struct { +} + +func (*awsAwsjson11_serializeOpCreateScheduledQuery) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpCreateScheduledQuery) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateScheduledQueryInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.CreateScheduledQuery") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentCreateScheduledQueryInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDeleteAccountPolicy struct { +} + +func (*awsAwsjson11_serializeOpDeleteAccountPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteAccountPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteAccountPolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.DeleteAccountPolicy") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteAccountPolicyInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDeleteDataProtectionPolicy struct { +} + +func (*awsAwsjson11_serializeOpDeleteDataProtectionPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteDataProtectionPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteDataProtectionPolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.DeleteDataProtectionPolicy") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteDataProtectionPolicyInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDeleteDelivery struct { +} + +func (*awsAwsjson11_serializeOpDeleteDelivery) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteDelivery) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteDeliveryInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.DeleteDelivery") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteDeliveryInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDeleteDeliveryDestination struct { +} + +func (*awsAwsjson11_serializeOpDeleteDeliveryDestination) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteDeliveryDestination) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteDeliveryDestinationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.DeleteDeliveryDestination") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteDeliveryDestinationInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDeleteDeliveryDestinationPolicy struct { +} + +func (*awsAwsjson11_serializeOpDeleteDeliveryDestinationPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteDeliveryDestinationPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteDeliveryDestinationPolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.DeleteDeliveryDestinationPolicy") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteDeliveryDestinationPolicyInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDeleteDeliverySource struct { +} + +func (*awsAwsjson11_serializeOpDeleteDeliverySource) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteDeliverySource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteDeliverySourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.DeleteDeliverySource") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteDeliverySourceInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDeleteDestination struct { +} + +func (*awsAwsjson11_serializeOpDeleteDestination) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteDestination) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteDestinationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.DeleteDestination") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteDestinationInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDeleteIndexPolicy struct { +} + +func (*awsAwsjson11_serializeOpDeleteIndexPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteIndexPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteIndexPolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.DeleteIndexPolicy") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteIndexPolicyInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDeleteIntegration struct { +} + +func (*awsAwsjson11_serializeOpDeleteIntegration) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteIntegration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteIntegrationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.DeleteIntegration") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteIntegrationInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDeleteLogAnomalyDetector struct { +} + +func (*awsAwsjson11_serializeOpDeleteLogAnomalyDetector) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteLogAnomalyDetector) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteLogAnomalyDetectorInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.DeleteLogAnomalyDetector") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteLogAnomalyDetectorInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDeleteLogGroup struct { +} + +func (*awsAwsjson11_serializeOpDeleteLogGroup) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteLogGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteLogGroupInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.DeleteLogGroup") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteLogGroupInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDeleteLogStream struct { +} + +func (*awsAwsjson11_serializeOpDeleteLogStream) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteLogStream) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteLogStreamInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.DeleteLogStream") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteLogStreamInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDeleteLookupTable struct { +} + +func (*awsAwsjson11_serializeOpDeleteLookupTable) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteLookupTable) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteLookupTableInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.DeleteLookupTable") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteLookupTableInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDeleteMetricFilter struct { +} + +func (*awsAwsjson11_serializeOpDeleteMetricFilter) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteMetricFilter) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteMetricFilterInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.DeleteMetricFilter") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteMetricFilterInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDeleteQueryDefinition struct { +} + +func (*awsAwsjson11_serializeOpDeleteQueryDefinition) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteQueryDefinition) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteQueryDefinitionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.DeleteQueryDefinition") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteQueryDefinitionInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDeleteResourcePolicy struct { +} + +func (*awsAwsjson11_serializeOpDeleteResourcePolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteResourcePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteResourcePolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.DeleteResourcePolicy") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteResourcePolicyInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDeleteRetentionPolicy struct { +} + +func (*awsAwsjson11_serializeOpDeleteRetentionPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteRetentionPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteRetentionPolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.DeleteRetentionPolicy") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteRetentionPolicyInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDeleteScheduledQuery struct { +} + +func (*awsAwsjson11_serializeOpDeleteScheduledQuery) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteScheduledQuery) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteScheduledQueryInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.DeleteScheduledQuery") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteScheduledQueryInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDeleteSubscriptionFilter struct { +} + +func (*awsAwsjson11_serializeOpDeleteSubscriptionFilter) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteSubscriptionFilter) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteSubscriptionFilterInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.DeleteSubscriptionFilter") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteSubscriptionFilterInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDeleteTransformer struct { +} + +func (*awsAwsjson11_serializeOpDeleteTransformer) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteTransformer) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteTransformerInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.DeleteTransformer") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteTransformerInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribeAccountPolicies struct { +} + +func (*awsAwsjson11_serializeOpDescribeAccountPolicies) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeAccountPolicies) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeAccountPoliciesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.DescribeAccountPolicies") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeAccountPoliciesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribeConfigurationTemplates struct { +} + +func (*awsAwsjson11_serializeOpDescribeConfigurationTemplates) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeConfigurationTemplates) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeConfigurationTemplatesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.DescribeConfigurationTemplates") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeConfigurationTemplatesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribeDeliveries struct { +} + +func (*awsAwsjson11_serializeOpDescribeDeliveries) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeDeliveries) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeDeliveriesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.DescribeDeliveries") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeDeliveriesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribeDeliveryDestinations struct { +} + +func (*awsAwsjson11_serializeOpDescribeDeliveryDestinations) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeDeliveryDestinations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeDeliveryDestinationsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.DescribeDeliveryDestinations") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeDeliveryDestinationsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribeDeliverySources struct { +} + +func (*awsAwsjson11_serializeOpDescribeDeliverySources) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeDeliverySources) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeDeliverySourcesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.DescribeDeliverySources") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeDeliverySourcesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribeDestinations struct { +} + +func (*awsAwsjson11_serializeOpDescribeDestinations) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeDestinations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeDestinationsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.DescribeDestinations") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeDestinationsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribeExportTasks struct { +} + +func (*awsAwsjson11_serializeOpDescribeExportTasks) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeExportTasks) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := 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)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.DescribeExportTasks") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeExportTasksInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribeFieldIndexes struct { +} + +func (*awsAwsjson11_serializeOpDescribeFieldIndexes) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeFieldIndexes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeFieldIndexesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.DescribeFieldIndexes") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeFieldIndexesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribeImportTaskBatches struct { +} + +func (*awsAwsjson11_serializeOpDescribeImportTaskBatches) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeImportTaskBatches) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeImportTaskBatchesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.DescribeImportTaskBatches") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeImportTaskBatchesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribeImportTasks struct { +} + +func (*awsAwsjson11_serializeOpDescribeImportTasks) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeImportTasks) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeImportTasksInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.DescribeImportTasks") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeImportTasksInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribeIndexPolicies struct { +} + +func (*awsAwsjson11_serializeOpDescribeIndexPolicies) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeIndexPolicies) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeIndexPoliciesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.DescribeIndexPolicies") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeIndexPoliciesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribeLogGroups struct { +} + +func (*awsAwsjson11_serializeOpDescribeLogGroups) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeLogGroups) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeLogGroupsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.DescribeLogGroups") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeLogGroupsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribeLogStreams struct { +} + +func (*awsAwsjson11_serializeOpDescribeLogStreams) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeLogStreams) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeLogStreamsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.DescribeLogStreams") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeLogStreamsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribeLookupTables struct { +} + +func (*awsAwsjson11_serializeOpDescribeLookupTables) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeLookupTables) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeLookupTablesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.DescribeLookupTables") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeLookupTablesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribeMetricFilters struct { +} + +func (*awsAwsjson11_serializeOpDescribeMetricFilters) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeMetricFilters) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeMetricFiltersInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.DescribeMetricFilters") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeMetricFiltersInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribeQueries struct { +} + +func (*awsAwsjson11_serializeOpDescribeQueries) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeQueries) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeQueriesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.DescribeQueries") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeQueriesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribeQueryDefinitions struct { +} + +func (*awsAwsjson11_serializeOpDescribeQueryDefinitions) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeQueryDefinitions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeQueryDefinitionsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.DescribeQueryDefinitions") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeQueryDefinitionsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribeResourcePolicies struct { +} + +func (*awsAwsjson11_serializeOpDescribeResourcePolicies) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeResourcePolicies) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeResourcePoliciesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.DescribeResourcePolicies") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeResourcePoliciesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribeSubscriptionFilters struct { +} + +func (*awsAwsjson11_serializeOpDescribeSubscriptionFilters) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeSubscriptionFilters) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeSubscriptionFiltersInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.DescribeSubscriptionFilters") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeSubscriptionFiltersInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDisassociateKmsKey struct { +} + +func (*awsAwsjson11_serializeOpDisassociateKmsKey) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDisassociateKmsKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DisassociateKmsKeyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.DisassociateKmsKey") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDisassociateKmsKeyInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDisassociateSourceFromS3TableIntegration struct { +} + +func (*awsAwsjson11_serializeOpDisassociateSourceFromS3TableIntegration) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDisassociateSourceFromS3TableIntegration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DisassociateSourceFromS3TableIntegrationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.DisassociateSourceFromS3TableIntegration") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDisassociateSourceFromS3TableIntegrationInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpFilterLogEvents struct { +} + +func (*awsAwsjson11_serializeOpFilterLogEvents) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpFilterLogEvents) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*FilterLogEventsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.FilterLogEvents") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentFilterLogEventsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpGetDataProtectionPolicy struct { +} + +func (*awsAwsjson11_serializeOpGetDataProtectionPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetDataProtectionPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetDataProtectionPolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.GetDataProtectionPolicy") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetDataProtectionPolicyInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpGetDelivery struct { +} + +func (*awsAwsjson11_serializeOpGetDelivery) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetDelivery) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetDeliveryInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.GetDelivery") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetDeliveryInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpGetDeliveryDestination struct { +} + +func (*awsAwsjson11_serializeOpGetDeliveryDestination) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetDeliveryDestination) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetDeliveryDestinationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.GetDeliveryDestination") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetDeliveryDestinationInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpGetDeliveryDestinationPolicy struct { +} + +func (*awsAwsjson11_serializeOpGetDeliveryDestinationPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetDeliveryDestinationPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetDeliveryDestinationPolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.GetDeliveryDestinationPolicy") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetDeliveryDestinationPolicyInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpGetDeliverySource struct { +} + +func (*awsAwsjson11_serializeOpGetDeliverySource) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetDeliverySource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetDeliverySourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.GetDeliverySource") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetDeliverySourceInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpGetIntegration struct { +} + +func (*awsAwsjson11_serializeOpGetIntegration) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetIntegration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetIntegrationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.GetIntegration") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetIntegrationInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpGetLogAnomalyDetector struct { +} + +func (*awsAwsjson11_serializeOpGetLogAnomalyDetector) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetLogAnomalyDetector) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetLogAnomalyDetectorInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.GetLogAnomalyDetector") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetLogAnomalyDetectorInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpGetLogEvents struct { +} + +func (*awsAwsjson11_serializeOpGetLogEvents) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetLogEvents) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetLogEventsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.GetLogEvents") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetLogEventsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpGetLogFields struct { +} + +func (*awsAwsjson11_serializeOpGetLogFields) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetLogFields) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetLogFieldsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.GetLogFields") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetLogFieldsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpGetLogGroupFields struct { +} + +func (*awsAwsjson11_serializeOpGetLogGroupFields) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetLogGroupFields) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetLogGroupFieldsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.GetLogGroupFields") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetLogGroupFieldsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpGetLogObject struct { +} + +func (*awsAwsjson11_serializeOpGetLogObject) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetLogObject) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetLogObjectInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.GetLogObject") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetLogObjectInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpGetLogRecord struct { +} + +func (*awsAwsjson11_serializeOpGetLogRecord) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetLogRecord) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetLogRecordInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.GetLogRecord") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetLogRecordInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpGetLookupTable struct { +} + +func (*awsAwsjson11_serializeOpGetLookupTable) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetLookupTable) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetLookupTableInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.GetLookupTable") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetLookupTableInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpGetQueryResults struct { +} + +func (*awsAwsjson11_serializeOpGetQueryResults) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetQueryResults) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetQueryResultsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.GetQueryResults") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetQueryResultsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpGetScheduledQuery struct { +} + +func (*awsAwsjson11_serializeOpGetScheduledQuery) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetScheduledQuery) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetScheduledQueryInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.GetScheduledQuery") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetScheduledQueryInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpGetScheduledQueryHistory struct { +} + +func (*awsAwsjson11_serializeOpGetScheduledQueryHistory) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetScheduledQueryHistory) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetScheduledQueryHistoryInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.GetScheduledQueryHistory") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetScheduledQueryHistoryInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpGetTransformer struct { +} + +func (*awsAwsjson11_serializeOpGetTransformer) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetTransformer) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetTransformerInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.GetTransformer") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetTransformerInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpListAggregateLogGroupSummaries struct { +} + +func (*awsAwsjson11_serializeOpListAggregateLogGroupSummaries) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListAggregateLogGroupSummaries) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListAggregateLogGroupSummariesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.ListAggregateLogGroupSummaries") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListAggregateLogGroupSummariesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpListAnomalies struct { +} + +func (*awsAwsjson11_serializeOpListAnomalies) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListAnomalies) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListAnomaliesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.ListAnomalies") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListAnomaliesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpListIntegrations struct { +} + +func (*awsAwsjson11_serializeOpListIntegrations) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListIntegrations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListIntegrationsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.ListIntegrations") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListIntegrationsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpListLogAnomalyDetectors struct { +} + +func (*awsAwsjson11_serializeOpListLogAnomalyDetectors) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListLogAnomalyDetectors) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListLogAnomalyDetectorsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.ListLogAnomalyDetectors") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListLogAnomalyDetectorsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpListLogGroups struct { +} + +func (*awsAwsjson11_serializeOpListLogGroups) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListLogGroups) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListLogGroupsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.ListLogGroups") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListLogGroupsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpListLogGroupsForQuery struct { +} + +func (*awsAwsjson11_serializeOpListLogGroupsForQuery) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListLogGroupsForQuery) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListLogGroupsForQueryInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.ListLogGroupsForQuery") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListLogGroupsForQueryInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpListScheduledQueries struct { +} + +func (*awsAwsjson11_serializeOpListScheduledQueries) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListScheduledQueries) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListScheduledQueriesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.ListScheduledQueries") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListScheduledQueriesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpListSourcesForS3TableIntegration struct { +} + +func (*awsAwsjson11_serializeOpListSourcesForS3TableIntegration) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListSourcesForS3TableIntegration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListSourcesForS3TableIntegrationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.ListSourcesForS3TableIntegration") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListSourcesForS3TableIntegrationInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpListTagsForResource struct { +} + +func (*awsAwsjson11_serializeOpListTagsForResource) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListTagsForResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.ListTagsForResource") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListTagsForResourceInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpListTagsLogGroup struct { +} + +func (*awsAwsjson11_serializeOpListTagsLogGroup) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListTagsLogGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListTagsLogGroupInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.ListTagsLogGroup") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListTagsLogGroupInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpPutAccountPolicy struct { +} + +func (*awsAwsjson11_serializeOpPutAccountPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpPutAccountPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*PutAccountPolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.PutAccountPolicy") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentPutAccountPolicyInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpPutBearerTokenAuthentication struct { +} + +func (*awsAwsjson11_serializeOpPutBearerTokenAuthentication) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpPutBearerTokenAuthentication) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*PutBearerTokenAuthenticationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.PutBearerTokenAuthentication") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentPutBearerTokenAuthenticationInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpPutDataProtectionPolicy struct { +} + +func (*awsAwsjson11_serializeOpPutDataProtectionPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpPutDataProtectionPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*PutDataProtectionPolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.PutDataProtectionPolicy") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentPutDataProtectionPolicyInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpPutDeliveryDestination struct { +} + +func (*awsAwsjson11_serializeOpPutDeliveryDestination) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpPutDeliveryDestination) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*PutDeliveryDestinationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.PutDeliveryDestination") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentPutDeliveryDestinationInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpPutDeliveryDestinationPolicy struct { +} + +func (*awsAwsjson11_serializeOpPutDeliveryDestinationPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpPutDeliveryDestinationPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*PutDeliveryDestinationPolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.PutDeliveryDestinationPolicy") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentPutDeliveryDestinationPolicyInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpPutDeliverySource struct { +} + +func (*awsAwsjson11_serializeOpPutDeliverySource) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpPutDeliverySource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*PutDeliverySourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.PutDeliverySource") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentPutDeliverySourceInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpPutDestination struct { +} + +func (*awsAwsjson11_serializeOpPutDestination) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpPutDestination) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*PutDestinationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.PutDestination") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentPutDestinationInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpPutDestinationPolicy struct { +} + +func (*awsAwsjson11_serializeOpPutDestinationPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpPutDestinationPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*PutDestinationPolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.PutDestinationPolicy") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentPutDestinationPolicyInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpPutIndexPolicy struct { +} + +func (*awsAwsjson11_serializeOpPutIndexPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpPutIndexPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*PutIndexPolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.PutIndexPolicy") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentPutIndexPolicyInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpPutIntegration struct { +} + +func (*awsAwsjson11_serializeOpPutIntegration) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpPutIntegration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*PutIntegrationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.PutIntegration") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentPutIntegrationInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpPutLogEvents struct { +} + +func (*awsAwsjson11_serializeOpPutLogEvents) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpPutLogEvents) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*PutLogEventsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.PutLogEvents") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentPutLogEventsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpPutLogGroupDeletionProtection struct { +} + +func (*awsAwsjson11_serializeOpPutLogGroupDeletionProtection) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpPutLogGroupDeletionProtection) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*PutLogGroupDeletionProtectionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.PutLogGroupDeletionProtection") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentPutLogGroupDeletionProtectionInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpPutMetricFilter struct { +} + +func (*awsAwsjson11_serializeOpPutMetricFilter) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpPutMetricFilter) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*PutMetricFilterInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.PutMetricFilter") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentPutMetricFilterInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpPutQueryDefinition struct { +} + +func (*awsAwsjson11_serializeOpPutQueryDefinition) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpPutQueryDefinition) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*PutQueryDefinitionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.PutQueryDefinition") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentPutQueryDefinitionInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpPutResourcePolicy struct { +} + +func (*awsAwsjson11_serializeOpPutResourcePolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpPutResourcePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*PutResourcePolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.PutResourcePolicy") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentPutResourcePolicyInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpPutRetentionPolicy struct { +} + +func (*awsAwsjson11_serializeOpPutRetentionPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpPutRetentionPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*PutRetentionPolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.PutRetentionPolicy") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentPutRetentionPolicyInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpPutSubscriptionFilter struct { +} + +func (*awsAwsjson11_serializeOpPutSubscriptionFilter) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpPutSubscriptionFilter) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*PutSubscriptionFilterInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.PutSubscriptionFilter") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentPutSubscriptionFilterInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpPutTransformer struct { +} + +func (*awsAwsjson11_serializeOpPutTransformer) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpPutTransformer) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*PutTransformerInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.PutTransformer") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentPutTransformerInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpStartLiveTail struct { +} + +func (*awsAwsjson11_serializeOpStartLiveTail) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpStartLiveTail) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*StartLiveTailInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.StartLiveTail") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentStartLiveTailInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpStartQuery struct { +} + +func (*awsAwsjson11_serializeOpStartQuery) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpStartQuery) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*StartQueryInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.StartQuery") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentStartQueryInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpStopQuery struct { +} + +func (*awsAwsjson11_serializeOpStopQuery) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpStopQuery) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*StopQueryInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.StopQuery") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentStopQueryInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpTagLogGroup struct { +} + +func (*awsAwsjson11_serializeOpTagLogGroup) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpTagLogGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*TagLogGroupInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.TagLogGroup") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentTagLogGroupInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpTagResource struct { +} + +func (*awsAwsjson11_serializeOpTagResource) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*TagResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.TagResource") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentTagResourceInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpTestMetricFilter struct { +} + +func (*awsAwsjson11_serializeOpTestMetricFilter) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpTestMetricFilter) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*TestMetricFilterInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.TestMetricFilter") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentTestMetricFilterInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpTestTransformer struct { +} + +func (*awsAwsjson11_serializeOpTestTransformer) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpTestTransformer) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*TestTransformerInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.TestTransformer") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentTestTransformerInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpUntagLogGroup struct { +} + +func (*awsAwsjson11_serializeOpUntagLogGroup) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpUntagLogGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UntagLogGroupInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.UntagLogGroup") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentUntagLogGroupInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpUntagResource struct { +} + +func (*awsAwsjson11_serializeOpUntagResource) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UntagResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.UntagResource") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentUntagResourceInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpUpdateAnomaly struct { +} + +func (*awsAwsjson11_serializeOpUpdateAnomaly) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpUpdateAnomaly) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateAnomalyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.UpdateAnomaly") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentUpdateAnomalyInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpUpdateDeliveryConfiguration struct { +} + +func (*awsAwsjson11_serializeOpUpdateDeliveryConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpUpdateDeliveryConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateDeliveryConfigurationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.UpdateDeliveryConfiguration") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentUpdateDeliveryConfigurationInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpUpdateLogAnomalyDetector struct { +} + +func (*awsAwsjson11_serializeOpUpdateLogAnomalyDetector) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpUpdateLogAnomalyDetector) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateLogAnomalyDetectorInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.UpdateLogAnomalyDetector") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentUpdateLogAnomalyDetectorInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpUpdateLookupTable struct { +} + +func (*awsAwsjson11_serializeOpUpdateLookupTable) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpUpdateLookupTable) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateLookupTableInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.UpdateLookupTable") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentUpdateLookupTableInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpUpdateScheduledQuery struct { +} + +func (*awsAwsjson11_serializeOpUpdateScheduledQuery) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpUpdateScheduledQuery) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateScheduledQueryInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Logs_20140328.UpdateScheduledQuery") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentUpdateScheduledQueryInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsAwsjson11_serializeDocumentAccountIds(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentAddKeyEntries(v []types.AddKeyEntry, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentAddKeyEntry(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentAddKeyEntry(v *types.AddKeyEntry, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Key != nil { + ok := object.Key("key") + ok.String(*v.Key) + } + + if v.OverwriteIfExists { + ok := object.Key("overwriteIfExists") + ok.Boolean(v.OverwriteIfExists) + } + + if v.Value != nil { + ok := object.Key("value") + ok.String(*v.Value) + } + + return nil +} + +func awsAwsjson11_serializeDocumentAddKeys(v *types.AddKeys, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Entries != nil { + ok := object.Key("entries") + if err := awsAwsjson11_serializeDocumentAddKeyEntries(v.Entries, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentColumns(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentCopyValue(v *types.CopyValue, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Entries != nil { + ok := object.Key("entries") + if err := awsAwsjson11_serializeDocumentCopyValueEntries(v.Entries, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentCopyValueEntries(v []types.CopyValueEntry, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentCopyValueEntry(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentCopyValueEntry(v *types.CopyValueEntry, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.OverwriteIfExists { + ok := object.Key("overwriteIfExists") + ok.Boolean(v.OverwriteIfExists) + } + + if v.Source != nil { + ok := object.Key("source") + ok.String(*v.Source) + } + + if v.Target != nil { + ok := object.Key("target") + ok.String(*v.Target) + } + + return nil +} + +func awsAwsjson11_serializeDocumentCSV(v *types.CSV, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Columns != nil { + ok := object.Key("columns") + if err := awsAwsjson11_serializeDocumentColumns(v.Columns, ok); err != nil { + return err + } + } + + if v.Delimiter != nil { + ok := object.Key("delimiter") + ok.String(*v.Delimiter) + } + + if v.Destination != nil { + ok := object.Key("destination") + ok.String(*v.Destination) + } + + if v.QuoteCharacter != nil { + ok := object.Key("quoteCharacter") + ok.String(*v.QuoteCharacter) + } + + if v.Source != nil { + ok := object.Key("source") + ok.String(*v.Source) + } + + return nil +} + +func awsAwsjson11_serializeDocumentDashboardViewerPrincipals(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentDataSource(v *types.DataSource, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.Type != nil { + ok := object.Key("type") + ok.String(*v.Type) + } + + return nil +} + +func awsAwsjson11_serializeDocumentDataSourceFilter(v *types.DataSourceFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.Type != nil { + ok := object.Key("type") + ok.String(*v.Type) + } + + return nil +} + +func awsAwsjson11_serializeDocumentDataSourceFilters(v []types.DataSourceFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentDataSourceFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentDateTimeConverter(v *types.DateTimeConverter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Locale != nil { + ok := object.Key("locale") + ok.String(*v.Locale) + } + + if v.MatchPatterns != nil { + ok := object.Key("matchPatterns") + if err := awsAwsjson11_serializeDocumentMatchPatterns(v.MatchPatterns, ok); err != nil { + return err + } + } + + if v.Source != nil { + ok := object.Key("source") + ok.String(*v.Source) + } + + if v.SourceTimezone != nil { + ok := object.Key("sourceTimezone") + ok.String(*v.SourceTimezone) + } + + if v.Target != nil { + ok := object.Key("target") + ok.String(*v.Target) + } + + if v.TargetFormat != nil { + ok := object.Key("targetFormat") + ok.String(*v.TargetFormat) + } + + if v.TargetTimezone != nil { + ok := object.Key("targetTimezone") + ok.String(*v.TargetTimezone) + } + + return nil +} + +func awsAwsjson11_serializeDocumentDeleteKeys(v *types.DeleteKeys, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.WithKeys != nil { + ok := object.Key("withKeys") + if err := awsAwsjson11_serializeDocumentDeleteWithKeys(v.WithKeys, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentDeleteWithKeys(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentDeliveryDestinationConfiguration(v *types.DeliveryDestinationConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DestinationResourceArn != nil { + ok := object.Key("destinationResourceArn") + ok.String(*v.DestinationResourceArn) + } + + return nil +} + +func awsAwsjson11_serializeDocumentDeliveryDestinationTypes(v []types.DeliveryDestinationType, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + +func awsAwsjson11_serializeDocumentDescribeFieldIndexesLogGroupIdentifiers(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentDescribeIndexPoliciesLogGroupIdentifiers(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentDescribeLogGroupsLogGroupIdentifiers(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentDestinationConfiguration(v *types.DestinationConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.S3Configuration != nil { + ok := object.Key("s3Configuration") + if err := awsAwsjson11_serializeDocumentS3Configuration(v.S3Configuration, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentDimensions(v map[string]string, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + om.String(v[key]) + } + return nil +} + +func awsAwsjson11_serializeDocumentEmitSystemFields(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentEntity(v *types.Entity, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Attributes != nil { + ok := object.Key("attributes") + if err := awsAwsjson11_serializeDocumentEntityAttributes(v.Attributes, ok); err != nil { + return err + } + } + + if v.KeyAttributes != nil { + ok := object.Key("keyAttributes") + if err := awsAwsjson11_serializeDocumentEntityKeyAttributes(v.KeyAttributes, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentEntityAttributes(v map[string]string, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + om.String(v[key]) + } + return nil +} + +func awsAwsjson11_serializeDocumentEntityKeyAttributes(v map[string]string, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + om.String(v[key]) + } + return nil +} + +func awsAwsjson11_serializeDocumentExecutionStatusList(v []types.ExecutionStatus, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + +func awsAwsjson11_serializeDocumentFieldIndexNames(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentGrok(v *types.Grok, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Match != nil { + ok := object.Key("match") + ok.String(*v.Match) + } + + if v.Source != nil { + ok := object.Key("source") + ok.String(*v.Source) + } + + return nil +} + +func awsAwsjson11_serializeDocumentImportFilter(v *types.ImportFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.EndEventTime != nil { + ok := object.Key("endEventTime") + ok.Long(*v.EndEventTime) + } + + if v.StartEventTime != nil { + ok := object.Key("startEventTime") + ok.Long(*v.StartEventTime) + } + + return nil +} + +func awsAwsjson11_serializeDocumentImportStatusList(v []types.ImportStatus, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + +func awsAwsjson11_serializeDocumentInputLogEvent(v *types.InputLogEvent, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Message != nil { + ok := object.Key("message") + ok.String(*v.Message) + } + + if v.Timestamp != nil { + ok := object.Key("timestamp") + ok.Long(*v.Timestamp) + } + + return nil +} + +func awsAwsjson11_serializeDocumentInputLogEvents(v []types.InputLogEvent, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentInputLogEvent(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentInputLogStreamNames(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentListToMap(v *types.ListToMap, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Flatten { + ok := object.Key("flatten") + ok.Boolean(v.Flatten) + } + + if len(v.FlattenedElement) > 0 { + ok := object.Key("flattenedElement") + ok.String(string(v.FlattenedElement)) + } + + if v.Key != nil { + ok := object.Key("key") + ok.String(*v.Key) + } + + if v.Source != nil { + ok := object.Key("source") + ok.String(*v.Source) + } + + if v.Target != nil { + ok := object.Key("target") + ok.String(*v.Target) + } + + if v.ValueKey != nil { + ok := object.Key("valueKey") + ok.String(*v.ValueKey) + } + + return nil +} + +func awsAwsjson11_serializeDocumentLogGroupArnList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentLogGroupIdentifiers(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentLogGroupNames(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentLogTypes(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentLowerCaseString(v *types.LowerCaseString, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.WithKeys != nil { + ok := object.Key("withKeys") + if err := awsAwsjson11_serializeDocumentLowerCaseStringWithKeys(v.WithKeys, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentLowerCaseStringWithKeys(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentMatchPatterns(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentMetricTransformation(v *types.MetricTransformation, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DefaultValue != nil { + ok := object.Key("defaultValue") + switch { + case math.IsNaN(*v.DefaultValue): + ok.String("NaN") + + case math.IsInf(*v.DefaultValue, 1): + ok.String("Infinity") + + case math.IsInf(*v.DefaultValue, -1): + ok.String("-Infinity") + + default: + ok.Double(*v.DefaultValue) + + } + } + + if v.Dimensions != nil { + ok := object.Key("dimensions") + if err := awsAwsjson11_serializeDocumentDimensions(v.Dimensions, ok); err != nil { + return err + } + } + + if v.MetricName != nil { + ok := object.Key("metricName") + ok.String(*v.MetricName) + } + + if v.MetricNamespace != nil { + ok := object.Key("metricNamespace") + ok.String(*v.MetricNamespace) + } + + if v.MetricValue != nil { + ok := object.Key("metricValue") + ok.String(*v.MetricValue) + } + + if len(v.Unit) > 0 { + ok := object.Key("unit") + ok.String(string(v.Unit)) + } + + return nil +} + +func awsAwsjson11_serializeDocumentMetricTransformations(v []types.MetricTransformation, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentMetricTransformation(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentMoveKeyEntries(v []types.MoveKeyEntry, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentMoveKeyEntry(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentMoveKeyEntry(v *types.MoveKeyEntry, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.OverwriteIfExists { + ok := object.Key("overwriteIfExists") + ok.Boolean(v.OverwriteIfExists) + } + + if v.Source != nil { + ok := object.Key("source") + ok.String(*v.Source) + } + + if v.Target != nil { + ok := object.Key("target") + ok.String(*v.Target) + } + + return nil +} + +func awsAwsjson11_serializeDocumentMoveKeys(v *types.MoveKeys, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Entries != nil { + ok := object.Key("entries") + if err := awsAwsjson11_serializeDocumentMoveKeyEntries(v.Entries, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentOpenSearchResourceConfig(v *types.OpenSearchResourceConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ApplicationArn != nil { + ok := object.Key("applicationArn") + ok.String(*v.ApplicationArn) + } + + if v.DashboardViewerPrincipals != nil { + ok := object.Key("dashboardViewerPrincipals") + if err := awsAwsjson11_serializeDocumentDashboardViewerPrincipals(v.DashboardViewerPrincipals, ok); err != nil { + return err + } + } + + if v.DataSourceRoleArn != nil { + ok := object.Key("dataSourceRoleArn") + ok.String(*v.DataSourceRoleArn) + } + + if v.KmsKeyArn != nil { + ok := object.Key("kmsKeyArn") + ok.String(*v.KmsKeyArn) + } + + if v.RetentionDays != nil { + ok := object.Key("retentionDays") + ok.Integer(*v.RetentionDays) + } + + return nil +} + +func awsAwsjson11_serializeDocumentParseCloudfront(v *types.ParseCloudfront, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Source != nil { + ok := object.Key("source") + ok.String(*v.Source) + } + + return nil +} + +func awsAwsjson11_serializeDocumentParseJSON(v *types.ParseJSON, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Destination != nil { + ok := object.Key("destination") + ok.String(*v.Destination) + } + + if v.Source != nil { + ok := object.Key("source") + ok.String(*v.Source) + } + + return nil +} + +func awsAwsjson11_serializeDocumentParseKeyValue(v *types.ParseKeyValue, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Destination != nil { + ok := object.Key("destination") + ok.String(*v.Destination) + } + + if v.FieldDelimiter != nil { + ok := object.Key("fieldDelimiter") + ok.String(*v.FieldDelimiter) + } + + if v.KeyPrefix != nil { + ok := object.Key("keyPrefix") + ok.String(*v.KeyPrefix) + } + + if v.KeyValueDelimiter != nil { + ok := object.Key("keyValueDelimiter") + ok.String(*v.KeyValueDelimiter) + } + + if v.NonMatchValue != nil { + ok := object.Key("nonMatchValue") + ok.String(*v.NonMatchValue) + } + + if v.OverwriteIfExists { + ok := object.Key("overwriteIfExists") + ok.Boolean(v.OverwriteIfExists) + } + + if v.Source != nil { + ok := object.Key("source") + ok.String(*v.Source) + } + + return nil +} + +func awsAwsjson11_serializeDocumentParsePostgres(v *types.ParsePostgres, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Source != nil { + ok := object.Key("source") + ok.String(*v.Source) + } + + return nil +} + +func awsAwsjson11_serializeDocumentParseRoute53(v *types.ParseRoute53, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Source != nil { + ok := object.Key("source") + ok.String(*v.Source) + } + + return nil +} + +func awsAwsjson11_serializeDocumentParseToOCSF(v *types.ParseToOCSF, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.EventSource) > 0 { + ok := object.Key("eventSource") + ok.String(string(v.EventSource)) + } + + if v.MappingVersion != nil { + ok := object.Key("mappingVersion") + ok.String(*v.MappingVersion) + } + + if len(v.OcsfVersion) > 0 { + ok := object.Key("ocsfVersion") + ok.String(string(v.OcsfVersion)) + } + + if v.Source != nil { + ok := object.Key("source") + ok.String(*v.Source) + } + + return nil +} + +func awsAwsjson11_serializeDocumentParseVPC(v *types.ParseVPC, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Source != nil { + ok := object.Key("source") + ok.String(*v.Source) + } + + return nil +} + +func awsAwsjson11_serializeDocumentParseWAF(v *types.ParseWAF, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Source != nil { + ok := object.Key("source") + ok.String(*v.Source) + } + + return nil +} + +func awsAwsjson11_serializeDocumentProcessor(v *types.Processor, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AddKeys != nil { + ok := object.Key("addKeys") + if err := awsAwsjson11_serializeDocumentAddKeys(v.AddKeys, ok); err != nil { + return err + } + } + + if v.CopyValue != nil { + ok := object.Key("copyValue") + if err := awsAwsjson11_serializeDocumentCopyValue(v.CopyValue, ok); err != nil { + return err + } + } + + if v.Csv != nil { + ok := object.Key("csv") + if err := awsAwsjson11_serializeDocumentCSV(v.Csv, ok); err != nil { + return err + } + } + + if v.DateTimeConverter != nil { + ok := object.Key("dateTimeConverter") + if err := awsAwsjson11_serializeDocumentDateTimeConverter(v.DateTimeConverter, ok); err != nil { + return err + } + } + + if v.DeleteKeys != nil { + ok := object.Key("deleteKeys") + if err := awsAwsjson11_serializeDocumentDeleteKeys(v.DeleteKeys, ok); err != nil { + return err + } + } + + if v.Grok != nil { + ok := object.Key("grok") + if err := awsAwsjson11_serializeDocumentGrok(v.Grok, ok); err != nil { + return err + } + } + + if v.ListToMap != nil { + ok := object.Key("listToMap") + if err := awsAwsjson11_serializeDocumentListToMap(v.ListToMap, ok); err != nil { + return err + } + } + + if v.LowerCaseString != nil { + ok := object.Key("lowerCaseString") + if err := awsAwsjson11_serializeDocumentLowerCaseString(v.LowerCaseString, ok); err != nil { + return err + } + } + + if v.MoveKeys != nil { + ok := object.Key("moveKeys") + if err := awsAwsjson11_serializeDocumentMoveKeys(v.MoveKeys, ok); err != nil { + return err + } + } + + if v.ParseCloudfront != nil { + ok := object.Key("parseCloudfront") + if err := awsAwsjson11_serializeDocumentParseCloudfront(v.ParseCloudfront, ok); err != nil { + return err + } + } + + if v.ParseJSON != nil { + ok := object.Key("parseJSON") + if err := awsAwsjson11_serializeDocumentParseJSON(v.ParseJSON, ok); err != nil { + return err + } + } + + if v.ParseKeyValue != nil { + ok := object.Key("parseKeyValue") + if err := awsAwsjson11_serializeDocumentParseKeyValue(v.ParseKeyValue, ok); err != nil { + return err + } + } + + if v.ParsePostgres != nil { + ok := object.Key("parsePostgres") + if err := awsAwsjson11_serializeDocumentParsePostgres(v.ParsePostgres, ok); err != nil { + return err + } + } + + if v.ParseRoute53 != nil { + ok := object.Key("parseRoute53") + if err := awsAwsjson11_serializeDocumentParseRoute53(v.ParseRoute53, ok); err != nil { + return err + } + } + + if v.ParseToOCSF != nil { + ok := object.Key("parseToOCSF") + if err := awsAwsjson11_serializeDocumentParseToOCSF(v.ParseToOCSF, ok); err != nil { + return err + } + } + + if v.ParseVPC != nil { + ok := object.Key("parseVPC") + if err := awsAwsjson11_serializeDocumentParseVPC(v.ParseVPC, ok); err != nil { + return err + } + } + + if v.ParseWAF != nil { + ok := object.Key("parseWAF") + if err := awsAwsjson11_serializeDocumentParseWAF(v.ParseWAF, ok); err != nil { + return err + } + } + + if v.RenameKeys != nil { + ok := object.Key("renameKeys") + if err := awsAwsjson11_serializeDocumentRenameKeys(v.RenameKeys, ok); err != nil { + return err + } + } + + if v.SplitString != nil { + ok := object.Key("splitString") + if err := awsAwsjson11_serializeDocumentSplitString(v.SplitString, ok); err != nil { + return err + } + } + + if v.SubstituteString != nil { + ok := object.Key("substituteString") + if err := awsAwsjson11_serializeDocumentSubstituteString(v.SubstituteString, ok); err != nil { + return err + } + } + + if v.TrimString != nil { + ok := object.Key("trimString") + if err := awsAwsjson11_serializeDocumentTrimString(v.TrimString, ok); err != nil { + return err + } + } + + if v.TypeConverter != nil { + ok := object.Key("typeConverter") + if err := awsAwsjson11_serializeDocumentTypeConverter(v.TypeConverter, ok); err != nil { + return err + } + } + + if v.UpperCaseString != nil { + ok := object.Key("upperCaseString") + if err := awsAwsjson11_serializeDocumentUpperCaseString(v.UpperCaseString, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentProcessors(v []types.Processor, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentProcessor(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentQueryParameter(v *types.QueryParameter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DefaultValue != nil { + ok := object.Key("defaultValue") + ok.String(*v.DefaultValue) + } + + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + return nil +} + +func awsAwsjson11_serializeDocumentQueryParameterList(v []types.QueryParameter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentQueryParameter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentRecordFields(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentRenameKeyEntries(v []types.RenameKeyEntry, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentRenameKeyEntry(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentRenameKeyEntry(v *types.RenameKeyEntry, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Key != nil { + ok := object.Key("key") + ok.String(*v.Key) + } + + if v.OverwriteIfExists { + ok := object.Key("overwriteIfExists") + ok.Boolean(v.OverwriteIfExists) + } + + if v.RenameTo != nil { + ok := object.Key("renameTo") + ok.String(*v.RenameTo) + } + + return nil +} + +func awsAwsjson11_serializeDocumentRenameKeys(v *types.RenameKeys, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Entries != nil { + ok := object.Key("entries") + if err := awsAwsjson11_serializeDocumentRenameKeyEntries(v.Entries, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentResourceConfig(v types.ResourceConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.ResourceConfigMemberOpenSearchResourceConfig: + av := object.Key("openSearchResourceConfig") + if err := awsAwsjson11_serializeDocumentOpenSearchResourceConfig(&uv.Value, av); err != nil { + return err + } + + default: + return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v) + + } + return nil +} + +func awsAwsjson11_serializeDocumentResourceTypes(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentS3Configuration(v *types.S3Configuration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DestinationIdentifier != nil { + ok := object.Key("destinationIdentifier") + ok.String(*v.DestinationIdentifier) + } + + if v.KmsKeyId != nil { + ok := object.Key("kmsKeyId") + ok.String(*v.KmsKeyId) + } + + if v.OwnerAccountId != nil { + ok := object.Key("ownerAccountId") + ok.String(*v.OwnerAccountId) + } + + if v.RoleArn != nil { + ok := object.Key("roleArn") + ok.String(*v.RoleArn) + } + + return nil +} + +func awsAwsjson11_serializeDocumentS3DeliveryConfiguration(v *types.S3DeliveryConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.EnableHiveCompatiblePath != nil { + ok := object.Key("enableHiveCompatiblePath") + ok.Boolean(*v.EnableHiveCompatiblePath) + } + + if v.SuffixPath != nil { + ok := object.Key("suffixPath") + ok.String(*v.SuffixPath) + } + + return nil +} + +func awsAwsjson11_serializeDocumentScheduledQueryLogGroupIdentifiers(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentSplitString(v *types.SplitString, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Entries != nil { + ok := object.Key("entries") + if err := awsAwsjson11_serializeDocumentSplitStringEntries(v.Entries, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentSplitStringEntries(v []types.SplitStringEntry, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentSplitStringEntry(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentSplitStringEntry(v *types.SplitStringEntry, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Delimiter != nil { + ok := object.Key("delimiter") + ok.String(*v.Delimiter) + } + + if v.Source != nil { + ok := object.Key("source") + ok.String(*v.Source) + } + + return nil +} + +func awsAwsjson11_serializeDocumentStartLiveTailLogGroupIdentifiers(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentSubstituteString(v *types.SubstituteString, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Entries != nil { + ok := object.Key("entries") + if err := awsAwsjson11_serializeDocumentSubstituteStringEntries(v.Entries, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentSubstituteStringEntries(v []types.SubstituteStringEntry, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentSubstituteStringEntry(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentSubstituteStringEntry(v *types.SubstituteStringEntry, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.From != nil { + ok := object.Key("from") + ok.String(*v.From) + } + + if v.Source != nil { + ok := object.Key("source") + ok.String(*v.Source) + } + + if v.To != nil { + ok := object.Key("to") + ok.String(*v.To) + } + + return nil +} + +func awsAwsjson11_serializeDocumentSuppressionPeriod(v *types.SuppressionPeriod, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.SuppressionUnit) > 0 { + ok := object.Key("suppressionUnit") + ok.String(string(v.SuppressionUnit)) + } + + if v.Value != 0 { + ok := object.Key("value") + ok.Integer(v.Value) + } + + return nil +} + +func awsAwsjson11_serializeDocumentTagKeyList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentTagList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentTags(v map[string]string, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + om.String(v[key]) + } + return nil +} + +func awsAwsjson11_serializeDocumentTestEventMessages(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentTrimString(v *types.TrimString, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.WithKeys != nil { + ok := object.Key("withKeys") + if err := awsAwsjson11_serializeDocumentTrimStringWithKeys(v.WithKeys, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentTrimStringWithKeys(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentTypeConverter(v *types.TypeConverter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Entries != nil { + ok := object.Key("entries") + if err := awsAwsjson11_serializeDocumentTypeConverterEntries(v.Entries, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentTypeConverterEntries(v []types.TypeConverterEntry, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentTypeConverterEntry(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentTypeConverterEntry(v *types.TypeConverterEntry, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Key != nil { + ok := object.Key("key") + ok.String(*v.Key) + } + + if len(v.Type) > 0 { + ok := object.Key("type") + ok.String(string(v.Type)) + } + + return nil +} + +func awsAwsjson11_serializeDocumentUpperCaseString(v *types.UpperCaseString, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.WithKeys != nil { + ok := object.Key("withKeys") + if err := awsAwsjson11_serializeDocumentUpperCaseStringWithKeys(v.WithKeys, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentUpperCaseStringWithKeys(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeOpDocumentAssociateKmsKeyInput(v *AssociateKmsKeyInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.KmsKeyId != nil { + ok := object.Key("kmsKeyId") + ok.String(*v.KmsKeyId) + } + + if v.LogGroupName != nil { + ok := object.Key("logGroupName") + ok.String(*v.LogGroupName) + } + + if v.ResourceIdentifier != nil { + ok := object.Key("resourceIdentifier") + ok.String(*v.ResourceIdentifier) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentAssociateSourceToS3TableIntegrationInput(v *AssociateSourceToS3TableIntegrationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DataSource != nil { + ok := object.Key("dataSource") + if err := awsAwsjson11_serializeDocumentDataSource(v.DataSource, ok); err != nil { + return err + } + } + + if v.IntegrationArn != nil { + ok := object.Key("integrationArn") + ok.String(*v.IntegrationArn) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentCancelExportTaskInput(v *CancelExportTaskInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.TaskId != nil { + ok := object.Key("taskId") + ok.String(*v.TaskId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentCancelImportTaskInput(v *CancelImportTaskInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ImportId != nil { + ok := object.Key("importId") + ok.String(*v.ImportId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentCreateDeliveryInput(v *CreateDeliveryInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DeliveryDestinationArn != nil { + ok := object.Key("deliveryDestinationArn") + ok.String(*v.DeliveryDestinationArn) + } + + if v.DeliverySourceName != nil { + ok := object.Key("deliverySourceName") + ok.String(*v.DeliverySourceName) + } + + if v.FieldDelimiter != nil { + ok := object.Key("fieldDelimiter") + ok.String(*v.FieldDelimiter) + } + + if v.RecordFields != nil { + ok := object.Key("recordFields") + if err := awsAwsjson11_serializeDocumentRecordFields(v.RecordFields, ok); err != nil { + return err + } + } + + if v.S3DeliveryConfiguration != nil { + ok := object.Key("s3DeliveryConfiguration") + if err := awsAwsjson11_serializeDocumentS3DeliveryConfiguration(v.S3DeliveryConfiguration, ok); err != nil { + return err + } + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsAwsjson11_serializeDocumentTags(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentCreateExportTaskInput(v *CreateExportTaskInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Destination != nil { + ok := object.Key("destination") + ok.String(*v.Destination) + } + + if v.DestinationPrefix != nil { + ok := object.Key("destinationPrefix") + ok.String(*v.DestinationPrefix) + } + + if v.From != nil { + ok := object.Key("from") + ok.Long(*v.From) + } + + if v.LogGroupName != nil { + ok := object.Key("logGroupName") + ok.String(*v.LogGroupName) + } + + if v.LogStreamNamePrefix != nil { + ok := object.Key("logStreamNamePrefix") + ok.String(*v.LogStreamNamePrefix) + } + + if v.TaskName != nil { + ok := object.Key("taskName") + ok.String(*v.TaskName) + } + + if v.To != nil { + ok := object.Key("to") + ok.Long(*v.To) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentCreateImportTaskInput(v *CreateImportTaskInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ImportFilter != nil { + ok := object.Key("importFilter") + if err := awsAwsjson11_serializeDocumentImportFilter(v.ImportFilter, ok); err != nil { + return err + } + } + + if v.ImportRoleArn != nil { + ok := object.Key("importRoleArn") + ok.String(*v.ImportRoleArn) + } + + if v.ImportSourceArn != nil { + ok := object.Key("importSourceArn") + ok.String(*v.ImportSourceArn) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentCreateLogAnomalyDetectorInput(v *CreateLogAnomalyDetectorInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AnomalyVisibilityTime != nil { + ok := object.Key("anomalyVisibilityTime") + ok.Long(*v.AnomalyVisibilityTime) + } + + if v.DetectorName != nil { + ok := object.Key("detectorName") + ok.String(*v.DetectorName) + } + + if len(v.EvaluationFrequency) > 0 { + ok := object.Key("evaluationFrequency") + ok.String(string(v.EvaluationFrequency)) + } + + if v.FilterPattern != nil { + ok := object.Key("filterPattern") + ok.String(*v.FilterPattern) + } + + if v.KmsKeyId != nil { + ok := object.Key("kmsKeyId") + ok.String(*v.KmsKeyId) + } + + if v.LogGroupArnList != nil { + ok := object.Key("logGroupArnList") + if err := awsAwsjson11_serializeDocumentLogGroupArnList(v.LogGroupArnList, ok); err != nil { + return err + } + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsAwsjson11_serializeDocumentTags(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentCreateLogGroupInput(v *CreateLogGroupInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DeletionProtectionEnabled != nil { + ok := object.Key("deletionProtectionEnabled") + ok.Boolean(*v.DeletionProtectionEnabled) + } + + if v.KmsKeyId != nil { + ok := object.Key("kmsKeyId") + ok.String(*v.KmsKeyId) + } + + if len(v.LogGroupClass) > 0 { + ok := object.Key("logGroupClass") + ok.String(string(v.LogGroupClass)) + } + + if v.LogGroupName != nil { + ok := object.Key("logGroupName") + ok.String(*v.LogGroupName) + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsAwsjson11_serializeDocumentTags(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentCreateLogStreamInput(v *CreateLogStreamInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LogGroupName != nil { + ok := object.Key("logGroupName") + ok.String(*v.LogGroupName) + } + + if v.LogStreamName != nil { + ok := object.Key("logStreamName") + ok.String(*v.LogStreamName) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentCreateLookupTableInput(v *CreateLookupTableInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + if v.KmsKeyId != nil { + ok := object.Key("kmsKeyId") + ok.String(*v.KmsKeyId) + } + + if v.LookupTableName != nil { + ok := object.Key("lookupTableName") + ok.String(*v.LookupTableName) + } + + if v.TableBody != nil { + ok := object.Key("tableBody") + ok.String(*v.TableBody) + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsAwsjson11_serializeDocumentTags(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentCreateScheduledQueryInput(v *CreateScheduledQueryInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + if v.DestinationConfiguration != nil { + ok := object.Key("destinationConfiguration") + if err := awsAwsjson11_serializeDocumentDestinationConfiguration(v.DestinationConfiguration, ok); err != nil { + return err + } + } + + if v.ExecutionRoleArn != nil { + ok := object.Key("executionRoleArn") + ok.String(*v.ExecutionRoleArn) + } + + if v.LogGroupIdentifiers != nil { + ok := object.Key("logGroupIdentifiers") + if err := awsAwsjson11_serializeDocumentScheduledQueryLogGroupIdentifiers(v.LogGroupIdentifiers, ok); err != nil { + return err + } + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if len(v.QueryLanguage) > 0 { + ok := object.Key("queryLanguage") + ok.String(string(v.QueryLanguage)) + } + + if v.QueryString != nil { + ok := object.Key("queryString") + ok.String(*v.QueryString) + } + + if v.ScheduleEndTime != nil { + ok := object.Key("scheduleEndTime") + ok.Long(*v.ScheduleEndTime) + } + + if v.ScheduleExpression != nil { + ok := object.Key("scheduleExpression") + ok.String(*v.ScheduleExpression) + } + + if v.ScheduleStartTime != nil { + ok := object.Key("scheduleStartTime") + ok.Long(*v.ScheduleStartTime) + } + + if v.StartTimeOffset != nil { + ok := object.Key("startTimeOffset") + ok.Long(*v.StartTimeOffset) + } + + if len(v.State) > 0 { + ok := object.Key("state") + ok.String(string(v.State)) + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsAwsjson11_serializeDocumentTags(v.Tags, ok); err != nil { + return err + } + } + + if v.Timezone != nil { + ok := object.Key("timezone") + ok.String(*v.Timezone) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDeleteAccountPolicyInput(v *DeleteAccountPolicyInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.PolicyName != nil { + ok := object.Key("policyName") + ok.String(*v.PolicyName) + } + + if len(v.PolicyType) > 0 { + ok := object.Key("policyType") + ok.String(string(v.PolicyType)) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDeleteDataProtectionPolicyInput(v *DeleteDataProtectionPolicyInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LogGroupIdentifier != nil { + ok := object.Key("logGroupIdentifier") + ok.String(*v.LogGroupIdentifier) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDeleteDeliveryDestinationInput(v *DeleteDeliveryDestinationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDeleteDeliveryDestinationPolicyInput(v *DeleteDeliveryDestinationPolicyInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DeliveryDestinationName != nil { + ok := object.Key("deliveryDestinationName") + ok.String(*v.DeliveryDestinationName) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDeleteDeliveryInput(v *DeleteDeliveryInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Id != nil { + ok := object.Key("id") + ok.String(*v.Id) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDeleteDeliverySourceInput(v *DeleteDeliverySourceInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDeleteDestinationInput(v *DeleteDestinationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DestinationName != nil { + ok := object.Key("destinationName") + ok.String(*v.DestinationName) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDeleteIndexPolicyInput(v *DeleteIndexPolicyInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LogGroupIdentifier != nil { + ok := object.Key("logGroupIdentifier") + ok.String(*v.LogGroupIdentifier) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDeleteIntegrationInput(v *DeleteIntegrationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Force { + ok := object.Key("force") + ok.Boolean(v.Force) + } + + if v.IntegrationName != nil { + ok := object.Key("integrationName") + ok.String(*v.IntegrationName) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDeleteLogAnomalyDetectorInput(v *DeleteLogAnomalyDetectorInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AnomalyDetectorArn != nil { + ok := object.Key("anomalyDetectorArn") + ok.String(*v.AnomalyDetectorArn) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDeleteLogGroupInput(v *DeleteLogGroupInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LogGroupName != nil { + ok := object.Key("logGroupName") + ok.String(*v.LogGroupName) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDeleteLogStreamInput(v *DeleteLogStreamInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LogGroupName != nil { + ok := object.Key("logGroupName") + ok.String(*v.LogGroupName) + } + + if v.LogStreamName != nil { + ok := object.Key("logStreamName") + ok.String(*v.LogStreamName) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDeleteLookupTableInput(v *DeleteLookupTableInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LookupTableArn != nil { + ok := object.Key("lookupTableArn") + ok.String(*v.LookupTableArn) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDeleteMetricFilterInput(v *DeleteMetricFilterInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.FilterName != nil { + ok := object.Key("filterName") + ok.String(*v.FilterName) + } + + if v.LogGroupName != nil { + ok := object.Key("logGroupName") + ok.String(*v.LogGroupName) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDeleteQueryDefinitionInput(v *DeleteQueryDefinitionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.QueryDefinitionId != nil { + ok := object.Key("queryDefinitionId") + ok.String(*v.QueryDefinitionId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDeleteResourcePolicyInput(v *DeleteResourcePolicyInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ExpectedRevisionId != nil { + ok := object.Key("expectedRevisionId") + ok.String(*v.ExpectedRevisionId) + } + + if v.PolicyName != nil { + ok := object.Key("policyName") + ok.String(*v.PolicyName) + } + + if v.ResourceArn != nil { + ok := object.Key("resourceArn") + ok.String(*v.ResourceArn) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDeleteRetentionPolicyInput(v *DeleteRetentionPolicyInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LogGroupName != nil { + ok := object.Key("logGroupName") + ok.String(*v.LogGroupName) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDeleteScheduledQueryInput(v *DeleteScheduledQueryInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Identifier != nil { + ok := object.Key("identifier") + ok.String(*v.Identifier) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDeleteSubscriptionFilterInput(v *DeleteSubscriptionFilterInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.FilterName != nil { + ok := object.Key("filterName") + ok.String(*v.FilterName) + } + + if v.LogGroupName != nil { + ok := object.Key("logGroupName") + ok.String(*v.LogGroupName) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDeleteTransformerInput(v *DeleteTransformerInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LogGroupIdentifier != nil { + ok := object.Key("logGroupIdentifier") + ok.String(*v.LogGroupIdentifier) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribeAccountPoliciesInput(v *DescribeAccountPoliciesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AccountIdentifiers != nil { + ok := object.Key("accountIdentifiers") + if err := awsAwsjson11_serializeDocumentAccountIds(v.AccountIdentifiers, ok); err != nil { + return err + } + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + if v.PolicyName != nil { + ok := object.Key("policyName") + ok.String(*v.PolicyName) + } + + if len(v.PolicyType) > 0 { + ok := object.Key("policyType") + ok.String(string(v.PolicyType)) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribeConfigurationTemplatesInput(v *DescribeConfigurationTemplatesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DeliveryDestinationTypes != nil { + ok := object.Key("deliveryDestinationTypes") + if err := awsAwsjson11_serializeDocumentDeliveryDestinationTypes(v.DeliveryDestinationTypes, ok); err != nil { + return err + } + } + + if v.Limit != nil { + ok := object.Key("limit") + ok.Integer(*v.Limit) + } + + if v.LogTypes != nil { + ok := object.Key("logTypes") + if err := awsAwsjson11_serializeDocumentLogTypes(v.LogTypes, ok); err != nil { + return err + } + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + if v.ResourceTypes != nil { + ok := object.Key("resourceTypes") + if err := awsAwsjson11_serializeDocumentResourceTypes(v.ResourceTypes, ok); err != nil { + return err + } + } + + if v.Service != nil { + ok := object.Key("service") + ok.String(*v.Service) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribeDeliveriesInput(v *DescribeDeliveriesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Limit != nil { + ok := object.Key("limit") + ok.Integer(*v.Limit) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribeDeliveryDestinationsInput(v *DescribeDeliveryDestinationsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Limit != nil { + ok := object.Key("limit") + ok.Integer(*v.Limit) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribeDeliverySourcesInput(v *DescribeDeliverySourcesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Limit != nil { + ok := object.Key("limit") + ok.Integer(*v.Limit) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribeDestinationsInput(v *DescribeDestinationsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DestinationNamePrefix != nil { + ok := object.Key("DestinationNamePrefix") + ok.String(*v.DestinationNamePrefix) + } + + if v.Limit != nil { + ok := object.Key("limit") + ok.Integer(*v.Limit) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribeExportTasksInput(v *DescribeExportTasksInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Limit != nil { + ok := object.Key("limit") + ok.Integer(*v.Limit) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + if len(v.StatusCode) > 0 { + ok := object.Key("statusCode") + ok.String(string(v.StatusCode)) + } + + if v.TaskId != nil { + ok := object.Key("taskId") + ok.String(*v.TaskId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribeFieldIndexesInput(v *DescribeFieldIndexesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LogGroupIdentifiers != nil { + ok := object.Key("logGroupIdentifiers") + if err := awsAwsjson11_serializeDocumentDescribeFieldIndexesLogGroupIdentifiers(v.LogGroupIdentifiers, ok); err != nil { + return err + } + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribeImportTaskBatchesInput(v *DescribeImportTaskBatchesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BatchImportStatus != nil { + ok := object.Key("batchImportStatus") + if err := awsAwsjson11_serializeDocumentImportStatusList(v.BatchImportStatus, ok); err != nil { + return err + } + } + + if v.ImportId != nil { + ok := object.Key("importId") + ok.String(*v.ImportId) + } + + if v.Limit != nil { + ok := object.Key("limit") + ok.Integer(*v.Limit) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribeImportTasksInput(v *DescribeImportTasksInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ImportId != nil { + ok := object.Key("importId") + ok.String(*v.ImportId) + } + + if v.ImportSourceArn != nil { + ok := object.Key("importSourceArn") + ok.String(*v.ImportSourceArn) + } + + if len(v.ImportStatus) > 0 { + ok := object.Key("importStatus") + ok.String(string(v.ImportStatus)) + } + + if v.Limit != nil { + ok := object.Key("limit") + ok.Integer(*v.Limit) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribeIndexPoliciesInput(v *DescribeIndexPoliciesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LogGroupIdentifiers != nil { + ok := object.Key("logGroupIdentifiers") + if err := awsAwsjson11_serializeDocumentDescribeIndexPoliciesLogGroupIdentifiers(v.LogGroupIdentifiers, ok); err != nil { + return err + } + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribeLogGroupsInput(v *DescribeLogGroupsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AccountIdentifiers != nil { + ok := object.Key("accountIdentifiers") + if err := awsAwsjson11_serializeDocumentAccountIds(v.AccountIdentifiers, ok); err != nil { + return err + } + } + + if v.IncludeLinkedAccounts != nil { + ok := object.Key("includeLinkedAccounts") + ok.Boolean(*v.IncludeLinkedAccounts) + } + + if v.Limit != nil { + ok := object.Key("limit") + ok.Integer(*v.Limit) + } + + if len(v.LogGroupClass) > 0 { + ok := object.Key("logGroupClass") + ok.String(string(v.LogGroupClass)) + } + + if v.LogGroupIdentifiers != nil { + ok := object.Key("logGroupIdentifiers") + if err := awsAwsjson11_serializeDocumentDescribeLogGroupsLogGroupIdentifiers(v.LogGroupIdentifiers, ok); err != nil { + return err + } + } + + if v.LogGroupNamePattern != nil { + ok := object.Key("logGroupNamePattern") + ok.String(*v.LogGroupNamePattern) + } + + if v.LogGroupNamePrefix != nil { + ok := object.Key("logGroupNamePrefix") + ok.String(*v.LogGroupNamePrefix) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribeLogStreamsInput(v *DescribeLogStreamsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Descending != nil { + ok := object.Key("descending") + ok.Boolean(*v.Descending) + } + + if v.Limit != nil { + ok := object.Key("limit") + ok.Integer(*v.Limit) + } + + if v.LogGroupIdentifier != nil { + ok := object.Key("logGroupIdentifier") + ok.String(*v.LogGroupIdentifier) + } + + if v.LogGroupName != nil { + ok := object.Key("logGroupName") + ok.String(*v.LogGroupName) + } + + if v.LogStreamNamePrefix != nil { + ok := object.Key("logStreamNamePrefix") + ok.String(*v.LogStreamNamePrefix) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + if len(v.OrderBy) > 0 { + ok := object.Key("orderBy") + ok.String(string(v.OrderBy)) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribeLookupTablesInput(v *DescribeLookupTablesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LookupTableNamePrefix != nil { + ok := object.Key("lookupTableNamePrefix") + ok.String(*v.LookupTableNamePrefix) + } + + if v.MaxResults != 0 { + ok := object.Key("maxResults") + ok.Integer(v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribeMetricFiltersInput(v *DescribeMetricFiltersInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.FilterNamePrefix != nil { + ok := object.Key("filterNamePrefix") + ok.String(*v.FilterNamePrefix) + } + + if v.Limit != nil { + ok := object.Key("limit") + ok.Integer(*v.Limit) + } + + if v.LogGroupName != nil { + ok := object.Key("logGroupName") + ok.String(*v.LogGroupName) + } + + if v.MetricName != nil { + ok := object.Key("metricName") + ok.String(*v.MetricName) + } + + if v.MetricNamespace != nil { + ok := object.Key("metricNamespace") + ok.String(*v.MetricNamespace) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribeQueriesInput(v *DescribeQueriesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LogGroupName != nil { + ok := object.Key("logGroupName") + ok.String(*v.LogGroupName) + } + + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + if len(v.QueryLanguage) > 0 { + ok := object.Key("queryLanguage") + ok.String(string(v.QueryLanguage)) + } + + if len(v.Status) > 0 { + ok := object.Key("status") + ok.String(string(v.Status)) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribeQueryDefinitionsInput(v *DescribeQueryDefinitionsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + if v.QueryDefinitionNamePrefix != nil { + ok := object.Key("queryDefinitionNamePrefix") + ok.String(*v.QueryDefinitionNamePrefix) + } + + if len(v.QueryLanguage) > 0 { + ok := object.Key("queryLanguage") + ok.String(string(v.QueryLanguage)) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribeResourcePoliciesInput(v *DescribeResourcePoliciesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Limit != nil { + ok := object.Key("limit") + ok.Integer(*v.Limit) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + if len(v.PolicyScope) > 0 { + ok := object.Key("policyScope") + ok.String(string(v.PolicyScope)) + } + + if v.ResourceArn != nil { + ok := object.Key("resourceArn") + ok.String(*v.ResourceArn) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribeSubscriptionFiltersInput(v *DescribeSubscriptionFiltersInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.FilterNamePrefix != nil { + ok := object.Key("filterNamePrefix") + ok.String(*v.FilterNamePrefix) + } + + if v.Limit != nil { + ok := object.Key("limit") + ok.Integer(*v.Limit) + } + + if v.LogGroupName != nil { + ok := object.Key("logGroupName") + ok.String(*v.LogGroupName) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDisassociateKmsKeyInput(v *DisassociateKmsKeyInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LogGroupName != nil { + ok := object.Key("logGroupName") + ok.String(*v.LogGroupName) + } + + if v.ResourceIdentifier != nil { + ok := object.Key("resourceIdentifier") + ok.String(*v.ResourceIdentifier) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDisassociateSourceFromS3TableIntegrationInput(v *DisassociateSourceFromS3TableIntegrationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Identifier != nil { + ok := object.Key("identifier") + ok.String(*v.Identifier) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentFilterLogEventsInput(v *FilterLogEventsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.EndTime != nil { + ok := object.Key("endTime") + ok.Long(*v.EndTime) + } + + if v.FilterPattern != nil { + ok := object.Key("filterPattern") + ok.String(*v.FilterPattern) + } + + if v.Interleaved != nil { + ok := object.Key("interleaved") + ok.Boolean(*v.Interleaved) + } + + if v.Limit != nil { + ok := object.Key("limit") + ok.Integer(*v.Limit) + } + + if v.LogGroupIdentifier != nil { + ok := object.Key("logGroupIdentifier") + ok.String(*v.LogGroupIdentifier) + } + + if v.LogGroupName != nil { + ok := object.Key("logGroupName") + ok.String(*v.LogGroupName) + } + + if v.LogStreamNamePrefix != nil { + ok := object.Key("logStreamNamePrefix") + ok.String(*v.LogStreamNamePrefix) + } + + if v.LogStreamNames != nil { + ok := object.Key("logStreamNames") + if err := awsAwsjson11_serializeDocumentInputLogStreamNames(v.LogStreamNames, ok); err != nil { + return err + } + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + if v.StartTime != nil { + ok := object.Key("startTime") + ok.Long(*v.StartTime) + } + + if v.Unmask { + ok := object.Key("unmask") + ok.Boolean(v.Unmask) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentGetDataProtectionPolicyInput(v *GetDataProtectionPolicyInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LogGroupIdentifier != nil { + ok := object.Key("logGroupIdentifier") + ok.String(*v.LogGroupIdentifier) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentGetDeliveryDestinationInput(v *GetDeliveryDestinationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentGetDeliveryDestinationPolicyInput(v *GetDeliveryDestinationPolicyInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DeliveryDestinationName != nil { + ok := object.Key("deliveryDestinationName") + ok.String(*v.DeliveryDestinationName) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentGetDeliveryInput(v *GetDeliveryInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Id != nil { + ok := object.Key("id") + ok.String(*v.Id) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentGetDeliverySourceInput(v *GetDeliverySourceInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentGetIntegrationInput(v *GetIntegrationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.IntegrationName != nil { + ok := object.Key("integrationName") + ok.String(*v.IntegrationName) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentGetLogAnomalyDetectorInput(v *GetLogAnomalyDetectorInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AnomalyDetectorArn != nil { + ok := object.Key("anomalyDetectorArn") + ok.String(*v.AnomalyDetectorArn) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentGetLogEventsInput(v *GetLogEventsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.EndTime != nil { + ok := object.Key("endTime") + ok.Long(*v.EndTime) + } + + if v.Limit != nil { + ok := object.Key("limit") + ok.Integer(*v.Limit) + } + + if v.LogGroupIdentifier != nil { + ok := object.Key("logGroupIdentifier") + ok.String(*v.LogGroupIdentifier) + } + + if v.LogGroupName != nil { + ok := object.Key("logGroupName") + ok.String(*v.LogGroupName) + } + + if v.LogStreamName != nil { + ok := object.Key("logStreamName") + ok.String(*v.LogStreamName) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + if v.StartFromHead != nil { + ok := object.Key("startFromHead") + ok.Boolean(*v.StartFromHead) + } + + if v.StartTime != nil { + ok := object.Key("startTime") + ok.Long(*v.StartTime) + } + + if v.Unmask { + ok := object.Key("unmask") + ok.Boolean(v.Unmask) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentGetLogFieldsInput(v *GetLogFieldsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DataSourceName != nil { + ok := object.Key("dataSourceName") + ok.String(*v.DataSourceName) + } + + if v.DataSourceType != nil { + ok := object.Key("dataSourceType") + ok.String(*v.DataSourceType) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentGetLogGroupFieldsInput(v *GetLogGroupFieldsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LogGroupIdentifier != nil { + ok := object.Key("logGroupIdentifier") + ok.String(*v.LogGroupIdentifier) + } + + if v.LogGroupName != nil { + ok := object.Key("logGroupName") + ok.String(*v.LogGroupName) + } + + if v.Time != nil { + ok := object.Key("time") + ok.Long(*v.Time) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentGetLogObjectInput(v *GetLogObjectInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LogObjectPointer != nil { + ok := object.Key("logObjectPointer") + ok.String(*v.LogObjectPointer) + } + + if v.Unmask { + ok := object.Key("unmask") + ok.Boolean(v.Unmask) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentGetLogRecordInput(v *GetLogRecordInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LogRecordPointer != nil { + ok := object.Key("logRecordPointer") + ok.String(*v.LogRecordPointer) + } + + if v.Unmask { + ok := object.Key("unmask") + ok.Boolean(v.Unmask) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentGetLookupTableInput(v *GetLookupTableInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LookupTableArn != nil { + ok := object.Key("lookupTableArn") + ok.String(*v.LookupTableArn) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentGetQueryResultsInput(v *GetQueryResultsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.QueryId != nil { + ok := object.Key("queryId") + ok.String(*v.QueryId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentGetScheduledQueryHistoryInput(v *GetScheduledQueryHistoryInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.EndTime != nil { + ok := object.Key("endTime") + ok.Long(*v.EndTime) + } + + if v.ExecutionStatuses != nil { + ok := object.Key("executionStatuses") + if err := awsAwsjson11_serializeDocumentExecutionStatusList(v.ExecutionStatuses, ok); err != nil { + return err + } + } + + if v.Identifier != nil { + ok := object.Key("identifier") + ok.String(*v.Identifier) + } + + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + if v.StartTime != nil { + ok := object.Key("startTime") + ok.Long(*v.StartTime) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentGetScheduledQueryInput(v *GetScheduledQueryInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Identifier != nil { + ok := object.Key("identifier") + ok.String(*v.Identifier) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentGetTransformerInput(v *GetTransformerInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LogGroupIdentifier != nil { + ok := object.Key("logGroupIdentifier") + ok.String(*v.LogGroupIdentifier) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentListAggregateLogGroupSummariesInput(v *ListAggregateLogGroupSummariesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AccountIdentifiers != nil { + ok := object.Key("accountIdentifiers") + if err := awsAwsjson11_serializeDocumentAccountIds(v.AccountIdentifiers, ok); err != nil { + return err + } + } + + if v.DataSources != nil { + ok := object.Key("dataSources") + if err := awsAwsjson11_serializeDocumentDataSourceFilters(v.DataSources, ok); err != nil { + return err + } + } + + if len(v.GroupBy) > 0 { + ok := object.Key("groupBy") + ok.String(string(v.GroupBy)) + } + + if v.IncludeLinkedAccounts != nil { + ok := object.Key("includeLinkedAccounts") + ok.Boolean(*v.IncludeLinkedAccounts) + } + + if v.Limit != nil { + ok := object.Key("limit") + ok.Integer(*v.Limit) + } + + if len(v.LogGroupClass) > 0 { + ok := object.Key("logGroupClass") + ok.String(string(v.LogGroupClass)) + } + + if v.LogGroupNamePattern != nil { + ok := object.Key("logGroupNamePattern") + ok.String(*v.LogGroupNamePattern) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentListAnomaliesInput(v *ListAnomaliesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AnomalyDetectorArn != nil { + ok := object.Key("anomalyDetectorArn") + ok.String(*v.AnomalyDetectorArn) + } + + if v.Limit != nil { + ok := object.Key("limit") + ok.Integer(*v.Limit) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + if len(v.SuppressionState) > 0 { + ok := object.Key("suppressionState") + ok.String(string(v.SuppressionState)) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentListIntegrationsInput(v *ListIntegrationsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.IntegrationNamePrefix != nil { + ok := object.Key("integrationNamePrefix") + ok.String(*v.IntegrationNamePrefix) + } + + if len(v.IntegrationStatus) > 0 { + ok := object.Key("integrationStatus") + ok.String(string(v.IntegrationStatus)) + } + + if len(v.IntegrationType) > 0 { + ok := object.Key("integrationType") + ok.String(string(v.IntegrationType)) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentListLogAnomalyDetectorsInput(v *ListLogAnomalyDetectorsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.FilterLogGroupArn != nil { + ok := object.Key("filterLogGroupArn") + ok.String(*v.FilterLogGroupArn) + } + + if v.Limit != nil { + ok := object.Key("limit") + ok.Integer(*v.Limit) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentListLogGroupsForQueryInput(v *ListLogGroupsForQueryInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + if v.QueryId != nil { + ok := object.Key("queryId") + ok.String(*v.QueryId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentListLogGroupsInput(v *ListLogGroupsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AccountIdentifiers != nil { + ok := object.Key("accountIdentifiers") + if err := awsAwsjson11_serializeDocumentAccountIds(v.AccountIdentifiers, ok); err != nil { + return err + } + } + + if v.DataSources != nil { + ok := object.Key("dataSources") + if err := awsAwsjson11_serializeDocumentDataSourceFilters(v.DataSources, ok); err != nil { + return err + } + } + + if v.FieldIndexNames != nil { + ok := object.Key("fieldIndexNames") + if err := awsAwsjson11_serializeDocumentFieldIndexNames(v.FieldIndexNames, ok); err != nil { + return err + } + } + + if v.IncludeLinkedAccounts != nil { + ok := object.Key("includeLinkedAccounts") + ok.Boolean(*v.IncludeLinkedAccounts) + } + + if v.Limit != nil { + ok := object.Key("limit") + ok.Integer(*v.Limit) + } + + if len(v.LogGroupClass) > 0 { + ok := object.Key("logGroupClass") + ok.String(string(v.LogGroupClass)) + } + + if v.LogGroupNamePattern != nil { + ok := object.Key("logGroupNamePattern") + ok.String(*v.LogGroupNamePattern) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentListScheduledQueriesInput(v *ListScheduledQueriesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + if len(v.State) > 0 { + ok := object.Key("state") + ok.String(string(v.State)) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentListSourcesForS3TableIntegrationInput(v *ListSourcesForS3TableIntegrationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.IntegrationArn != nil { + ok := object.Key("integrationArn") + ok.String(*v.IntegrationArn) + } + + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentListTagsForResourceInput(v *ListTagsForResourceInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ResourceArn != nil { + ok := object.Key("resourceArn") + ok.String(*v.ResourceArn) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentListTagsLogGroupInput(v *ListTagsLogGroupInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LogGroupName != nil { + ok := object.Key("logGroupName") + ok.String(*v.LogGroupName) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentPutAccountPolicyInput(v *PutAccountPolicyInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.PolicyDocument != nil { + ok := object.Key("policyDocument") + ok.String(*v.PolicyDocument) + } + + if v.PolicyName != nil { + ok := object.Key("policyName") + ok.String(*v.PolicyName) + } + + if len(v.PolicyType) > 0 { + ok := object.Key("policyType") + ok.String(string(v.PolicyType)) + } + + if len(v.Scope) > 0 { + ok := object.Key("scope") + ok.String(string(v.Scope)) + } + + if v.SelectionCriteria != nil { + ok := object.Key("selectionCriteria") + ok.String(*v.SelectionCriteria) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentPutBearerTokenAuthenticationInput(v *PutBearerTokenAuthenticationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BearerTokenAuthenticationEnabled != nil { + ok := object.Key("bearerTokenAuthenticationEnabled") + ok.Boolean(*v.BearerTokenAuthenticationEnabled) + } + + if v.LogGroupIdentifier != nil { + ok := object.Key("logGroupIdentifier") + ok.String(*v.LogGroupIdentifier) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentPutDataProtectionPolicyInput(v *PutDataProtectionPolicyInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LogGroupIdentifier != nil { + ok := object.Key("logGroupIdentifier") + ok.String(*v.LogGroupIdentifier) + } + + if v.PolicyDocument != nil { + ok := object.Key("policyDocument") + ok.String(*v.PolicyDocument) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentPutDeliveryDestinationInput(v *PutDeliveryDestinationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DeliveryDestinationConfiguration != nil { + ok := object.Key("deliveryDestinationConfiguration") + if err := awsAwsjson11_serializeDocumentDeliveryDestinationConfiguration(v.DeliveryDestinationConfiguration, ok); err != nil { + return err + } + } + + if len(v.DeliveryDestinationType) > 0 { + ok := object.Key("deliveryDestinationType") + ok.String(string(v.DeliveryDestinationType)) + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if len(v.OutputFormat) > 0 { + ok := object.Key("outputFormat") + ok.String(string(v.OutputFormat)) + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsAwsjson11_serializeDocumentTags(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentPutDeliveryDestinationPolicyInput(v *PutDeliveryDestinationPolicyInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DeliveryDestinationName != nil { + ok := object.Key("deliveryDestinationName") + ok.String(*v.DeliveryDestinationName) + } + + if v.DeliveryDestinationPolicy != nil { + ok := object.Key("deliveryDestinationPolicy") + ok.String(*v.DeliveryDestinationPolicy) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentPutDeliverySourceInput(v *PutDeliverySourceInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LogType != nil { + ok := object.Key("logType") + ok.String(*v.LogType) + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.ResourceArn != nil { + ok := object.Key("resourceArn") + ok.String(*v.ResourceArn) + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsAwsjson11_serializeDocumentTags(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentPutDestinationInput(v *PutDestinationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DestinationName != nil { + ok := object.Key("destinationName") + ok.String(*v.DestinationName) + } + + if v.RoleArn != nil { + ok := object.Key("roleArn") + ok.String(*v.RoleArn) + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsAwsjson11_serializeDocumentTags(v.Tags, ok); err != nil { + return err + } + } + + if v.TargetArn != nil { + ok := object.Key("targetArn") + ok.String(*v.TargetArn) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentPutDestinationPolicyInput(v *PutDestinationPolicyInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AccessPolicy != nil { + ok := object.Key("accessPolicy") + ok.String(*v.AccessPolicy) + } + + if v.DestinationName != nil { + ok := object.Key("destinationName") + ok.String(*v.DestinationName) + } + + if v.ForceUpdate != nil { + ok := object.Key("forceUpdate") + ok.Boolean(*v.ForceUpdate) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentPutIndexPolicyInput(v *PutIndexPolicyInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LogGroupIdentifier != nil { + ok := object.Key("logGroupIdentifier") + ok.String(*v.LogGroupIdentifier) + } + + if v.PolicyDocument != nil { + ok := object.Key("policyDocument") + ok.String(*v.PolicyDocument) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentPutIntegrationInput(v *PutIntegrationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.IntegrationName != nil { + ok := object.Key("integrationName") + ok.String(*v.IntegrationName) + } + + if len(v.IntegrationType) > 0 { + ok := object.Key("integrationType") + ok.String(string(v.IntegrationType)) + } + + if v.ResourceConfig != nil { + ok := object.Key("resourceConfig") + if err := awsAwsjson11_serializeDocumentResourceConfig(v.ResourceConfig, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentPutLogEventsInput(v *PutLogEventsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Entity != nil { + ok := object.Key("entity") + if err := awsAwsjson11_serializeDocumentEntity(v.Entity, ok); err != nil { + return err + } + } + + if v.LogEvents != nil { + ok := object.Key("logEvents") + if err := awsAwsjson11_serializeDocumentInputLogEvents(v.LogEvents, ok); err != nil { + return err + } + } + + if v.LogGroupName != nil { + ok := object.Key("logGroupName") + ok.String(*v.LogGroupName) + } + + if v.LogStreamName != nil { + ok := object.Key("logStreamName") + ok.String(*v.LogStreamName) + } + + if v.SequenceToken != nil { + ok := object.Key("sequenceToken") + ok.String(*v.SequenceToken) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentPutLogGroupDeletionProtectionInput(v *PutLogGroupDeletionProtectionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DeletionProtectionEnabled != nil { + ok := object.Key("deletionProtectionEnabled") + ok.Boolean(*v.DeletionProtectionEnabled) + } + + if v.LogGroupIdentifier != nil { + ok := object.Key("logGroupIdentifier") + ok.String(*v.LogGroupIdentifier) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentPutMetricFilterInput(v *PutMetricFilterInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ApplyOnTransformedLogs { + ok := object.Key("applyOnTransformedLogs") + ok.Boolean(v.ApplyOnTransformedLogs) + } + + if v.EmitSystemFieldDimensions != nil { + ok := object.Key("emitSystemFieldDimensions") + if err := awsAwsjson11_serializeDocumentEmitSystemFields(v.EmitSystemFieldDimensions, ok); err != nil { + return err + } + } + + if v.FieldSelectionCriteria != nil { + ok := object.Key("fieldSelectionCriteria") + ok.String(*v.FieldSelectionCriteria) + } + + if v.FilterName != nil { + ok := object.Key("filterName") + ok.String(*v.FilterName) + } + + if v.FilterPattern != nil { + ok := object.Key("filterPattern") + ok.String(*v.FilterPattern) + } + + if v.LogGroupName != nil { + ok := object.Key("logGroupName") + ok.String(*v.LogGroupName) + } + + if v.MetricTransformations != nil { + ok := object.Key("metricTransformations") + if err := awsAwsjson11_serializeDocumentMetricTransformations(v.MetricTransformations, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentPutQueryDefinitionInput(v *PutQueryDefinitionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + if v.LogGroupNames != nil { + ok := object.Key("logGroupNames") + if err := awsAwsjson11_serializeDocumentLogGroupNames(v.LogGroupNames, ok); err != nil { + return err + } + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.Parameters != nil { + ok := object.Key("parameters") + if err := awsAwsjson11_serializeDocumentQueryParameterList(v.Parameters, ok); err != nil { + return err + } + } + + if v.QueryDefinitionId != nil { + ok := object.Key("queryDefinitionId") + ok.String(*v.QueryDefinitionId) + } + + if len(v.QueryLanguage) > 0 { + ok := object.Key("queryLanguage") + ok.String(string(v.QueryLanguage)) + } + + if v.QueryString != nil { + ok := object.Key("queryString") + ok.String(*v.QueryString) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentPutResourcePolicyInput(v *PutResourcePolicyInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ExpectedRevisionId != nil { + ok := object.Key("expectedRevisionId") + ok.String(*v.ExpectedRevisionId) + } + + if v.PolicyDocument != nil { + ok := object.Key("policyDocument") + ok.String(*v.PolicyDocument) + } + + if v.PolicyName != nil { + ok := object.Key("policyName") + ok.String(*v.PolicyName) + } + + if v.ResourceArn != nil { + ok := object.Key("resourceArn") + ok.String(*v.ResourceArn) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentPutRetentionPolicyInput(v *PutRetentionPolicyInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LogGroupName != nil { + ok := object.Key("logGroupName") + ok.String(*v.LogGroupName) + } + + if v.RetentionInDays != nil { + ok := object.Key("retentionInDays") + ok.Integer(*v.RetentionInDays) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentPutSubscriptionFilterInput(v *PutSubscriptionFilterInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ApplyOnTransformedLogs { + ok := object.Key("applyOnTransformedLogs") + ok.Boolean(v.ApplyOnTransformedLogs) + } + + if v.DestinationArn != nil { + ok := object.Key("destinationArn") + ok.String(*v.DestinationArn) + } + + if len(v.Distribution) > 0 { + ok := object.Key("distribution") + ok.String(string(v.Distribution)) + } + + if v.EmitSystemFields != nil { + ok := object.Key("emitSystemFields") + if err := awsAwsjson11_serializeDocumentEmitSystemFields(v.EmitSystemFields, ok); err != nil { + return err + } + } + + if v.FieldSelectionCriteria != nil { + ok := object.Key("fieldSelectionCriteria") + ok.String(*v.FieldSelectionCriteria) + } + + if v.FilterName != nil { + ok := object.Key("filterName") + ok.String(*v.FilterName) + } + + if v.FilterPattern != nil { + ok := object.Key("filterPattern") + ok.String(*v.FilterPattern) + } + + if v.LogGroupName != nil { + ok := object.Key("logGroupName") + ok.String(*v.LogGroupName) + } + + if v.RoleArn != nil { + ok := object.Key("roleArn") + ok.String(*v.RoleArn) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentPutTransformerInput(v *PutTransformerInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LogGroupIdentifier != nil { + ok := object.Key("logGroupIdentifier") + ok.String(*v.LogGroupIdentifier) + } + + if v.TransformerConfig != nil { + ok := object.Key("transformerConfig") + if err := awsAwsjson11_serializeDocumentProcessors(v.TransformerConfig, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentStartLiveTailInput(v *StartLiveTailInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LogEventFilterPattern != nil { + ok := object.Key("logEventFilterPattern") + ok.String(*v.LogEventFilterPattern) + } + + if v.LogGroupIdentifiers != nil { + ok := object.Key("logGroupIdentifiers") + if err := awsAwsjson11_serializeDocumentStartLiveTailLogGroupIdentifiers(v.LogGroupIdentifiers, ok); err != nil { + return err + } + } + + if v.LogStreamNamePrefixes != nil { + ok := object.Key("logStreamNamePrefixes") + if err := awsAwsjson11_serializeDocumentInputLogStreamNames(v.LogStreamNamePrefixes, ok); err != nil { + return err + } + } + + if v.LogStreamNames != nil { + ok := object.Key("logStreamNames") + if err := awsAwsjson11_serializeDocumentInputLogStreamNames(v.LogStreamNames, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentStartQueryInput(v *StartQueryInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.EndTime != nil { + ok := object.Key("endTime") + ok.Long(*v.EndTime) + } + + if v.Limit != nil { + ok := object.Key("limit") + ok.Integer(*v.Limit) + } + + if v.LogGroupIdentifiers != nil { + ok := object.Key("logGroupIdentifiers") + if err := awsAwsjson11_serializeDocumentLogGroupIdentifiers(v.LogGroupIdentifiers, ok); err != nil { + return err + } + } + + if v.LogGroupName != nil { + ok := object.Key("logGroupName") + ok.String(*v.LogGroupName) + } + + if v.LogGroupNames != nil { + ok := object.Key("logGroupNames") + if err := awsAwsjson11_serializeDocumentLogGroupNames(v.LogGroupNames, ok); err != nil { + return err + } + } + + if len(v.QueryLanguage) > 0 { + ok := object.Key("queryLanguage") + ok.String(string(v.QueryLanguage)) + } + + if v.QueryString != nil { + ok := object.Key("queryString") + ok.String(*v.QueryString) + } + + if v.StartTime != nil { + ok := object.Key("startTime") + ok.Long(*v.StartTime) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentStopQueryInput(v *StopQueryInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.QueryId != nil { + ok := object.Key("queryId") + ok.String(*v.QueryId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentTagLogGroupInput(v *TagLogGroupInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LogGroupName != nil { + ok := object.Key("logGroupName") + ok.String(*v.LogGroupName) + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsAwsjson11_serializeDocumentTags(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ResourceArn != nil { + ok := object.Key("resourceArn") + ok.String(*v.ResourceArn) + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsAwsjson11_serializeDocumentTags(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentTestMetricFilterInput(v *TestMetricFilterInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.FilterPattern != nil { + ok := object.Key("filterPattern") + ok.String(*v.FilterPattern) + } + + if v.LogEventMessages != nil { + ok := object.Key("logEventMessages") + if err := awsAwsjson11_serializeDocumentTestEventMessages(v.LogEventMessages, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentTestTransformerInput(v *TestTransformerInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LogEventMessages != nil { + ok := object.Key("logEventMessages") + if err := awsAwsjson11_serializeDocumentTestEventMessages(v.LogEventMessages, ok); err != nil { + return err + } + } + + if v.TransformerConfig != nil { + ok := object.Key("transformerConfig") + if err := awsAwsjson11_serializeDocumentProcessors(v.TransformerConfig, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentUntagLogGroupInput(v *UntagLogGroupInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LogGroupName != nil { + ok := object.Key("logGroupName") + ok.String(*v.LogGroupName) + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentUntagResourceInput(v *UntagResourceInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ResourceArn != nil { + ok := object.Key("resourceArn") + ok.String(*v.ResourceArn) + } + + if v.TagKeys != nil { + ok := object.Key("tagKeys") + if err := awsAwsjson11_serializeDocumentTagKeyList(v.TagKeys, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentUpdateAnomalyInput(v *UpdateAnomalyInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AnomalyDetectorArn != nil { + ok := object.Key("anomalyDetectorArn") + ok.String(*v.AnomalyDetectorArn) + } + + if v.AnomalyId != nil { + ok := object.Key("anomalyId") + ok.String(*v.AnomalyId) + } + + if v.Baseline != nil { + ok := object.Key("baseline") + ok.Boolean(*v.Baseline) + } + + if v.PatternId != nil { + ok := object.Key("patternId") + ok.String(*v.PatternId) + } + + if v.SuppressionPeriod != nil { + ok := object.Key("suppressionPeriod") + if err := awsAwsjson11_serializeDocumentSuppressionPeriod(v.SuppressionPeriod, ok); err != nil { + return err + } + } + + if len(v.SuppressionType) > 0 { + ok := object.Key("suppressionType") + ok.String(string(v.SuppressionType)) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentUpdateDeliveryConfigurationInput(v *UpdateDeliveryConfigurationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.FieldDelimiter != nil { + ok := object.Key("fieldDelimiter") + ok.String(*v.FieldDelimiter) + } + + if v.Id != nil { + ok := object.Key("id") + ok.String(*v.Id) + } + + if v.RecordFields != nil { + ok := object.Key("recordFields") + if err := awsAwsjson11_serializeDocumentRecordFields(v.RecordFields, ok); err != nil { + return err + } + } + + if v.S3DeliveryConfiguration != nil { + ok := object.Key("s3DeliveryConfiguration") + if err := awsAwsjson11_serializeDocumentS3DeliveryConfiguration(v.S3DeliveryConfiguration, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentUpdateLogAnomalyDetectorInput(v *UpdateLogAnomalyDetectorInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AnomalyDetectorArn != nil { + ok := object.Key("anomalyDetectorArn") + ok.String(*v.AnomalyDetectorArn) + } + + if v.AnomalyVisibilityTime != nil { + ok := object.Key("anomalyVisibilityTime") + ok.Long(*v.AnomalyVisibilityTime) + } + + if v.Enabled != nil { + ok := object.Key("enabled") + ok.Boolean(*v.Enabled) + } + + if len(v.EvaluationFrequency) > 0 { + ok := object.Key("evaluationFrequency") + ok.String(string(v.EvaluationFrequency)) + } + + if v.FilterPattern != nil { + ok := object.Key("filterPattern") + ok.String(*v.FilterPattern) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentUpdateLookupTableInput(v *UpdateLookupTableInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + if v.KmsKeyId != nil { + ok := object.Key("kmsKeyId") + ok.String(*v.KmsKeyId) + } + + if v.LookupTableArn != nil { + ok := object.Key("lookupTableArn") + ok.String(*v.LookupTableArn) + } + + if v.TableBody != nil { + ok := object.Key("tableBody") + ok.String(*v.TableBody) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentUpdateScheduledQueryInput(v *UpdateScheduledQueryInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + if v.DestinationConfiguration != nil { + ok := object.Key("destinationConfiguration") + if err := awsAwsjson11_serializeDocumentDestinationConfiguration(v.DestinationConfiguration, ok); err != nil { + return err + } + } + + if v.ExecutionRoleArn != nil { + ok := object.Key("executionRoleArn") + ok.String(*v.ExecutionRoleArn) + } + + if v.Identifier != nil { + ok := object.Key("identifier") + ok.String(*v.Identifier) + } + + if v.LogGroupIdentifiers != nil { + ok := object.Key("logGroupIdentifiers") + if err := awsAwsjson11_serializeDocumentScheduledQueryLogGroupIdentifiers(v.LogGroupIdentifiers, ok); err != nil { + return err + } + } + + if len(v.QueryLanguage) > 0 { + ok := object.Key("queryLanguage") + ok.String(string(v.QueryLanguage)) + } + + if v.QueryString != nil { + ok := object.Key("queryString") + ok.String(*v.QueryString) + } + + if v.ScheduleEndTime != nil { + ok := object.Key("scheduleEndTime") + ok.Long(*v.ScheduleEndTime) + } + + if v.ScheduleExpression != nil { + ok := object.Key("scheduleExpression") + ok.String(*v.ScheduleExpression) + } + + if v.ScheduleStartTime != nil { + ok := object.Key("scheduleStartTime") + ok.Long(*v.ScheduleStartTime) + } + + if v.StartTimeOffset != nil { + ok := object.Key("startTimeOffset") + ok.Long(*v.StartTimeOffset) + } + + if len(v.State) > 0 { + ok := object.Key("state") + ok.String(string(v.State)) + } + + if v.Timezone != nil { + ok := object.Key("timezone") + ok.String(*v.Timezone) + } + + return nil +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types/enums.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types/enums.go new file mode 100644 index 00000000000..a5316f300b4 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types/enums.go @@ -0,0 +1,856 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +type ActionStatus string + +// Enum values for ActionStatus +const ( + ActionStatusInProgress ActionStatus = "IN_PROGRESS" + ActionStatusClientError ActionStatus = "CLIENT_ERROR" + ActionStatusFailed ActionStatus = "FAILED" + ActionStatusComplete ActionStatus = "COMPLETE" +) + +// Values returns all known values for ActionStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ActionStatus) Values() []ActionStatus { + return []ActionStatus{ + "IN_PROGRESS", + "CLIENT_ERROR", + "FAILED", + "COMPLETE", + } +} + +type AnomalyDetectorStatus string + +// Enum values for AnomalyDetectorStatus +const ( + AnomalyDetectorStatusInitializing AnomalyDetectorStatus = "INITIALIZING" + AnomalyDetectorStatusTraining AnomalyDetectorStatus = "TRAINING" + AnomalyDetectorStatusAnalyzing AnomalyDetectorStatus = "ANALYZING" + AnomalyDetectorStatusFailed AnomalyDetectorStatus = "FAILED" + AnomalyDetectorStatusDeleted AnomalyDetectorStatus = "DELETED" + AnomalyDetectorStatusPaused AnomalyDetectorStatus = "PAUSED" +) + +// Values returns all known values for AnomalyDetectorStatus. Note that this can +// be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (AnomalyDetectorStatus) Values() []AnomalyDetectorStatus { + return []AnomalyDetectorStatus{ + "INITIALIZING", + "TRAINING", + "ANALYZING", + "FAILED", + "DELETED", + "PAUSED", + } +} + +type DataProtectionStatus string + +// Enum values for DataProtectionStatus +const ( + DataProtectionStatusActivated DataProtectionStatus = "ACTIVATED" + DataProtectionStatusDeleted DataProtectionStatus = "DELETED" + DataProtectionStatusArchived DataProtectionStatus = "ARCHIVED" + DataProtectionStatusDisabled DataProtectionStatus = "DISABLED" +) + +// Values returns all known values for DataProtectionStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (DataProtectionStatus) Values() []DataProtectionStatus { + return []DataProtectionStatus{ + "ACTIVATED", + "DELETED", + "ARCHIVED", + "DISABLED", + } +} + +type DeliveryDestinationType string + +// Enum values for DeliveryDestinationType +const ( + DeliveryDestinationTypeS3 DeliveryDestinationType = "S3" + DeliveryDestinationTypeCwl DeliveryDestinationType = "CWL" + DeliveryDestinationTypeFh DeliveryDestinationType = "FH" + DeliveryDestinationTypeXray DeliveryDestinationType = "XRAY" +) + +// Values returns all known values for DeliveryDestinationType. Note that this can +// be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (DeliveryDestinationType) Values() []DeliveryDestinationType { + return []DeliveryDestinationType{ + "S3", + "CWL", + "FH", + "XRAY", + } +} + +type Distribution string + +// Enum values for Distribution +const ( + DistributionRandom Distribution = "Random" + DistributionByLogStream Distribution = "ByLogStream" +) + +// Values returns all known values for Distribution. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (Distribution) Values() []Distribution { + return []Distribution{ + "Random", + "ByLogStream", + } +} + +type EntityRejectionErrorType string + +// Enum values for EntityRejectionErrorType +const ( + EntityRejectionErrorTypeInvalidEntity EntityRejectionErrorType = "InvalidEntity" + EntityRejectionErrorTypeInvalidTypeValue EntityRejectionErrorType = "InvalidTypeValue" + EntityRejectionErrorTypeInvalidKeyAttribute EntityRejectionErrorType = "InvalidKeyAttributes" + EntityRejectionErrorTypeInvalidAttributes EntityRejectionErrorType = "InvalidAttributes" + EntityRejectionErrorTypeEntitySizeTooLarge EntityRejectionErrorType = "EntitySizeTooLarge" + EntityRejectionErrorTypeUnsupportedLogGroupType EntityRejectionErrorType = "UnsupportedLogGroupType" + EntityRejectionErrorTypeMissingRequiredFields EntityRejectionErrorType = "MissingRequiredFields" +) + +// Values returns all known values for EntityRejectionErrorType. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (EntityRejectionErrorType) Values() []EntityRejectionErrorType { + return []EntityRejectionErrorType{ + "InvalidEntity", + "InvalidTypeValue", + "InvalidKeyAttributes", + "InvalidAttributes", + "EntitySizeTooLarge", + "UnsupportedLogGroupType", + "MissingRequiredFields", + } +} + +type EvaluationFrequency string + +// Enum values for EvaluationFrequency +const ( + EvaluationFrequencyOneMin EvaluationFrequency = "ONE_MIN" + EvaluationFrequencyFiveMin EvaluationFrequency = "FIVE_MIN" + EvaluationFrequencyTenMin EvaluationFrequency = "TEN_MIN" + EvaluationFrequencyFifteenMin EvaluationFrequency = "FIFTEEN_MIN" + EvaluationFrequencyThirtyMin EvaluationFrequency = "THIRTY_MIN" + EvaluationFrequencyOneHour EvaluationFrequency = "ONE_HOUR" +) + +// Values returns all known values for EvaluationFrequency. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (EvaluationFrequency) Values() []EvaluationFrequency { + return []EvaluationFrequency{ + "ONE_MIN", + "FIVE_MIN", + "TEN_MIN", + "FIFTEEN_MIN", + "THIRTY_MIN", + "ONE_HOUR", + } +} + +type EventSource string + +// Enum values for EventSource +const ( + EventSourceCloudTrail EventSource = "CloudTrail" + EventSourceRoute53Resolver EventSource = "Route53Resolver" + EventSourceVpcFlow EventSource = "VPCFlow" + EventSourceEksAudit EventSource = "EKSAudit" + EventSourceAwswaf EventSource = "AWSWAF" +) + +// Values returns all known values for EventSource. Note that this can be expanded +// in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (EventSource) Values() []EventSource { + return []EventSource{ + "CloudTrail", + "Route53Resolver", + "VPCFlow", + "EKSAudit", + "AWSWAF", + } +} + +type ExecutionStatus string + +// Enum values for ExecutionStatus +const ( + ExecutionStatusRunning ExecutionStatus = "Running" + ExecutionStatusInvalidQuery ExecutionStatus = "InvalidQuery" + ExecutionStatusComplete ExecutionStatus = "Complete" + ExecutionStatusFailed ExecutionStatus = "Failed" + ExecutionStatusTimeout ExecutionStatus = "Timeout" +) + +// Values returns all known values for ExecutionStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ExecutionStatus) Values() []ExecutionStatus { + return []ExecutionStatus{ + "Running", + "InvalidQuery", + "Complete", + "Failed", + "Timeout", + } +} + +type ExportTaskStatusCode string + +// Enum values for ExportTaskStatusCode +const ( + ExportTaskStatusCodeCancelled ExportTaskStatusCode = "CANCELLED" + ExportTaskStatusCodeCompleted ExportTaskStatusCode = "COMPLETED" + ExportTaskStatusCodeFailed ExportTaskStatusCode = "FAILED" + ExportTaskStatusCodePending ExportTaskStatusCode = "PENDING" + ExportTaskStatusCodePendingCancel ExportTaskStatusCode = "PENDING_CANCEL" + ExportTaskStatusCodeRunning ExportTaskStatusCode = "RUNNING" +) + +// Values returns all known values for ExportTaskStatusCode. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ExportTaskStatusCode) Values() []ExportTaskStatusCode { + return []ExportTaskStatusCode{ + "CANCELLED", + "COMPLETED", + "FAILED", + "PENDING", + "PENDING_CANCEL", + "RUNNING", + } +} + +type FlattenedElement string + +// Enum values for FlattenedElement +const ( + FlattenedElementFirst FlattenedElement = "first" + FlattenedElementLast FlattenedElement = "last" +) + +// Values returns all known values for FlattenedElement. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (FlattenedElement) Values() []FlattenedElement { + return []FlattenedElement{ + "first", + "last", + } +} + +type ImportStatus string + +// Enum values for ImportStatus +const ( + ImportStatusInProgress ImportStatus = "IN_PROGRESS" + ImportStatusCancelled ImportStatus = "CANCELLED" + ImportStatusCompleted ImportStatus = "COMPLETED" + ImportStatusFailed ImportStatus = "FAILED" +) + +// Values returns all known values for ImportStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ImportStatus) Values() []ImportStatus { + return []ImportStatus{ + "IN_PROGRESS", + "CANCELLED", + "COMPLETED", + "FAILED", + } +} + +type IndexSource string + +// Enum values for IndexSource +const ( + IndexSourceAccount IndexSource = "ACCOUNT" + IndexSourceLogGroup IndexSource = "LOG_GROUP" +) + +// Values returns all known values for IndexSource. Note that this can be expanded +// in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (IndexSource) Values() []IndexSource { + return []IndexSource{ + "ACCOUNT", + "LOG_GROUP", + } +} + +type IndexType string + +// Enum values for IndexType +const ( + IndexTypeFacet IndexType = "FACET" + IndexTypeFieldIndex IndexType = "FIELD_INDEX" +) + +// Values returns all known values for IndexType. Note that this can be expanded +// in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (IndexType) Values() []IndexType { + return []IndexType{ + "FACET", + "FIELD_INDEX", + } +} + +type InheritedProperty string + +// Enum values for InheritedProperty +const ( + InheritedPropertyAccountDataProtection InheritedProperty = "ACCOUNT_DATA_PROTECTION" +) + +// Values returns all known values for InheritedProperty. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (InheritedProperty) Values() []InheritedProperty { + return []InheritedProperty{ + "ACCOUNT_DATA_PROTECTION", + } +} + +type IntegrationStatus string + +// Enum values for IntegrationStatus +const ( + IntegrationStatusProvisioning IntegrationStatus = "PROVISIONING" + IntegrationStatusActive IntegrationStatus = "ACTIVE" + IntegrationStatusFailed IntegrationStatus = "FAILED" +) + +// Values returns all known values for IntegrationStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (IntegrationStatus) Values() []IntegrationStatus { + return []IntegrationStatus{ + "PROVISIONING", + "ACTIVE", + "FAILED", + } +} + +type IntegrationType string + +// Enum values for IntegrationType +const ( + IntegrationTypeOpensearch IntegrationType = "OPENSEARCH" +) + +// Values returns all known values for IntegrationType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (IntegrationType) Values() []IntegrationType { + return []IntegrationType{ + "OPENSEARCH", + } +} + +type ListAggregateLogGroupSummariesGroupBy string + +// Enum values for ListAggregateLogGroupSummariesGroupBy +const ( + ListAggregateLogGroupSummariesGroupByDataSourceNameTypeAndFormat ListAggregateLogGroupSummariesGroupBy = "DATA_SOURCE_NAME_TYPE_AND_FORMAT" + ListAggregateLogGroupSummariesGroupByDataSourceNameAndType ListAggregateLogGroupSummariesGroupBy = "DATA_SOURCE_NAME_AND_TYPE" +) + +// Values returns all known values for ListAggregateLogGroupSummariesGroupBy. Note +// that this can be expanded in the future, and so it is only as up to date as the +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ListAggregateLogGroupSummariesGroupBy) Values() []ListAggregateLogGroupSummariesGroupBy { + return []ListAggregateLogGroupSummariesGroupBy{ + "DATA_SOURCE_NAME_TYPE_AND_FORMAT", + "DATA_SOURCE_NAME_AND_TYPE", + } +} + +type LogGroupClass string + +// Enum values for LogGroupClass +const ( + LogGroupClassStandard LogGroupClass = "STANDARD" + LogGroupClassInfrequentAccess LogGroupClass = "INFREQUENT_ACCESS" + LogGroupClassDelivery LogGroupClass = "DELIVERY" +) + +// Values returns all known values for LogGroupClass. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (LogGroupClass) Values() []LogGroupClass { + return []LogGroupClass{ + "STANDARD", + "INFREQUENT_ACCESS", + "DELIVERY", + } +} + +type OCSFVersion string + +// Enum values for OCSFVersion +const ( + OCSFVersionV11 OCSFVersion = "V1.1" + OCSFVersionV15 OCSFVersion = "V1.5" +) + +// Values returns all known values for OCSFVersion. Note that this can be expanded +// in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (OCSFVersion) Values() []OCSFVersion { + return []OCSFVersion{ + "V1.1", + "V1.5", + } +} + +type OpenSearchResourceStatusType string + +// Enum values for OpenSearchResourceStatusType +const ( + OpenSearchResourceStatusTypeActive OpenSearchResourceStatusType = "ACTIVE" + OpenSearchResourceStatusTypeNotFound OpenSearchResourceStatusType = "NOT_FOUND" + OpenSearchResourceStatusTypeError OpenSearchResourceStatusType = "ERROR" +) + +// Values returns all known values for OpenSearchResourceStatusType. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (OpenSearchResourceStatusType) Values() []OpenSearchResourceStatusType { + return []OpenSearchResourceStatusType{ + "ACTIVE", + "NOT_FOUND", + "ERROR", + } +} + +type OrderBy string + +// Enum values for OrderBy +const ( + OrderByLogStreamName OrderBy = "LogStreamName" + OrderByLastEventTime OrderBy = "LastEventTime" +) + +// Values returns all known values for OrderBy. Note that this can be expanded in +// the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (OrderBy) Values() []OrderBy { + return []OrderBy{ + "LogStreamName", + "LastEventTime", + } +} + +type OutputFormat string + +// Enum values for OutputFormat +const ( + OutputFormatJson OutputFormat = "json" + OutputFormatPlain OutputFormat = "plain" + OutputFormatW3c OutputFormat = "w3c" + OutputFormatRaw OutputFormat = "raw" + OutputFormatParquet OutputFormat = "parquet" +) + +// Values returns all known values for OutputFormat. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (OutputFormat) Values() []OutputFormat { + return []OutputFormat{ + "json", + "plain", + "w3c", + "raw", + "parquet", + } +} + +type PolicyScope string + +// Enum values for PolicyScope +const ( + PolicyScopeAccount PolicyScope = "ACCOUNT" + PolicyScopeResource PolicyScope = "RESOURCE" +) + +// Values returns all known values for PolicyScope. Note that this can be expanded +// in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (PolicyScope) Values() []PolicyScope { + return []PolicyScope{ + "ACCOUNT", + "RESOURCE", + } +} + +type PolicyType string + +// Enum values for PolicyType +const ( + PolicyTypeDataProtectionPolicy PolicyType = "DATA_PROTECTION_POLICY" + PolicyTypeSubscriptionFilterPolicy PolicyType = "SUBSCRIPTION_FILTER_POLICY" + PolicyTypeFieldIndexPolicy PolicyType = "FIELD_INDEX_POLICY" + PolicyTypeTransformerPolicy PolicyType = "TRANSFORMER_POLICY" + PolicyTypeMetricExtractionPolicy PolicyType = "METRIC_EXTRACTION_POLICY" +) + +// Values returns all known values for PolicyType. Note that this can be expanded +// in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (PolicyType) Values() []PolicyType { + return []PolicyType{ + "DATA_PROTECTION_POLICY", + "SUBSCRIPTION_FILTER_POLICY", + "FIELD_INDEX_POLICY", + "TRANSFORMER_POLICY", + "METRIC_EXTRACTION_POLICY", + } +} + +type QueryLanguage string + +// Enum values for QueryLanguage +const ( + QueryLanguageCwli QueryLanguage = "CWLI" + QueryLanguageSql QueryLanguage = "SQL" + QueryLanguagePpl QueryLanguage = "PPL" +) + +// Values returns all known values for QueryLanguage. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (QueryLanguage) Values() []QueryLanguage { + return []QueryLanguage{ + "CWLI", + "SQL", + "PPL", + } +} + +type QueryStatus string + +// Enum values for QueryStatus +const ( + QueryStatusScheduled QueryStatus = "Scheduled" + QueryStatusRunning QueryStatus = "Running" + QueryStatusComplete QueryStatus = "Complete" + QueryStatusFailed QueryStatus = "Failed" + QueryStatusCancelled QueryStatus = "Cancelled" + QueryStatusTimeout QueryStatus = "Timeout" + QueryStatusUnknown QueryStatus = "Unknown" +) + +// Values returns all known values for QueryStatus. Note that this can be expanded +// in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (QueryStatus) Values() []QueryStatus { + return []QueryStatus{ + "Scheduled", + "Running", + "Complete", + "Failed", + "Cancelled", + "Timeout", + "Unknown", + } +} + +type S3TableIntegrationSourceStatus string + +// Enum values for S3TableIntegrationSourceStatus +const ( + S3TableIntegrationSourceStatusActive S3TableIntegrationSourceStatus = "ACTIVE" + S3TableIntegrationSourceStatusUnhealthy S3TableIntegrationSourceStatus = "UNHEALTHY" + S3TableIntegrationSourceStatusFailed S3TableIntegrationSourceStatus = "FAILED" + S3TableIntegrationSourceStatusDataSourceDeleteInProgress S3TableIntegrationSourceStatus = "DATA_SOURCE_DELETE_IN_PROGRESS" +) + +// Values returns all known values for S3TableIntegrationSourceStatus. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (S3TableIntegrationSourceStatus) Values() []S3TableIntegrationSourceStatus { + return []S3TableIntegrationSourceStatus{ + "ACTIVE", + "UNHEALTHY", + "FAILED", + "DATA_SOURCE_DELETE_IN_PROGRESS", + } +} + +type ScheduledQueryDestinationType string + +// Enum values for ScheduledQueryDestinationType +const ( + ScheduledQueryDestinationTypeS3 ScheduledQueryDestinationType = "S3" +) + +// Values returns all known values for ScheduledQueryDestinationType. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ScheduledQueryDestinationType) Values() []ScheduledQueryDestinationType { + return []ScheduledQueryDestinationType{ + "S3", + } +} + +type ScheduledQueryState string + +// Enum values for ScheduledQueryState +const ( + ScheduledQueryStateEnabled ScheduledQueryState = "ENABLED" + ScheduledQueryStateDisabled ScheduledQueryState = "DISABLED" +) + +// Values returns all known values for ScheduledQueryState. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ScheduledQueryState) Values() []ScheduledQueryState { + return []ScheduledQueryState{ + "ENABLED", + "DISABLED", + } +} + +type Scope string + +// Enum values for Scope +const ( + ScopeAll Scope = "ALL" +) + +// 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{ + "ALL", + } +} + +type StandardUnit string + +// Enum values for StandardUnit +const ( + StandardUnitSeconds StandardUnit = "Seconds" + StandardUnitMicroseconds StandardUnit = "Microseconds" + StandardUnitMilliseconds StandardUnit = "Milliseconds" + StandardUnitBytes StandardUnit = "Bytes" + StandardUnitKilobytes StandardUnit = "Kilobytes" + StandardUnitMegabytes StandardUnit = "Megabytes" + StandardUnitGigabytes StandardUnit = "Gigabytes" + StandardUnitTerabytes StandardUnit = "Terabytes" + StandardUnitBits StandardUnit = "Bits" + StandardUnitKilobits StandardUnit = "Kilobits" + StandardUnitMegabits StandardUnit = "Megabits" + StandardUnitGigabits StandardUnit = "Gigabits" + StandardUnitTerabits StandardUnit = "Terabits" + StandardUnitPercent StandardUnit = "Percent" + StandardUnitCount StandardUnit = "Count" + StandardUnitBytesSecond StandardUnit = "Bytes/Second" + StandardUnitKilobytesSecond StandardUnit = "Kilobytes/Second" + StandardUnitMegabytesSecond StandardUnit = "Megabytes/Second" + StandardUnitGigabytesSecond StandardUnit = "Gigabytes/Second" + StandardUnitTerabytesSecond StandardUnit = "Terabytes/Second" + StandardUnitBitsSecond StandardUnit = "Bits/Second" + StandardUnitKilobitsSecond StandardUnit = "Kilobits/Second" + StandardUnitMegabitsSecond StandardUnit = "Megabits/Second" + StandardUnitGigabitsSecond StandardUnit = "Gigabits/Second" + StandardUnitTerabitsSecond StandardUnit = "Terabits/Second" + StandardUnitCountSecond StandardUnit = "Count/Second" + StandardUnitNone StandardUnit = "None" +) + +// Values returns all known values for StandardUnit. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (StandardUnit) Values() []StandardUnit { + return []StandardUnit{ + "Seconds", + "Microseconds", + "Milliseconds", + "Bytes", + "Kilobytes", + "Megabytes", + "Gigabytes", + "Terabytes", + "Bits", + "Kilobits", + "Megabits", + "Gigabits", + "Terabits", + "Percent", + "Count", + "Bytes/Second", + "Kilobytes/Second", + "Megabytes/Second", + "Gigabytes/Second", + "Terabytes/Second", + "Bits/Second", + "Kilobits/Second", + "Megabits/Second", + "Gigabits/Second", + "Terabits/Second", + "Count/Second", + "None", + } +} + +type State string + +// Enum values for State +const ( + StateActive State = "Active" + StateSuppressed State = "Suppressed" + StateBaseline State = "Baseline" +) + +// 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{ + "Active", + "Suppressed", + "Baseline", + } +} + +type SuppressionState string + +// Enum values for SuppressionState +const ( + SuppressionStateSuppressed SuppressionState = "SUPPRESSED" + SuppressionStateUnsuppressed SuppressionState = "UNSUPPRESSED" +) + +// Values returns all known values for SuppressionState. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (SuppressionState) Values() []SuppressionState { + return []SuppressionState{ + "SUPPRESSED", + "UNSUPPRESSED", + } +} + +type SuppressionType string + +// Enum values for SuppressionType +const ( + SuppressionTypeLimited SuppressionType = "LIMITED" + SuppressionTypeInfinite SuppressionType = "INFINITE" +) + +// Values returns all known values for SuppressionType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (SuppressionType) Values() []SuppressionType { + return []SuppressionType{ + "LIMITED", + "INFINITE", + } +} + +type SuppressionUnit string + +// Enum values for SuppressionUnit +const ( + SuppressionUnitSeconds SuppressionUnit = "SECONDS" + SuppressionUnitMinutes SuppressionUnit = "MINUTES" + SuppressionUnitHours SuppressionUnit = "HOURS" +) + +// Values returns all known values for SuppressionUnit. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (SuppressionUnit) Values() []SuppressionUnit { + return []SuppressionUnit{ + "SECONDS", + "MINUTES", + "HOURS", + } +} + +type Type string + +// Enum values for Type +const ( + TypeBoolean Type = "boolean" + TypeInteger Type = "integer" + TypeDouble Type = "double" + TypeString Type = "string" +) + +// Values returns all known values for Type. Note that this can be expanded in the +// future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (Type) Values() []Type { + return []Type{ + "boolean", + "integer", + "double", + "string", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types/errors.go new file mode 100644 index 00000000000..f9f9dbcec4b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types/errors.go @@ -0,0 +1,583 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + "fmt" + smithy "github.com/aws/smithy-go" +) + +// You don't have sufficient permissions to perform this action. +type AccessDeniedException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *AccessDeniedException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *AccessDeniedException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *AccessDeniedException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "AccessDeniedException" + } + return *e.ErrorCodeOverride +} +func (e *AccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// This operation attempted to create a resource that already exists. +type ConflictException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ConflictException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ConflictException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ConflictException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ConflictException" + } + return *e.ErrorCodeOverride +} +func (e *ConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The event was already logged. +// +// PutLogEvents actions are now always accepted and never return +// DataAlreadyAcceptedException regardless of whether a given batch of log events +// has already been accepted. +type DataAlreadyAcceptedException struct { + Message *string + + ErrorCodeOverride *string + + ExpectedSequenceToken *string + + noSmithyDocumentSerde +} + +func (e *DataAlreadyAcceptedException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *DataAlreadyAcceptedException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *DataAlreadyAcceptedException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "DataAlreadyAcceptedException" + } + return *e.ErrorCodeOverride +} +func (e *DataAlreadyAcceptedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// An internal server error occurred while processing the request. This exception +// is returned when the service encounters an unexpected condition that prevents it +// from fulfilling the request. +type InternalServerException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InternalServerException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InternalServerException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InternalServerException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InternalServerException" + } + return *e.ErrorCodeOverride +} +func (e *InternalServerException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } + +// An internal error occurred during the streaming of log data. This exception is +// thrown when there's an issue with the internal streaming mechanism used by the +// GetLogObject operation. +type InternalStreamingException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InternalStreamingException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InternalStreamingException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InternalStreamingException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InternalStreamingException" + } + return *e.ErrorCodeOverride +} +func (e *InternalStreamingException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The operation is not valid on the specified resource. +type InvalidOperationException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidOperationException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidOperationException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidOperationException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidOperationException" + } + return *e.ErrorCodeOverride +} +func (e *InvalidOperationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// A parameter is specified incorrectly. +type InvalidParameterException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidParameterException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidParameterException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidParameterException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidParameterException" + } + return *e.ErrorCodeOverride +} +func (e *InvalidParameterException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The sequence token is not valid. You can get the correct sequence token in the +// expectedSequenceToken field in the InvalidSequenceTokenException message. +// +// PutLogEvents actions are now always accepted and never return +// InvalidSequenceTokenException regardless of receiving an invalid sequence token. +type InvalidSequenceTokenException struct { + Message *string + + ErrorCodeOverride *string + + ExpectedSequenceToken *string + + noSmithyDocumentSerde +} + +func (e *InvalidSequenceTokenException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidSequenceTokenException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidSequenceTokenException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidSequenceTokenException" + } + return *e.ErrorCodeOverride +} +func (e *InvalidSequenceTokenException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// You have reached the maximum number of resources that can be created. +type LimitExceededException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *LimitExceededException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *LimitExceededException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *LimitExceededException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "LimitExceededException" + } + return *e.ErrorCodeOverride +} +func (e *LimitExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The query string is not valid. Details about this error are displayed in a +// QueryCompileError object. For more information, see [QueryCompileError]. +// +// For more information about valid query syntax, see [CloudWatch Logs Insights Query Syntax]. +// +// [CloudWatch Logs Insights Query Syntax]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html +// [QueryCompileError]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_QueryCompileError.html +type MalformedQueryException struct { + Message *string + + ErrorCodeOverride *string + + QueryCompileError *QueryCompileError + + noSmithyDocumentSerde +} + +func (e *MalformedQueryException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *MalformedQueryException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *MalformedQueryException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "MalformedQueryException" + } + return *e.ErrorCodeOverride +} +func (e *MalformedQueryException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Multiple concurrent requests to update the same resource were in conflict. +type OperationAbortedException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *OperationAbortedException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *OperationAbortedException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *OperationAbortedException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "OperationAbortedException" + } + return *e.ErrorCodeOverride +} +func (e *OperationAbortedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The specified resource already exists. +type ResourceAlreadyExistsException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ResourceAlreadyExistsException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ResourceAlreadyExistsException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ResourceAlreadyExistsException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ResourceAlreadyExistsException" + } + return *e.ErrorCodeOverride +} +func (e *ResourceAlreadyExistsException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The specified resource does not exist. +type ResourceNotFoundException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ResourceNotFoundException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ResourceNotFoundException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ResourceNotFoundException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ResourceNotFoundException" + } + return *e.ErrorCodeOverride +} +func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// This request exceeds a service quota. +type ServiceQuotaExceededException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ServiceQuotaExceededException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ServiceQuotaExceededException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ServiceQuotaExceededException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ServiceQuotaExceededException" + } + return *e.ErrorCodeOverride +} +func (e *ServiceQuotaExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The service cannot complete the request. +type ServiceUnavailableException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ServiceUnavailableException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ServiceUnavailableException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ServiceUnavailableException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ServiceUnavailableException" + } + return *e.ErrorCodeOverride +} +func (e *ServiceUnavailableException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } + +// This exception is returned if an unknown error occurs during a Live Tail +// session. +type SessionStreamingException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *SessionStreamingException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *SessionStreamingException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *SessionStreamingException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "SessionStreamingException" + } + return *e.ErrorCodeOverride +} +func (e *SessionStreamingException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// This exception is returned in a Live Tail stream when the Live Tail session +// times out. Live Tail sessions time out after three hours. +type SessionTimeoutException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *SessionTimeoutException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *SessionTimeoutException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *SessionTimeoutException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "SessionTimeoutException" + } + return *e.ErrorCodeOverride +} +func (e *SessionTimeoutException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The request was throttled because of quota limits. +type ThrottlingException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ThrottlingException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ThrottlingException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ThrottlingException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ThrottlingException" + } + return *e.ErrorCodeOverride +} +func (e *ThrottlingException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// A resource can have no more than 50 tags. +type TooManyTagsException struct { + Message *string + + ErrorCodeOverride *string + + ResourceName *string + + noSmithyDocumentSerde +} + +func (e *TooManyTagsException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyTagsException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyTagsException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyTagsException" + } + return *e.ErrorCodeOverride +} +func (e *TooManyTagsException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The most likely cause is an Amazon Web Services access key ID or secret key +// that's not valid. +type UnrecognizedClientException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *UnrecognizedClientException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *UnrecognizedClientException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *UnrecognizedClientException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "UnrecognizedClientException" + } + return *e.ErrorCodeOverride +} +func (e *UnrecognizedClientException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// One of the parameters for the request is not valid. +type ValidationException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ValidationException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ValidationException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ValidationException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ValidationException" + } + return *e.ErrorCodeOverride +} +func (e *ValidationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types/types.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types/types.go new file mode 100644 index 00000000000..57e5ed0fd9d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types/types.go @@ -0,0 +1,3102 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + smithydocument "github.com/aws/smithy-go/document" +) + +// A structure that contains information about one CloudWatch Logs account policy. +type AccountPolicy struct { + + // The Amazon Web Services account ID that the policy applies to. + AccountId *string + + // The date and time that this policy was most recently updated. + LastUpdatedTime *int64 + + // The policy document for this account policy. + // + // The JSON specified in policyDocument can be up to 30,720 characters. + PolicyDocument *string + + // The name of the account policy. + PolicyName *string + + // The type of policy for this account policy. + PolicyType PolicyType + + // The scope of the account policy. + Scope Scope + + // The log group selection criteria that is used for this policy. + SelectionCriteria *string + + noSmithyDocumentSerde +} + +// This object defines one key that will be added with the [addKeys] processor. +// +// [addKeys]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-addKey +type AddKeyEntry struct { + + // The key of the new entry to be added to the log event + // + // This member is required. + Key *string + + // The value of the new entry to be added to the log event + // + // This member is required. + Value *string + + // Specifies whether to overwrite the value if the key already exists in the log + // event. If you omit this, the default is false . + OverwriteIfExists bool + + noSmithyDocumentSerde +} + +// This processor adds new key-value pairs to the log event. +// +// For more information about this processor including examples, see [addKeys] in the +// CloudWatch Logs User Guide. +// +// [addKeys]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-addKeys +type AddKeys struct { + + // An array of objects, where each object contains the information about one key + // to add to the log event. + // + // This member is required. + Entries []AddKeyEntry + + noSmithyDocumentSerde +} + +// Contains an aggregate summary of log groups grouped by data source +// characteristics, including the count of log groups and their grouping +// identifiers. +type AggregateLogGroupSummary struct { + + // An array of key-value pairs that identify the data source characteristics used + // to group the log groups. + // + // The size and content of this array depends on the groupBy parameter specified + // in the request. + GroupingIdentifiers []GroupingIdentifier + + // The number of log groups in this aggregate summary group. + LogGroupCount *int32 + + noSmithyDocumentSerde +} + +// This structure represents one anomaly that has been found by a logs anomaly +// detector. +// +// For more information about patterns and anomalies, see [CreateLogAnomalyDetector]. +// +// [CreateLogAnomalyDetector]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CreateLogAnomalyDetector.html +type Anomaly struct { + + // Specifies whether this anomaly is still ongoing. + // + // This member is required. + Active *bool + + // The ARN of the anomaly detector that identified this anomaly. + // + // This member is required. + AnomalyDetectorArn *string + + // The unique ID that CloudWatch Logs assigned to this anomaly. + // + // This member is required. + AnomalyId *string + + // A human-readable description of the anomaly. This description is generated by + // CloudWatch Logs. + // + // This member is required. + Description *string + + // The date and time when the anomaly detector first saw this anomaly. It is + // specified as epoch time, which is the number of seconds since January 1, 1970, + // 00:00:00 UTC . + // + // This member is required. + FirstSeen int64 + + // A map showing times when the anomaly detector ran, and the number of + // occurrences of this anomaly that were detected at each of those runs. The times + // are specified in epoch time, which is the number of seconds since January 1, + // 1970, 00:00:00 UTC . + // + // This member is required. + Histogram map[string]int64 + + // The date and time when the anomaly detector most recently saw this anomaly. It + // is specified as epoch time, which is the number of seconds since January 1, + // 1970, 00:00:00 UTC . + // + // This member is required. + LastSeen int64 + + // An array of ARNS of the log groups that contained log events considered to be + // part of this anomaly. + // + // This member is required. + LogGroupArnList []string + + // An array of sample log event messages that are considered to be part of this + // anomaly. + // + // This member is required. + LogSamples []LogEvent + + // The ID of the pattern used to help identify this anomaly. + // + // This member is required. + PatternId *string + + // The pattern used to help identify this anomaly, in string format. + // + // This member is required. + PatternString *string + + // An array of structures where each structure contains information about one + // token that makes up the pattern. + // + // This member is required. + PatternTokens []PatternToken + + // Indicates the current state of this anomaly. If it is still being treated as an + // anomaly, the value is Active . If you have suppressed this anomaly by using the [UpdateAnomaly] + // operation, the value is Suppressed . If this behavior is now considered to be + // normal, the value is Baseline . + // + // [UpdateAnomaly]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_UpdateAnomaly.html + // + // This member is required. + State State + + // If this anomaly is suppressed, this field is true if the suppression is because + // the pattern is suppressed. If false , then only this particular anomaly is + // suppressed. + IsPatternLevelSuppression *bool + + // The pattern used to help identify this anomaly, in regular expression format. + PatternRegex *string + + // The priority level of this anomaly, as determined by CloudWatch Logs. Priority + // is computed based on log severity labels such as FATAL and ERROR and the amount + // of deviation from the baseline. Possible values are HIGH , MEDIUM , and LOW . + Priority *string + + // Indicates whether this anomaly is currently suppressed. To suppress an anomaly, + // use [UpdateAnomaly]. + // + // [UpdateAnomaly]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_UpdateAnomaly.html + Suppressed *bool + + // If the anomaly is suppressed, this indicates when it was suppressed. + SuppressedDate int64 + + // If the anomaly is suppressed, this indicates when the suppression will end. If + // this value is 0 , the anomaly was suppressed with no expiration, with the + // INFINITE value. + SuppressedUntil int64 + + noSmithyDocumentSerde +} + +// Contains information about one anomaly detector in the account. +type AnomalyDetector struct { + + // The ARN of the anomaly detector. + AnomalyDetectorArn *string + + // Specifies the current status of the anomaly detector. To pause an anomaly + // detector, use the enabled parameter in the [UpdateLogAnomalyDetector] operation. + // + // [UpdateLogAnomalyDetector]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_UpdateLogAnomalyDetector.html + AnomalyDetectorStatus AnomalyDetectorStatus + + // The number of days used as the life cycle of anomalies. After this time, + // anomalies are automatically baselined and the anomaly detector model will treat + // new occurrences of similar event as normal. + AnomalyVisibilityTime *int64 + + // The date and time when this anomaly detector was created. + CreationTimeStamp int64 + + // The name of the anomaly detector. + DetectorName *string + + // Specifies how often the anomaly detector runs and look for anomalies. + EvaluationFrequency EvaluationFrequency + + // A symbolic description of how CloudWatch Logs should interpret the data in each + // log event. For example, a log event can contain timestamps, IP addresses, + // strings, and so on. You use the filter pattern to specify what to look for in + // the log event message. + FilterPattern *string + + // The ARN of the KMS key assigned to this anomaly detector, if any. + KmsKeyId *string + + // The date and time when this anomaly detector was most recently modified. + LastModifiedTimeStamp int64 + + // A list of the ARNs of the log groups that this anomaly detector watches. + LogGroupArnList []string + + noSmithyDocumentSerde +} + +// A structure containing information about the deafult settings and available +// settings that you can use to configure a [delivery]or a [delivery destination]. +// +// [delivery]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_Delivery.html +// [delivery destination]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DeliveryDestination.html +type ConfigurationTemplate struct { + + // The action permissions that a caller needs to have to be able to successfully + // create a delivery source on the desired resource type when calling [PutDeliverySource]. + // + // [PutDeliverySource]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliverySource.html + AllowedActionForAllowVendedLogsDeliveryForResource *string + + // The valid values that a caller can use as field delimiters when calling [CreateDelivery] or [UpdateDeliveryConfiguration] on + // a delivery that delivers in Plain , W3C , or Raw format. + // + // [CreateDelivery]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CreateDelivery.html + // [UpdateDeliveryConfiguration]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_UpdateDeliveryConfiguration.html + AllowedFieldDelimiters []string + + // The allowed fields that a caller can use in the recordFields parameter of a [CreateDelivery] or [UpdateDeliveryConfiguration] + // operation. + // + // [CreateDelivery]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CreateDelivery.html + // [UpdateDeliveryConfiguration]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_UpdateDeliveryConfiguration.html + AllowedFields []RecordField + + // The list of delivery destination output formats that are supported by this log + // source. + AllowedOutputFormats []OutputFormat + + // The list of variable fields that can be used in the suffix path of a delivery + // that delivers to an S3 bucket. + AllowedSuffixPathFields []string + + // A mapping that displays the default value of each property within a delivery's + // configuration, if it is not specified in the request. + DefaultDeliveryConfigValues *ConfigurationTemplateDeliveryConfigValues + + // A string specifying which destination type this configuration template applies + // to. + DeliveryDestinationType DeliveryDestinationType + + // A string specifying which log type this configuration template applies to. + LogType *string + + // A string specifying which resource type this configuration template applies to. + ResourceType *string + + // A string specifying which service this configuration template applies to. For + // more information about supported services see [Enable logging from Amazon Web Services services.]. + // + // [Enable logging from Amazon Web Services services.]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AWS-logs-and-resource-policy.html + Service *string + + noSmithyDocumentSerde +} + +// This structure contains the default values that are used for each configuration +// parameter when you use [CreateDelivery]to create a deliver under the current service type, +// resource type, and log type. +// +// [CreateDelivery]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CreateDelivery.html +type ConfigurationTemplateDeliveryConfigValues struct { + + // The default field delimiter that is used in a [CreateDelivery] operation when the field + // delimiter is not specified in that operation. The field delimiter is used only + // when the final output delivery is in Plain , W3C , or Raw format. + // + // [CreateDelivery]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CreateDelivery.html + FieldDelimiter *string + + // The default record fields that will be delivered when a list of record fields + // is not provided in a [CreateDelivery]operation. + // + // [CreateDelivery]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CreateDelivery.html + RecordFields []string + + // The delivery parameters that are used when you create a delivery to a delivery + // destination that is an S3 Bucket. + S3DeliveryConfiguration *S3DeliveryConfiguration + + noSmithyDocumentSerde +} + +// This processor copies values within a log event. You can also use this +// processor to add metadata to log events by copying the values of the following +// metadata keys into the log events: @logGroupName , @logGroupStream , @accountId +// , @regionName . +// +// For more information about this processor including examples, see [copyValue] in the +// CloudWatch Logs User Guide. +// +// [copyValue]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-copyValue +type CopyValue struct { + + // An array of CopyValueEntry objects, where each object contains the information + // about one field value to copy. + // + // This member is required. + Entries []CopyValueEntry + + noSmithyDocumentSerde +} + +// This object defines one value to be copied with the [copyValue] processor. +// +// [copyValue]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-copoyValue +type CopyValueEntry struct { + + // The key to copy. + // + // This member is required. + Source *string + + // The key of the field to copy the value to. + // + // This member is required. + Target *string + + // Specifies whether to overwrite the value if the destination key already exists. + // If you omit this, the default is false . + OverwriteIfExists bool + + noSmithyDocumentSerde +} + +// The CSV processor parses comma-separated values (CSV) from the log events into +// columns. +// +// For more information about this processor including examples, see [csv] in the +// CloudWatch Logs User Guide. +// +// [csv]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-csv +type CSV struct { + + // An array of names to use for the columns in the transformed log event. + // + // If you omit this, default column names ( [column_1, column_2 ...] ) are used. + Columns []string + + // The character used to separate each column in the original comma-separated + // value log event. If you omit this, the processor looks for the comma , + // character as the delimiter. + Delimiter *string + + // The path to the parent field to put transformed key value pairs under. If you + // omit this value, the key value pairs will be placed under the root node. + Destination *string + + // The character used used as a text qualifier for a single column of data. If you + // omit this, the double quotation mark " character is used. + QuoteCharacter *string + + // The path to the field in the log event that has the comma separated values to + // be parsed. If you omit this value, the whole log message is processed. + Source *string + + noSmithyDocumentSerde +} + +// Represents a data source that categorizes logs by originating service and log +// type, providing service-based organization complementing traditional log groups. +type DataSource struct { + + // The name of the data source. + // + // This member is required. + Name *string + + // The type of the data source. + Type *string + + noSmithyDocumentSerde +} + +// Filter criteria for data sources, used to specify which data sources to include +// in operations based on name and type. +type DataSourceFilter struct { + + // The name pattern to filter data sources by. + // + // This member is required. + Name *string + + // The type pattern to filter data sources by. + Type *string + + noSmithyDocumentSerde +} + +// This processor converts a datetime string into a format that you specify. +// +// For more information about this processor including examples, see [datetimeConverter] in the +// CloudWatch Logs User Guide. +// +// [datetimeConverter]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-datetimeConverter +type DateTimeConverter struct { + + // A list of patterns to match against the source field. + // + // This member is required. + MatchPatterns []string + + // The key to apply the date conversion to. + // + // This member is required. + Source *string + + // The JSON field to store the result in. + // + // This member is required. + Target *string + + // The locale of the source field. If you omit this, the default of locale.ROOT is + // used. + Locale *string + + // The time zone of the source field. If you omit this, the default used is the + // UTC zone. + SourceTimezone *string + + // The datetime format to use for the converted data in the target field. + // + // If you omit this, the default of yyyy-MM-dd'T'HH:mm:ss.SSS'Z is used. + TargetFormat *string + + // The time zone of the target field. If you omit this, the default used is the + // UTC zone. + TargetTimezone *string + + noSmithyDocumentSerde +} + +// This processor deletes entries from a log event. These entries are key-value +// pairs. +// +// For more information about this processor including examples, see [deleteKeys] in the +// CloudWatch Logs User Guide. +// +// [deleteKeys]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-deleteKeys +type DeleteKeys struct { + + // The list of keys to delete. + // + // This member is required. + WithKeys []string + + noSmithyDocumentSerde +} + +// This structure contains information about one delivery in your account. +// +// A delivery is a connection between a logical delivery source and a logical +// delivery destination. +// +// For more information, see [CreateDelivery]. +// +// To update an existing delivery configuration, use [UpdateDeliveryConfiguration]. +// +// [CreateDelivery]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CreateDelivery.html +// [UpdateDeliveryConfiguration]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_UpdateDeliveryConfiguration.html +type Delivery struct { + + // The Amazon Resource Name (ARN) that uniquely identifies this delivery. + Arn *string + + // The ARN of the delivery destination that is associated with this delivery. + DeliveryDestinationArn *string + + // Displays whether the delivery destination associated with this delivery is + // CloudWatch Logs, Amazon S3, Firehose, or X-Ray. + DeliveryDestinationType DeliveryDestinationType + + // The name of the delivery source that is associated with this delivery. + DeliverySourceName *string + + // The field delimiter that is used between record fields when the final output + // format of a delivery is in Plain , W3C , or Raw format. + FieldDelimiter *string + + // The unique ID that identifies this delivery in your account. + Id *string + + // The record fields used in this delivery. + RecordFields []string + + // This structure contains delivery configurations that apply only when the + // delivery destination resource is an S3 bucket. + S3DeliveryConfiguration *S3DeliveryConfiguration + + // The tags that have been assigned to this delivery. + Tags map[string]string + + noSmithyDocumentSerde +} + +// This structure contains information about one delivery destination in your +// account. A delivery destination is an Amazon Web Services resource that +// represents an Amazon Web Services service that logs can be sent to. CloudWatch +// Logs, Amazon S3, Firehose, and X-Ray are supported as delivery destinations. +// +// To configure logs delivery between a supported Amazon Web Services service and +// a destination, you must do the following: +// +// - Create a delivery source, which is a logical object that represents the +// resource that is actually sending the logs. For more information, see [PutDeliverySource]. +// +// - Create a delivery destination, which is a logical object that represents +// the actual delivery destination. +// +// - If you are delivering logs cross-account, you must use [PutDeliveryDestinationPolicy]in the destination +// account to assign an IAM policy to the destination. This policy allows delivery +// to that destination. +// +// - Create a delivery by pairing exactly one delivery source and one delivery +// destination. For more information, see [CreateDelivery]. +// +// You can configure a single delivery source to send logs to multiple +// destinations by creating multiple deliveries. You can also create multiple +// deliveries to configure multiple delivery sources to send logs to the same +// delivery destination. +// +// [PutDeliverySource]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliverySource.html +// [CreateDelivery]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CreateDelivery.html +// [PutDeliveryDestinationPolicy]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestinationPolicy.html +type DeliveryDestination struct { + + // The Amazon Resource Name (ARN) that uniquely identifies this delivery + // destination. + Arn *string + + // A structure that contains the ARN of the Amazon Web Services resource that will + // receive the logs. + DeliveryDestinationConfiguration *DeliveryDestinationConfiguration + + // Displays whether this delivery destination is CloudWatch Logs, Amazon S3, + // Firehose, or X-Ray. + DeliveryDestinationType DeliveryDestinationType + + // The name of this delivery destination. + Name *string + + // The format of the logs that are sent to this delivery destination. + OutputFormat OutputFormat + + // The tags that have been assigned to this delivery destination. + Tags map[string]string + + noSmithyDocumentSerde +} + +// A structure that contains information about one logs delivery destination. +type DeliveryDestinationConfiguration struct { + + // The ARN of the Amazon Web Services destination that this delivery destination + // represents. That Amazon Web Services destination can be a log group in + // CloudWatch Logs, an Amazon S3 bucket, or a delivery stream in Firehose. + // + // This member is required. + DestinationResourceArn *string + + noSmithyDocumentSerde +} + +// This structure contains information about one delivery source in your account. +// A delivery source is an Amazon Web Services resource that sends logs to an +// Amazon Web Services destination. The destination can be CloudWatch Logs, Amazon +// S3, or Firehose. +// +// Only some Amazon Web Services services support being configured as a delivery +// source. These services are listed as Supported [V2 Permissions] in the table at [Enabling logging from Amazon Web Services services.] +// +// To configure logs delivery between a supported Amazon Web Services service and +// a destination, you must do the following: +// +// - Create a delivery source, which is a logical object that represents the +// resource that is actually sending the logs. For more information, see [PutDeliverySource]. +// +// - Create a delivery destination, which is a logical object that represents +// the actual delivery destination. For more information, see [PutDeliveryDestination]. +// +// - If you are delivering logs cross-account, you must use [PutDeliveryDestinationPolicy]in the destination +// account to assign an IAM policy to the destination. This policy allows delivery +// to that destination. +// +// - Create a delivery by pairing exactly one delivery source and one delivery +// destination. For more information, see [CreateDelivery]. +// +// You can configure a single delivery source to send logs to multiple +// destinations by creating multiple deliveries. You can also create multiple +// deliveries to configure multiple delivery sources to send logs to the same +// delivery destination. +// +// [PutDeliveryDestination]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestination.html +// [PutDeliverySource]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliverySource.html +// [Enabling logging from Amazon Web Services services.]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AWS-logs-and-resource-policy.html +// [CreateDelivery]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CreateDelivery.html +// [PutDeliveryDestinationPolicy]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestinationPolicy.html +type DeliverySource struct { + + // The Amazon Resource Name (ARN) that uniquely identifies this delivery source. + Arn *string + + // The type of log that the source is sending. For valid values for this + // parameter, see the documentation for the source service. + LogType *string + + // The unique name of the delivery source. + Name *string + + // This array contains the ARN of the Amazon Web Services resource that sends logs + // and is represented by this delivery source. Currently, only one ARN can be in + // the array. + ResourceArns []string + + // The Amazon Web Services service that is sending logs. + Service *string + + // The tags that have been assigned to this delivery source. + Tags map[string]string + + noSmithyDocumentSerde +} + +// Represents a cross-account destination that receives subscription log events. +type Destination struct { + + // An IAM policy document that governs which Amazon Web Services accounts can + // create subscription filters against this destination. + AccessPolicy *string + + // The ARN of this destination. + Arn *string + + // The creation time of the destination, expressed as the number of milliseconds + // after Jan 1, 1970 00:00:00 UTC. + CreationTime *int64 + + // The name of the destination. + DestinationName *string + + // A role for impersonation, used when delivering log events to the target. + RoleArn *string + + // The Amazon Resource Name (ARN) of the physical target where the log events are + // delivered (for example, a Kinesis stream). + TargetArn *string + + noSmithyDocumentSerde +} + +// Configuration for where to deliver scheduled query results. Specifies the +// destination type and associated settings for result delivery. +type DestinationConfiguration struct { + + // Configuration for delivering query results to Amazon S3. + // + // This member is required. + S3Configuration *S3Configuration + + noSmithyDocumentSerde +} + +// The entity associated with the log events in a PutLogEvents call. +type Entity struct { + + // Additional attributes of the entity that are not used to specify the identity + // of the entity. A list of key-value pairs. + // + // For details about how to use the attributes, see [How to add related information to telemetry] in the CloudWatch User Guide. + // + // [How to add related information to telemetry]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/adding-your-own-related-telemetry.html + Attributes map[string]string + + // The attributes of the entity which identify the specific entity, as a list of + // key-value pairs. Entities with the same keyAttributes are considered to be the + // same entity. + // + // There are five allowed attributes (key names): Type , ResourceType , Identifier + // Name , and Environment . + // + // For details about how to use the key attributes, see [How to add related information to telemetry] in the CloudWatch User + // Guide. + // + // [How to add related information to telemetry]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/adding-your-own-related-telemetry.html + KeyAttributes map[string]string + + noSmithyDocumentSerde +} + +// Represents an export task. +type ExportTask struct { + + // The name of the S3 bucket to which the log data was exported. + Destination *string + + // The prefix that was used as the start of Amazon S3 key for every object + // exported. + DestinationPrefix *string + + // Execution information about the export task. + ExecutionInfo *ExportTaskExecutionInfo + + // The start time, expressed as the number of milliseconds after Jan 1, 1970 + // 00:00:00 UTC . Events with a timestamp before this time are not exported. + From *int64 + + // The name of the log group from which logs data was exported. + LogGroupName *string + + // The status of the export task. + Status *ExportTaskStatus + + // The ID of the export task. + TaskId *string + + // The name of the export task. + TaskName *string + + // The end time, expressed as the number of milliseconds after Jan 1, 1970 + // 00:00:00 UTC . Events with a timestamp later than this time are not exported. + To *int64 + + noSmithyDocumentSerde +} + +// Represents the status of an export task. +type ExportTaskExecutionInfo struct { + + // The completion time of the export task, expressed as the number of milliseconds + // after Jan 1, 1970 00:00:00 UTC . + CompletionTime *int64 + + // The creation time of the export task, expressed as the number of milliseconds + // after Jan 1, 1970 00:00:00 UTC . + CreationTime *int64 + + noSmithyDocumentSerde +} + +// Represents the status of an export task. +type ExportTaskStatus struct { + + // The status code of the export task. + Code ExportTaskStatusCode + + // The status message related to the status code. + Message *string + + noSmithyDocumentSerde +} + +// This structure describes one log event field that is used as an index in at +// least one index policy in this account. +type FieldIndex struct { + + // The string that this field index matches. + FieldIndexName *string + + // The time and date of the earliest log event that matches this field index, + // after the index policy that contains it was created. + FirstEventTime *int64 + + // The time and date of the most recent log event that matches this field index. + LastEventTime *int64 + + // The most recent time that CloudWatch Logs scanned ingested log events to search + // for this field index to improve the speed of future CloudWatch Logs Insights + // queries that search for this field index. + LastScanTime *int64 + + // If this field index appears in an index policy that applies only to a single + // log group, the ARN of that log group is displayed here. + LogGroupIdentifier *string + + // The type of index. Specify FACET for facet-based indexing or FIELD_INDEX for + // field-based indexing. This determines how the field is indexed and can be + // queried. + Type IndexType + + noSmithyDocumentSerde +} + +// A structure containing the extracted fields from a log event. These fields are +// extracted based on the log format and can be used for structured querying and +// analysis. +type FieldsData struct { + + // The actual log data content returned in the streaming response. This contains + // the fields and values of the log event in a structured format that can be parsed + // and processed by the client. + Data []byte + + noSmithyDocumentSerde +} + +// Represents a matched event. +type FilteredLogEvent struct { + + // The ID of the event. + EventId *string + + // The time the event was ingested, expressed as the number of milliseconds after + // Jan 1, 1970 00:00:00 UTC . + IngestionTime *int64 + + // The name of the log stream to which this event belongs. + LogStreamName *string + + // The data contained in the log event. + Message *string + + // The time the event occurred, expressed as the number of milliseconds after Jan + // 1, 1970 00:00:00 UTC . + Timestamp *int64 + + noSmithyDocumentSerde +} + +// A stream of structured log data returned by the GetLogObject operation. This +// stream contains log events with their associated metadata and extracted fields. +// +// The following types satisfy this interface: +// +// GetLogObjectResponseStreamMemberFields +type GetLogObjectResponseStream interface { + isGetLogObjectResponseStream() +} + +// A structure containing the extracted fields from a log event. These fields are +// extracted based on the log format and can be used for structured querying and +// analysis. +type GetLogObjectResponseStreamMemberFields struct { + Value FieldsData + + noSmithyDocumentSerde +} + +func (*GetLogObjectResponseStreamMemberFields) isGetLogObjectResponseStream() {} + +// This processor uses pattern matching to parse and structure unstructured data. +// This processor can also extract fields from log messages. +// +// For more information about this processor including examples, see [grok] in the +// CloudWatch Logs User Guide. +// +// [grok]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation-Configurable.html#CloudWatch-Logs-Transformation-Grok +type Grok struct { + + // The grok pattern to match against the log event. For a list of supported grok + // patterns, see [Supported grok patterns]. + // + // [Supported grok patterns]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation-Configurable.html#CloudWatch-Logs-Transformation-Grok + // + // This member is required. + Match *string + + // The path to the field in the log event that you want to parse. If you omit this + // value, the whole log message is parsed. + Source *string + + noSmithyDocumentSerde +} + +// A key-value pair that identifies how log groups are grouped in aggregate +// summaries. +type GroupingIdentifier struct { + + // The key that identifies the grouping characteristic. The format of the key uses + // dot notation. Examples are, dataSource.Name , dataSource.Type , and + // dataSource.Format . + Key *string + + // The value associated with the grouping characteristic. Examples are amazon_vpc , + // flow , and OCSF . + Value *string + + noSmithyDocumentSerde +} + +// An import job to move data from CloudTrail Event Data Store to CloudWatch. +type Import struct { + + // The timestamp when the import task was created, expressed as the number of + // milliseconds after Jan 1, 1970 00:00:00 UTC. + CreationTime *int64 + + // Error message related to any failed imports + ErrorMessage *string + + // The ARN of the managed CloudWatch Logs log group where the events are being + // imported to. + ImportDestinationArn *string + + // The filter criteria used for this import task. + ImportFilter *ImportFilter + + // The unique identifier of the import task. + ImportId *string + + // The ARN of the CloudTrail Lake Event Data Store being imported from. + ImportSourceArn *string + + // Statistics about the import progress + ImportStatistics *ImportStatistics + + // The current status of the import task. Valid values are IN_PROGRESS, CANCELLED, + // COMPLETED and FAILED. + ImportStatus ImportStatus + + // The timestamp when the import task was last updated, expressed as the number of + // milliseconds after Jan 1, 1970 00:00:00 UTC. + LastUpdatedTime *int64 + + noSmithyDocumentSerde +} + +// A collection of events being imported to CloudWatch +type ImportBatch struct { + + // The unique identifier of the import batch. + // + // This member is required. + BatchId *string + + // The current status of the import batch. Valid values are IN_PROGRESS, + // CANCELLED, COMPLETED and FAILED. + // + // This member is required. + Status ImportStatus + + // The error message if the batch failed to import. Only present when status is + // FAILED. + ErrorMessage *string + + noSmithyDocumentSerde +} + +// The filter criteria used for import tasks +type ImportFilter struct { + + // The end of the time range for events to import, expressed as the number of + // milliseconds after Jan 1, 1970 00:00:00 UTC. + EndEventTime *int64 + + // The start of the time range for events to import, expressed as the number of + // milliseconds after Jan 1, 1970 00:00:00 UTC. + StartEventTime *int64 + + noSmithyDocumentSerde +} + +// Statistics about the import progress +type ImportStatistics struct { + + // The total number of bytes that have been imported to the managed log group. + BytesImported *int64 + + noSmithyDocumentSerde +} + +// This structure contains information about one field index policy in this +// account. +type IndexPolicy struct { + + // The date and time that this index policy was most recently updated. + LastUpdateTime *int64 + + // The ARN of the log group that this index policy applies to. + LogGroupIdentifier *string + + // The policy document for this index policy, in JSON format. + PolicyDocument *string + + // The name of this policy. Responses about log group-level field index policies + // don't have this field, because those policies don't have names. + PolicyName *string + + // This field indicates whether this is an account-level index policy or an index + // policy that applies only to a single log group. + Source IndexSource + + noSmithyDocumentSerde +} + +// Represents a log event, which is a record of activity that was recorded by the +// application or resource being monitored. +type InputLogEvent struct { + + // The raw event message. Each log event can be no larger than 1 MB. + // + // This member is required. + Message *string + + // The time the event occurred, expressed as the number of milliseconds after Jan + // 1, 1970 00:00:00 UTC . + // + // This member is required. + Timestamp *int64 + + noSmithyDocumentSerde +} + +// This structure contains information about the integration configuration. For an +// integration with OpenSearch Service, this includes information about OpenSearch +// Service resources such as the collection, the workspace, and policies. +// +// This structure is returned by a [GetIntegration] operation. +// +// The following types satisfy this interface: +// +// IntegrationDetailsMemberOpenSearchIntegrationDetails +// +// [GetIntegration]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetIntegration.html +type IntegrationDetails interface { + isIntegrationDetails() +} + +// This structure contains complete information about one integration between +// CloudWatch Logs and OpenSearch Service. +type IntegrationDetailsMemberOpenSearchIntegrationDetails struct { + Value OpenSearchIntegrationDetails + + noSmithyDocumentSerde +} + +func (*IntegrationDetailsMemberOpenSearchIntegrationDetails) isIntegrationDetails() {} + +// This structure contains information about one CloudWatch Logs integration. This +// structure is returned by a [ListIntegrations]operation. +// +// [ListIntegrations]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_ListIntegrations.html +type IntegrationSummary struct { + + // The name of this integration. + IntegrationName *string + + // The current status of this integration. + IntegrationStatus IntegrationStatus + + // The type of integration. Integrations with OpenSearch Service have the type + // OPENSEARCH . + IntegrationType IntegrationType + + noSmithyDocumentSerde +} + +// This processor takes a list of objects that contain key fields, and converts +// them into a map of target keys. +// +// For more information about this processor including examples, see [listToMap] in the +// CloudWatch Logs User Guide. +// +// [listToMap]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation-Processors.html#CloudWatch-Logs-Transformation-listToMap +type ListToMap struct { + + // The key of the field to be extracted as keys in the generated map + // + // This member is required. + Key *string + + // The key in the log event that has a list of objects that will be converted to a + // map. + // + // This member is required. + Source *string + + // A Boolean value to indicate whether the list will be flattened into single + // items. Specify true to flatten the list. The default is false + Flatten bool + + // If you set flatten to true , use flattenedElement to specify which element, + // first or last , to keep. + // + // You must specify this parameter if flatten is true + FlattenedElement FlattenedElement + + // The key of the field that will hold the generated map + Target *string + + // If this is specified, the values that you specify in this parameter will be + // extracted from the source objects and put into the values of the generated map. + // Otherwise, original objects in the source list will be put into the values of + // the generated map. + ValueKey *string + + noSmithyDocumentSerde +} + +// This object contains the information for one log event returned in a Live Tail +// stream. +type LiveTailSessionLogEvent struct { + + // The timestamp specifying when this log event was ingested into the log group. + IngestionTime *int64 + + // The name or ARN of the log group that ingested this log event. + LogGroupIdentifier *string + + // The name of the log stream that ingested this log event. + LogStreamName *string + + // The log event message text. + Message *string + + // The timestamp specifying when this log event was created. + Timestamp *int64 + + noSmithyDocumentSerde +} + +// This object contains the metadata for one LiveTailSessionUpdate structure. It +// indicates whether that update includes only a sample of 500 log events out of a +// larger number of ingested log events, or if it contains all of the matching log +// events ingested during that second of time. +type LiveTailSessionMetadata struct { + + // If this is true , then more than 500 log events matched the request for this + // update, and the sessionResults includes a sample of 500 of those events. + // + // If this is false , then 500 or fewer log events matched the request for this + // update, so no sampling was necessary. In this case, the sessionResults array + // includes all log events that matched your request during this time. + Sampled bool + + noSmithyDocumentSerde +} + +// This object contains information about this Live Tail session, including the +// log groups included and the log stream filters, if any. +type LiveTailSessionStart struct { + + // An optional pattern to filter the results to include only log events that match + // the pattern. For example, a filter pattern of error 404 displays only log + // events that include both error and 404 . + // + // For more information about filter pattern syntax, see [Filter and Pattern Syntax]. + // + // [Filter and Pattern Syntax]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html + LogEventFilterPattern *string + + // An array of the names and ARNs of the log groups included in this Live Tail + // session. + LogGroupIdentifiers []string + + // If your StartLiveTail operation request included a logStreamNamePrefixes + // parameter that filtered the session to only include log streams that have names + // that start with certain prefixes, these prefixes are listed here. + LogStreamNamePrefixes []string + + // If your StartLiveTail operation request included a logStreamNames parameter + // that filtered the session to only include certain log streams, these streams are + // listed here. + LogStreamNames []string + + // The unique ID generated by CloudWatch Logs to identify this Live Tail session + // request. + RequestId *string + + // The unique ID generated by CloudWatch Logs to identify this Live Tail session. + SessionId *string + + noSmithyDocumentSerde +} + +// This object contains the log events and metadata for a Live Tail session. +type LiveTailSessionUpdate struct { + + // This object contains the session metadata for a Live Tail session. + SessionMetadata *LiveTailSessionMetadata + + // An array, where each member of the array includes the information for one log + // event in the Live Tail session. + // + // A sessionResults array can include as many as 500 log events. If the number of + // log events matching the request exceeds 500 per second, the log events are + // sampled down to 500 log events to be included in each sessionUpdate structure. + SessionResults []LiveTailSessionLogEvent + + noSmithyDocumentSerde +} + +// This structure contains the information for one sample log event that is +// associated with an anomaly found by a log anomaly detector. +type LogEvent struct { + + // The message content of the log event. + Message *string + + // The time stamp of the log event. + Timestamp *int64 + + noSmithyDocumentSerde +} + +// Represents a log field with its name and data type information for a specific +// data source. +type LogFieldsListItem struct { + + // The name of the log field. + LogFieldName *string + + // The data type information for the log field. + LogFieldType *LogFieldType + + noSmithyDocumentSerde +} + +// Defines the data type structure for a log field, including the type, element +// information, and nested fields for complex types. +type LogFieldType struct { + + // For array or collection types, specifies the element type information. + Element *LogFieldType + + // For complex types, contains the nested field definitions. + Fields []LogFieldsListItem + + // The data type of the log field. + Type *string + + noSmithyDocumentSerde +} + +// Represents a log group. +type LogGroup struct { + + // The Amazon Resource Name (ARN) of the log group. This version of the ARN + // includes a trailing :* after the log group name. + // + // Use this version to refer to the ARN in IAM policies when specifying + // permissions for most API actions. The exception is when specifying permissions + // for [TagResource], [UntagResource], and [ListTagsForResource]. The permissions for those three actions require the ARN version + // that doesn't include a trailing :* . + // + // [TagResource]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_TagResource.html + // [UntagResource]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_UntagResource.html + // [ListTagsForResource]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_ListTagsForResource.html + Arn *string + + // Indicates whether bearer token authentication is enabled for this log group. + // When enabled, bearer token authentication is allowed on operations until it is + // explicitly disabled. + BearerTokenAuthenticationEnabled *bool + + // The creation time of the log group, expressed as the number of milliseconds + // after Jan 1, 1970 00:00:00 UTC. + CreationTime *int64 + + // Displays whether this log group has a protection policy, or whether it had one + // in the past. For more information, see [PutDataProtectionPolicy]. + // + // [PutDataProtectionPolicy]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDataProtectionPolicy.html + DataProtectionStatus DataProtectionStatus + + // Indicates whether deletion protection is enabled for this log group. When + // enabled, deletion protection blocks all deletion operations until it is + // explicitly disabled. + DeletionProtectionEnabled *bool + + // Displays all the properties that this log group has inherited from + // account-level settings. + InheritedProperties []InheritedProperty + + // The Amazon Resource Name (ARN) of the KMS key to use when encrypting log data. + KmsKeyId *string + + // The Amazon Resource Name (ARN) of the log group. This version of the ARN + // doesn't include a trailing :* after the log group name. + // + // Use this version to refer to the ARN in the following situations: + // + // - In the logGroupIdentifier input field in many CloudWatch Logs APIs. + // + // - In the resourceArn field in tagging APIs + // + // - In IAM policies, when specifying permissions for [TagResource], [UntagResource], and [ListTagsForResource]. + // + // [TagResource]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_TagResource.html + // [UntagResource]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_UntagResource.html + // [ListTagsForResource]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_ListTagsForResource.html + LogGroupArn *string + + // This specifies the log group class for this log group. There are three classes: + // + // - The Standard log class supports all CloudWatch Logs features. + // + // - The Infrequent Access log class supports a subset of CloudWatch Logs + // features and incurs lower costs. + // + // - Use the Delivery log class only for delivering Lambda logs to store in + // Amazon S3 or Amazon Data Firehose. Log events in log groups in the Delivery + // class are kept in CloudWatch Logs for only one day. This log class doesn't offer + // rich CloudWatch Logs capabilities such as CloudWatch Logs Insights queries. + // + // For details about the features supported by the Standard and Infrequent Access + // classes, see [Log classes] + // + // [Log classes]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch_Logs_Log_Classes.html + LogGroupClass LogGroupClass + + // The name of the log group. + LogGroupName *string + + // The number of metric filters. + MetricFilterCount *int32 + + // The number of days to retain the log events in the specified log group. + // Possible values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, + // 731, 1096, 1827, 2192, 2557, 2922, 3288, and 3653. + // + // To set a log group so that its log events do not expire, use [DeleteRetentionPolicy]. + // + // [DeleteRetentionPolicy]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DeleteRetentionPolicy.html + RetentionInDays *int32 + + // The number of bytes stored. + StoredBytes *int64 + + noSmithyDocumentSerde +} + +// The fields contained in log events found by a GetLogGroupFields operation, +// along with the percentage of queried log events in which each field appears. +type LogGroupField struct { + + // The name of a log field. + Name *string + + // The percentage of log events queried that contained the field. + Percent int32 + + noSmithyDocumentSerde +} + +// This structure contains information about one log group in your account. +type LogGroupSummary struct { + + // The Amazon Resource Name (ARN) of the log group. + LogGroupArn *string + + // The log group class for this log group. For details about the features + // supported by each log group class, see [Log classes] + // + // [Log classes]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch_Logs_Log_Classes.html + LogGroupClass LogGroupClass + + // The name of the log group. + LogGroupName *string + + noSmithyDocumentSerde +} + +// Represents a log stream, which is a sequence of log events from a single +// emitter of logs. +type LogStream struct { + + // The Amazon Resource Name (ARN) of the log stream. + Arn *string + + // The creation time of the stream, expressed as the number of milliseconds after + // Jan 1, 1970 00:00:00 UTC . + CreationTime *int64 + + // The time of the first event, expressed as the number of milliseconds after Jan + // 1, 1970 00:00:00 UTC . + FirstEventTimestamp *int64 + + // The time of the most recent log event in the log stream in CloudWatch Logs. + // This number is expressed as the number of milliseconds after Jan 1, 1970 + // 00:00:00 UTC . The lastEventTime value updates on an eventual consistency + // basis. It typically updates in less than an hour from ingestion, but in rare + // situations might take longer. + LastEventTimestamp *int64 + + // The ingestion time, expressed as the number of milliseconds after Jan 1, 1970 + // 00:00:00 UTC The lastIngestionTime value updates on an eventual consistency + // basis. It typically updates in less than an hour after ingestion, but in rare + // situations might take longer. + LastIngestionTime *int64 + + // The name of the log stream. + LogStreamName *string + + // The number of bytes stored. + // + // Important: As of June 17, 2019, this parameter is no longer supported for log + // streams, and is always reported as zero. This change applies only to log + // streams. The storedBytes parameter for log groups is not affected. + // + // Deprecated: Starting on June 17, 2019, this parameter will be deprecated for + // log streams, and will be reported as zero. This change applies only to log + // streams. The storedBytes parameter for log groups is not affected. + StoredBytes *int64 + + // The sequence token. + // + // The sequence token is now ignored in PutLogEvents actions. PutLogEvents actions + // are always accepted regardless of receiving an invalid sequence token. You don't + // need to obtain uploadSequenceToken to use a PutLogEvents action. + UploadSequenceToken *string + + noSmithyDocumentSerde +} + +// Contains metadata about a lookup table returned by DescribeLookupTables . +type LookupTable struct { + + // The description of the lookup table. + Description *string + + // The ARN of the KMS key used to encrypt the lookup table data, if applicable. + KmsKeyId *string + + // The time when the lookup table was last updated, expressed as the number of + // milliseconds after Jan 1, 1970 00:00:00 UTC . + LastUpdatedTime *int64 + + // The ARN of the lookup table. + LookupTableArn *string + + // The name of the lookup table. + LookupTableName *string + + // The number of data rows in the lookup table, excluding the header row. + RecordsCount *int64 + + // The size of the lookup table in bytes. + SizeBytes *int64 + + // The column headers from the first row of the CSV file. + TableFields []string + + noSmithyDocumentSerde +} + +// This processor converts a string to lowercase. +// +// For more information about this processor including examples, see [lowerCaseString] in the +// CloudWatch Logs User Guide. +// +// [lowerCaseString]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-lowerCaseString +type LowerCaseString struct { + + // The array caontaining the keys of the fields to convert to lowercase. + // + // This member is required. + WithKeys []string + + noSmithyDocumentSerde +} + +// Metric filters express how CloudWatch Logs would extract metric observations +// from ingested log events and transform them into metric data in a CloudWatch +// metric. +type MetricFilter struct { + + // This parameter is valid only for log groups that have an active log + // transformer. For more information about log transformers, see [PutTransformer]. + // + // If this value is true , the metric filter is applied on the transformed version + // of the log events instead of the original ingested log events. + // + // [PutTransformer]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutTransformer.html + ApplyOnTransformedLogs bool + + // The creation time of the metric filter, expressed as the number of milliseconds + // after Jan 1, 1970 00:00:00 UTC . + CreationTime *int64 + + // The list of system fields that are emitted as additional dimensions in the + // generated metrics. Returns the emitSystemFieldDimensions value if it was + // specified when the metric filter was created. + EmitSystemFieldDimensions []string + + // The filter expression that specifies which log events are processed by this + // metric filter based on system fields. Returns the fieldSelectionCriteria value + // if it was specified when the metric filter was created. + FieldSelectionCriteria *string + + // The name of the metric filter. + FilterName *string + + // A symbolic description of how CloudWatch Logs should interpret the data in each + // log event. For example, a log event can contain timestamps, IP addresses, + // strings, and so on. You use the filter pattern to specify what to look for in + // the log event message. + FilterPattern *string + + // The name of the log group. + LogGroupName *string + + // The metric transformations. + MetricTransformations []MetricTransformation + + noSmithyDocumentSerde +} + +// Represents a matched event. +type MetricFilterMatchRecord struct { + + // The raw event data. + EventMessage *string + + // The event number. + EventNumber int64 + + // The values extracted from the event data by the filter. + ExtractedValues map[string]string + + noSmithyDocumentSerde +} + +// Indicates how to transform ingested log events to metric data in a CloudWatch +// metric. +type MetricTransformation struct { + + // The name of the CloudWatch metric. + // + // This member is required. + MetricName *string + + // A custom namespace to contain your metric in CloudWatch. Use namespaces to + // group together metrics that are similar. For more information, see [Namespaces]. + // + // [Namespaces]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#Namespace + // + // This member is required. + MetricNamespace *string + + // The value to publish to the CloudWatch metric when a filter pattern matches a + // log event. + // + // This member is required. + MetricValue *string + + // (Optional) The value to emit when a filter pattern does not match a log event. + // This value can be null. + DefaultValue *float64 + + // The fields to use as dimensions for the metric. One metric filter can include + // as many as three dimensions. + // + // Metrics extracted from log events are charged as custom metrics. To prevent + // unexpected high charges, do not specify high-cardinality fields such as + // IPAddress or requestID as dimensions. Each different value found for a + // dimension is treated as a separate metric and accrues charges as a separate + // custom metric. + // + // CloudWatch Logs disables a metric filter if it generates 1000 different + // name/value pairs for your specified dimensions within a certain amount of time. + // This helps to prevent accidental high charges. + // + // You can also set up a billing alarm to alert you if your charges are higher + // than expected. For more information, see [Creating a Billing Alarm to Monitor Your Estimated Amazon Web Services Charges]. + // + // [Creating a Billing Alarm to Monitor Your Estimated Amazon Web Services Charges]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/monitor_estimated_charges_with_cloudwatch.html + Dimensions map[string]string + + // The unit to assign to the metric. If you omit this, the unit is set as None . + Unit StandardUnit + + noSmithyDocumentSerde +} + +// This object defines one key that will be moved with the [moveKey] processor. +// +// [moveKey]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-moveKey +type MoveKeyEntry struct { + + // The key to move. + // + // This member is required. + Source *string + + // The key to move to. + // + // This member is required. + Target *string + + // Specifies whether to overwrite the value if the destination key already exists. + // If you omit this, the default is false . + OverwriteIfExists bool + + noSmithyDocumentSerde +} + +// This processor moves a key from one field to another. The original key is +// deleted. +// +// For more information about this processor including examples, see [moveKeys] in the +// CloudWatch Logs User Guide. +// +// [moveKeys]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-moveKeys +type MoveKeys struct { + + // An array of objects, where each object contains the information about one key + // to move. + // + // This member is required. + Entries []MoveKeyEntry + + noSmithyDocumentSerde +} + +// This structure contains information about the OpenSearch Service application +// used for this integration. An OpenSearch Service application is the web +// application created by the integration with CloudWatch Logs. It hosts the vended +// logs dashboards. +type OpenSearchApplication struct { + + // The Amazon Resource Name (ARN) of the application. + ApplicationArn *string + + // The endpoint of the application. + ApplicationEndpoint *string + + // The ID of the application. + ApplicationId *string + + // This structure contains information about the status of this OpenSearch Service + // resource. + Status *OpenSearchResourceStatus + + noSmithyDocumentSerde +} + +// This structure contains information about the OpenSearch Service collection +// used for this integration. An OpenSearch Service collection is a logical +// grouping of one or more indexes that represent an analytics workload. For more +// information, see [Creating and managing OpenSearch Service Serverless collections]. +// +// [Creating and managing OpenSearch Service Serverless collections]: https://docs.aws.amazon.com/opensearch-service/latest/developerguide/serverless-collections.html +type OpenSearchCollection struct { + + // The ARN of the collection. + CollectionArn *string + + // The endpoint of the collection. + CollectionEndpoint *string + + // This structure contains information about the status of this OpenSearch Service + // resource. + Status *OpenSearchResourceStatus + + noSmithyDocumentSerde +} + +// This structure contains information about the OpenSearch Service data access +// policy used for this integration. The access policy defines the access controls +// for the collection. This data access policy was automatically created as part of +// the integration setup. For more information about OpenSearch Service data access +// policies, see [Data access control for Amazon OpenSearch Serverless]in the OpenSearch Service Developer Guide. +// +// [Data access control for Amazon OpenSearch Serverless]: https://docs.aws.amazon.com/opensearch-service/latest/developerguide/serverless-data-access.html +type OpenSearchDataAccessPolicy struct { + + // The name of the data access policy. + PolicyName *string + + // This structure contains information about the status of this OpenSearch Service + // resource. + Status *OpenSearchResourceStatus + + noSmithyDocumentSerde +} + +// This structure contains information about the OpenSearch Service data source +// used for this integration. This data source was created as part of the +// integration setup. An OpenSearch Service data source defines the source and +// destination for OpenSearch Service queries. It includes the role required to +// execute queries and write to collections. +// +// For more information about OpenSearch Service data sources , see [Creating OpenSearch Service data source integrations with Amazon S3.] +// +// [Creating OpenSearch Service data source integrations with Amazon S3.]: https://docs.aws.amazon.com/opensearch-service/latest/developerguide/direct-query-s3-creating.html +type OpenSearchDataSource struct { + + // The name of the OpenSearch Service data source. + DataSourceName *string + + // This structure contains information about the status of this OpenSearch Service + // resource. + Status *OpenSearchResourceStatus + + noSmithyDocumentSerde +} + +// This structure contains information about the OpenSearch Service encryption +// policy used for this integration. The encryption policy was created +// automatically when you created the integration. For more information, see [Encryption policies]in +// the OpenSearch Service Developer Guide. +// +// [Encryption policies]: https://docs.aws.amazon.com/opensearch-service/latest/developerguide/serverless-encryption.html#serverless-encryption-policies +type OpenSearchEncryptionPolicy struct { + + // The name of the encryption policy. + PolicyName *string + + // This structure contains information about the status of this OpenSearch Service + // resource. + Status *OpenSearchResourceStatus + + noSmithyDocumentSerde +} + +// This structure contains complete information about one CloudWatch Logs +// integration. This structure is returned by a [GetIntegration]operation. +// +// [GetIntegration]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetIntegration.html +type OpenSearchIntegrationDetails struct { + + // This structure contains information about the OpenSearch Service data access + // policy used for this integration. The access policy defines the access controls + // for the collection. This data access policy was automatically created as part of + // the integration setup. For more information about OpenSearch Service data access + // policies, see [Data access control for Amazon OpenSearch Serverless]in the OpenSearch Service Developer Guide. + // + // [Data access control for Amazon OpenSearch Serverless]: https://docs.aws.amazon.com/opensearch-service/latest/developerguide/serverless-data-access.html + AccessPolicy *OpenSearchDataAccessPolicy + + // This structure contains information about the OpenSearch Service application + // used for this integration. An OpenSearch Service application is the web + // application that was created by the integration with CloudWatch Logs. It hosts + // the vended logs dashboards. + Application *OpenSearchApplication + + // This structure contains information about the OpenSearch Service collection + // used for this integration. This collection was created as part of the + // integration setup. An OpenSearch Service collection is a logical grouping of one + // or more indexes that represent an analytics workload. For more information, see [Creating and managing OpenSearch Service Serverless collections] + // . + // + // [Creating and managing OpenSearch Service Serverless collections]: https://docs.aws.amazon.com/opensearch-service/latest/developerguide/serverless-collections.html + Collection *OpenSearchCollection + + // This structure contains information about the OpenSearch Service data source + // used for this integration. This data source was created as part of the + // integration setup. An OpenSearch Service data source defines the source and + // destination for OpenSearch Service queries. It includes the role required to + // execute queries and write to collections. + // + // For more information about OpenSearch Service data sources , see [Creating OpenSearch Service data source integrations with Amazon S3.] + // + // [Creating OpenSearch Service data source integrations with Amazon S3.]: https://docs.aws.amazon.com/opensearch-service/latest/developerguide/direct-query-s3-creating.html + DataSource *OpenSearchDataSource + + // This structure contains information about the OpenSearch Service encryption + // policy used for this integration. The encryption policy was created + // automatically when you created the integration. For more information, see [Encryption policies]in + // the OpenSearch Service Developer Guide. + // + // [Encryption policies]: https://docs.aws.amazon.com/opensearch-service/latest/developerguide/serverless-encryption.html#serverless-encryption-policies + EncryptionPolicy *OpenSearchEncryptionPolicy + + // This structure contains information about the OpenSearch Service data lifecycle + // policy used for this integration. The lifecycle policy determines the lifespan + // of the data in the collection. It was automatically created as part of the + // integration setup. + // + // For more information, see [Using data lifecycle policies with OpenSearch Service Serverless] in the OpenSearch Service Developer Guide. + // + // [Using data lifecycle policies with OpenSearch Service Serverless]: https://docs.aws.amazon.com/opensearch-service/latest/developerguide/serverless-lifecycle.html + LifecyclePolicy *OpenSearchLifecyclePolicy + + // This structure contains information about the OpenSearch Service network policy + // used for this integration. The network policy assigns network access settings to + // collections. For more information, see [Network policies]in the OpenSearch Service Developer + // Guide. + // + // [Network policies]: https://docs.aws.amazon.com/opensearch-service/latest/developerguide/serverless-network.html#serverless-network-policies + NetworkPolicy *OpenSearchNetworkPolicy + + // This structure contains information about the OpenSearch Service workspace used + // for this integration. An OpenSearch Service workspace is the collection of + // dashboards along with other OpenSearch Service tools. This workspace was created + // automatically as part of the integration setup. For more information, see [Centralized OpenSearch user interface (Dashboards) with OpenSearch Service]. + // + // [Centralized OpenSearch user interface (Dashboards) with OpenSearch Service]: https://docs.aws.amazon.com/opensearch-service/latest/developerguide/application.html + Workspace *OpenSearchWorkspace + + noSmithyDocumentSerde +} + +// This structure contains information about the OpenSearch Service data lifecycle +// policy used for this integration. The lifecycle policy determines the lifespan +// of the data in the collection. It was automatically created as part of the +// integration setup. +// +// For more information, see [Using data lifecycle policies with OpenSearch Service Serverless] in the OpenSearch Service Developer Guide. +// +// [Using data lifecycle policies with OpenSearch Service Serverless]: https://docs.aws.amazon.com/opensearch-service/latest/developerguide/serverless-lifecycle.html +type OpenSearchLifecyclePolicy struct { + + // The name of the lifecycle policy. + PolicyName *string + + // This structure contains information about the status of this OpenSearch Service + // resource. + Status *OpenSearchResourceStatus + + noSmithyDocumentSerde +} + +// This structure contains information about the OpenSearch Service network policy +// used for this integration. The network policy assigns network access settings to +// collections. For more information, see [Network policies]in the OpenSearch Service Developer +// Guide. +// +// [Network policies]: https://docs.aws.amazon.com/opensearch-service/latest/developerguide/serverless-network.html#serverless-network-policies +type OpenSearchNetworkPolicy struct { + + // The name of the network policy. + PolicyName *string + + // This structure contains information about the status of this OpenSearch Service + // resource. + Status *OpenSearchResourceStatus + + noSmithyDocumentSerde +} + +// This structure contains configuration details about an integration between +// CloudWatch Logs and OpenSearch Service. +type OpenSearchResourceConfig struct { + + // Specify the ARNs of IAM roles and IAM users who you want to grant permission to + // for viewing the dashboards. + // + // In addition to specifying these users here, you must also grant them the + // CloudWatchOpenSearchDashboardAccess IAM policy. For more information, see [IAM policies for users]. + // + // [IAM policies for users]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/OpenSearch-Dashboards-UserRoles.html + // + // This member is required. + DashboardViewerPrincipals []string + + // Specify the ARN of an IAM role that CloudWatch Logs will use to create the + // integration. This role must have the permissions necessary to access the + // OpenSearch Service collection to be able to create the dashboards. For more + // information about the permissions needed, see [Permissions that the integration needs]in the CloudWatch Logs User Guide. + // + // [Permissions that the integration needs]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/OpenSearch-Dashboards-CreateRole.html + // + // This member is required. + DataSourceRoleArn *string + + // Specify how many days that you want the data derived by OpenSearch Service to + // be retained in the index that the dashboard refers to. This also sets the + // maximum time period that you can choose when viewing data in the dashboard. + // Choosing a longer time frame will incur additional costs. + // + // This member is required. + RetentionDays *int32 + + // If you want to use an existing OpenSearch Service application for your + // integration with OpenSearch Service, specify it here. If you omit this, a new + // application will be created. + ApplicationArn *string + + // To have the vended dashboard data encrypted with KMS instead of the CloudWatch + // Logs default encryption method, specify the ARN of the KMS key that you want to + // use. + KmsKeyArn *string + + noSmithyDocumentSerde +} + +// This structure contains information about the status of an OpenSearch Service +// resource. +type OpenSearchResourceStatus struct { + + // The current status of this resource. + Status OpenSearchResourceStatusType + + // A message with additional information about the status of this resource. + StatusMessage *string + + noSmithyDocumentSerde +} + +// This structure contains information about the OpenSearch Service workspace used +// for this integration. An OpenSearch Service workspace is the collection of +// dashboards along with other OpenSearch Service tools. This workspace was created +// automatically as part of the integration setup. For more information, see [Centralized OpenSearch user interface (Dashboards) with OpenSearch Service]. +// +// [Centralized OpenSearch user interface (Dashboards) with OpenSearch Service]: https://docs.aws.amazon.com/opensearch-service/latest/developerguide/application.html +type OpenSearchWorkspace struct { + + // This structure contains information about the status of an OpenSearch Service + // resource. + Status *OpenSearchResourceStatus + + // The ID of this workspace. + WorkspaceId *string + + noSmithyDocumentSerde +} + +// Represents a log event. +type OutputLogEvent struct { + + // The time the event was ingested, expressed as the number of milliseconds after + // Jan 1, 1970 00:00:00 UTC . + IngestionTime *int64 + + // The data contained in the log event. + Message *string + + // The time the event occurred, expressed as the number of milliseconds after Jan + // 1, 1970 00:00:00 UTC . + Timestamp *int64 + + noSmithyDocumentSerde +} + +// This processor parses CloudFront vended logs, extract fields, and convert them +// into JSON format. Encoded field values are decoded. Values that are integers and +// doubles are treated as such. For more information about this processor including +// examples, see [parseCloudfront] +// +// For more information about CloudFront log format, see [Configure and use standard logs (access logs)]. +// +// If you use this processor, it must be the first processor in your transformer. +// +// [parseCloudfront]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-parseCloudfront +// [Configure and use standard logs (access logs)]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/AccessLogs.html +type ParseCloudfront struct { + + // Omit this parameter and the whole log message will be processed by this + // processor. No other value than @message is allowed for source . + Source *string + + noSmithyDocumentSerde +} + +// This processor parses log events that are in JSON format. It can extract JSON +// key-value pairs and place them under a destination that you specify. +// +// Additionally, because you must have at least one parse-type processor in a +// transformer, you can use ParseJSON as that processor for JSON-format logs, so +// that you can also apply other processors, such as mutate processors, to these +// logs. +// +// For more information about this processor including examples, see [parseJSON] in the +// CloudWatch Logs User Guide. +// +// [parseJSON]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-parseJSON +type ParseJSON struct { + + // The location to put the parsed key value pair into. If you omit this parameter, + // it is placed under the root node. + Destination *string + + // Path to the field in the log event that will be parsed. Use dot notation to + // access child fields. For example, store.book + Source *string + + noSmithyDocumentSerde +} + +// This processor parses a specified field in the original log event into +// key-value pairs. +// +// For more information about this processor including examples, see [parseKeyValue] in the +// CloudWatch Logs User Guide. +// +// [parseKeyValue]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-parseKeyValue +type ParseKeyValue struct { + + // The destination field to put the extracted key-value pairs into + Destination *string + + // The field delimiter string that is used between key-value pairs in the original + // log events. If you omit this, the ampersand & character is used. + FieldDelimiter *string + + // If you want to add a prefix to all transformed keys, specify it here. + KeyPrefix *string + + // The delimiter string to use between the key and value in each pair in the + // transformed log event. + // + // If you omit this, the equal = character is used. + KeyValueDelimiter *string + + // A value to insert into the value field in the result, when a key-value pair is + // not successfully split. + NonMatchValue *string + + // Specifies whether to overwrite the value if the destination key already exists. + // If you omit this, the default is false . + OverwriteIfExists bool + + // Path to the field in the log event that will be parsed. Use dot notation to + // access child fields. For example, store.book + Source *string + + noSmithyDocumentSerde +} + +// Use this processor to parse RDS for PostgreSQL vended logs, extract fields, and +// and convert them into a JSON format. This processor always processes the entire +// log event message. For more information about this processor including examples, +// see [parsePostGres]. +// +// For more information about RDS for PostgreSQL log format, see [RDS for PostgreSQL database log filesTCP flag sequence]. +// +// If you use this processor, it must be the first processor in your transformer. +// +// [RDS for PostgreSQL database log filesTCP flag sequence]: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_LogAccess.Concepts.PostgreSQL.html#USER_LogAccess.Concepts.PostgreSQL.Log_Format.log-line-prefix +// [parsePostGres]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-parsePostGres +type ParsePostgres struct { + + // Omit this parameter and the whole log message will be processed by this + // processor. No other value than @message is allowed for source . + Source *string + + noSmithyDocumentSerde +} + +// Use this processor to parse Route 53 vended logs, extract fields, and and +// convert them into a JSON format. This processor always processes the entire log +// event message. For more information about this processor including examples, see +// [parseRoute53]. +// +// If you use this processor, it must be the first processor in your transformer. +// +// [parseRoute53]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-parseRoute53 +type ParseRoute53 struct { + + // Omit this parameter and the whole log message will be processed by this + // processor. No other value than @message is allowed for source . + Source *string + + noSmithyDocumentSerde +} + +// This processor converts logs into [Open Cybersecurity Schema Framework (OCSF)] events. +// +// For more information about this processor including examples, see [parseToOCSF] in the +// CloudWatch Logs User Guide. +// +// [parseToOCSF]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-parseToOCSF +// [Open Cybersecurity Schema Framework (OCSF)]: https://ocsf.io +type ParseToOCSF struct { + + // Specify the service or process that produces the log events that will be + // converted with this processor. + // + // This member is required. + EventSource EventSource + + // Specify which version of the OCSF schema to use for the transformed log events. + // + // This member is required. + OcsfVersion OCSFVersion + + // The version of the OCSF mapping to use for parsing log data. + MappingVersion *string + + // The path to the field in the log event that you want to parse. If you omit this + // value, the whole log message is parsed. + Source *string + + noSmithyDocumentSerde +} + +// Use this processor to parse Amazon VPC vended logs, extract fields, and and +// convert them into a JSON format. This processor always processes the entire log +// event message. +// +// This processor doesn't support custom log formats, such as NAT gateway logs. +// For more information about custom log formats in Amazon VPC, see [parseVPC]For more +// information about this processor including examples, see [parseVPC]. +// +// If you use this processor, it must be the first processor in your transformer. +// +// [parseVPC]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-parseVPC +type ParseVPC struct { + + // Omit this parameter and the whole log message will be processed by this + // processor. No other value than @message is allowed for source . + Source *string + + noSmithyDocumentSerde +} + +// Use this processor to parse WAF vended logs, extract fields, and and convert +// them into a JSON format. This processor always processes the entire log event +// message. For more information about this processor including examples, see [parseWAF]. +// +// For more information about WAF log format, see [Log examples for web ACL traffic]. +// +// If you use this processor, it must be the first processor in your transformer. +// +// [Log examples for web ACL traffic]: https://docs.aws.amazon.com/waf/latest/developerguide/logging-examples.html +// [parseWAF]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-parsePostGres +type ParseWAF struct { + + // Omit this parameter and the whole log message will be processed by this + // processor. No other value than @message is allowed for source . + Source *string + + noSmithyDocumentSerde +} + +// A structure that contains information about one pattern token related to an +// anomaly. +// +// For more information about patterns and tokens, see [CreateLogAnomalyDetector]. +// +// [CreateLogAnomalyDetector]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CreateLogAnomalyDetector.html +type PatternToken struct { + + // For a dynamic token, this indicates where in the pattern that this token + // appears, related to other dynamic tokens. The dynamic token that appears first + // has a value of 1 , the one that appears second is 2 , and so on. + DynamicTokenPosition int32 + + // Contains the values found for a dynamic token, and the number of times each + // value was found. + Enumerations map[string]int64 + + // A name that CloudWatch Logs assigned to this dynamic token to make the pattern + // more readable. The string part of the inferredTokenName gives you a clearer + // idea of the content of this token. The number part of the inferredTokenName + // shows where in the pattern this token appears, compared to other dynamic tokens. + // CloudWatch Logs assigns the string part of the name based on analyzing the + // content of the log events that contain it. + // + // For example, an inferred token name of IPAddress-3 means that the token + // represents an IP address, and this token is the third dynamic token in the + // pattern. + InferredTokenName *string + + // Specifies whether this is a dynamic token. + IsDynamic *bool + + // The string represented by this token. If this is a dynamic token, the value + // will be <*> + TokenString *string + + noSmithyDocumentSerde +} + +// A structure that contains information about one delivery destination policy. +type Policy struct { + + // The contents of the delivery destination policy. + DeliveryDestinationPolicy *string + + noSmithyDocumentSerde +} + +// This structure contains the information about one processor in a log +// transformer. +type Processor struct { + + // Use this parameter to include the [addKeys] processor in your transformer. + // + // [addKeys]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-addKeys + AddKeys *AddKeys + + // Use this parameter to include the [copyValue] processor in your transformer. + // + // [copyValue]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-copyValue + CopyValue *CopyValue + + // Use this parameter to include the [CSV] processor in your transformer. + // + // [CSV]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-CSV + Csv *CSV + + // Use this parameter to include the [datetimeConverter] processor in your transformer. + // + // [datetimeConverter]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-datetimeConverter + DateTimeConverter *DateTimeConverter + + // Use this parameter to include the [deleteKeys] processor in your transformer. + // + // [deleteKeys]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-deleteKeys + DeleteKeys *DeleteKeys + + // Use this parameter to include the [grok] processor in your transformer. + // + // [grok]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-grok + Grok *Grok + + // Use this parameter to include the [listToMap] processor in your transformer. + // + // [listToMap]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-listToMap + ListToMap *ListToMap + + // Use this parameter to include the [lowerCaseString] processor in your transformer. + // + // [lowerCaseString]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-lowerCaseString + LowerCaseString *LowerCaseString + + // Use this parameter to include the [moveKeys] processor in your transformer. + // + // [moveKeys]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-moveKeys + MoveKeys *MoveKeys + + // Use this parameter to include the [parseCloudfront] processor in your transformer. + // + // If you use this processor, it must be the first processor in your transformer. + // + // [parseCloudfront]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-parseCloudfront + ParseCloudfront *ParseCloudfront + + // Use this parameter to include the [parseJSON] processor in your transformer. + // + // [parseJSON]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-parseJSON + ParseJSON *ParseJSON + + // Use this parameter to include the [parseKeyValue] processor in your transformer. + // + // [parseKeyValue]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-parseKeyValue + ParseKeyValue *ParseKeyValue + + // Use this parameter to include the [parsePostGres] processor in your transformer. + // + // If you use this processor, it must be the first processor in your transformer. + // + // [parsePostGres]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-parsePostGres + ParsePostgres *ParsePostgres + + // Use this parameter to include the [parseRoute53] processor in your transformer. + // + // If you use this processor, it must be the first processor in your transformer. + // + // [parseRoute53]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-parseRoute53 + ParseRoute53 *ParseRoute53 + + // Use this parameter to convert logs into Open Cybersecurity Schema (OCSF) format. + ParseToOCSF *ParseToOCSF + + // Use this parameter to include the [parseVPC] processor in your transformer. + // + // If you use this processor, it must be the first processor in your transformer. + // + // [parseVPC]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-parseVPC + ParseVPC *ParseVPC + + // Use this parameter to include the [parseWAF] processor in your transformer. + // + // If you use this processor, it must be the first processor in your transformer. + // + // [parseWAF]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-parseWAF + ParseWAF *ParseWAF + + // Use this parameter to include the [renameKeys] processor in your transformer. + // + // [renameKeys]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-renameKeys + RenameKeys *RenameKeys + + // Use this parameter to include the [splitString] processor in your transformer. + // + // [splitString]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-splitString + SplitString *SplitString + + // Use this parameter to include the [substituteString] processor in your transformer. + // + // [substituteString]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-substituteString + SubstituteString *SubstituteString + + // Use this parameter to include the [trimString] processor in your transformer. + // + // [trimString]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-trimString + TrimString *TrimString + + // Use this parameter to include the [typeConverter] processor in your transformer. + // + // [typeConverter]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-typeConverter + TypeConverter *TypeConverter + + // Use this parameter to include the [upperCaseString] processor in your transformer. + // + // [upperCaseString]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-upperCaseString + UpperCaseString *UpperCaseString + + noSmithyDocumentSerde +} + +// Reserved. +type QueryCompileError struct { + + // Reserved. + Location *QueryCompileErrorLocation + + // Reserved. + Message *string + + noSmithyDocumentSerde +} + +// Reserved. +type QueryCompileErrorLocation struct { + + // Reserved. + EndCharOffset *int32 + + // Reserved. + StartCharOffset *int32 + + noSmithyDocumentSerde +} + +// This structure contains details about a saved CloudWatch Logs Insights query +// definition. +type QueryDefinition struct { + + // The date that the query definition was most recently modified. + LastModified *int64 + + // If this query definition contains a list of log groups that it is limited to, + // that list appears here. + LogGroupNames []string + + // The name of the query definition. + Name *string + + // If this query definition contains a list of query parameters that define + // placeholder variables for the query string, that list appears here. + Parameters []QueryParameter + + // The unique ID of the query definition. + QueryDefinitionId *string + + // The query language used for this query. For more information about the query + // languages that CloudWatch Logs supports, see [Supported query languages]. + // + // [Supported query languages]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_AnalyzeLogData_Languages.html + QueryLanguage QueryLanguage + + // The query string to use for this definition. For more information, see [CloudWatch Logs Insights Query Syntax]. + // + // [CloudWatch Logs Insights Query Syntax]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html + QueryString *string + + noSmithyDocumentSerde +} + +// Information about one CloudWatch Logs Insights query that matches the request +// in a DescribeQueries operation. +type QueryInfo struct { + + // The total number of bytes scanned by the query. This indicates the cost + // associated with the query. + BytesScanned *float64 + + // The date and time that this query was created. + CreateTime *int64 + + // The name of the log group scanned by this query. + LogGroupName *string + + // The duration in milliseconds that the query took to execute. + QueryDuration *int64 + + // The unique ID number of this query. + QueryId *string + + // The query language used for this query. For more information about the query + // languages that CloudWatch Logs supports, see [Supported query languages]. + // + // [Supported query languages]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_AnalyzeLogData_Languages.html + QueryLanguage QueryLanguage + + // The query string used in this query. + QueryString *string + + // The status of this query. Possible values are Cancelled , Complete , Failed , + // Running , Scheduled , and Unknown . + Status QueryStatus + + // The ARN of the user who ran the query. + UserIdentity *string + + noSmithyDocumentSerde +} + +// This structure defines a query parameter for a saved CloudWatch Logs Insights +// query definition. Query parameters are supported only for Logs Insights QL +// queries. They are placeholder variables that you can reference in a query string +// using the {{parameterName}} syntax. Each parameter can include a default value +// and a description. +type QueryParameter struct { + + // The name of the query parameter. A query parameter name must start with a + // letter or underscore, and contain only letters, digits, and underscores. + // + // This member is required. + Name *string + + // The default value to use for this query parameter if no value is supplied at + // execution time. + DefaultValue *string + + // A description of the query parameter that explains its purpose or expected + // values. + Description *string + + noSmithyDocumentSerde +} + +// Contains the number of log events scanned by the query, the number of log +// events that matched the query criteria, and the total number of bytes in the log +// events that were scanned. +// +// If the query involved log groups that have field index policies, the estimated +// number of skipped log events and the total bytes of those skipped log events are +// included. Using field indexes to skip log events in queries reduces scan volume +// and improves performance. For more information, see [Create field indexes to improve query performance and reduce scan volume]. +// +// [Create field indexes to improve query performance and reduce scan volume]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatchLogs-Field-Indexing.html +type QueryStatistics struct { + + // The total number of bytes in the log events scanned during the query. + BytesScanned float64 + + // An estimate of the number of bytes in the log events that were skipped when + // processing this query, because the query contained an indexed field. Skipping + // these entries lowers query costs and improves the query performance time. For + // more information about field indexes, see [PutIndexPolicy]. + // + // [PutIndexPolicy]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutIndexPolicy.html + EstimatedBytesSkipped float64 + + // An estimate of the number of log events that were skipped when processing this + // query, because the query contained an indexed field. Skipping these entries + // lowers query costs and improves the query performance time. For more information + // about field indexes, see [PutIndexPolicy]. + // + // [PutIndexPolicy]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutIndexPolicy.html + EstimatedRecordsSkipped float64 + + // The number of log groups that were scanned by this query. + LogGroupsScanned float64 + + // The number of log events that matched the query string. + RecordsMatched float64 + + // The total number of log events scanned during the query. + RecordsScanned float64 + + noSmithyDocumentSerde +} + +// A structure that represents a valid record field header and whether it is +// mandatory. +type RecordField struct { + + // If this is true , the record field must be present in the recordFields + // parameter provided to a [CreateDelivery]or [UpdateDeliveryConfiguration] operation. + // + // [CreateDelivery]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CreateDelivery.html + // [UpdateDeliveryConfiguration]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_UpdateDeliveryConfiguration.html + Mandatory *bool + + // The name to use when specifying this record field in a [CreateDelivery] or [UpdateDeliveryConfiguration] operation. + // + // [CreateDelivery]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CreateDelivery.html + // [UpdateDeliveryConfiguration]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_UpdateDeliveryConfiguration.html + Name *string + + noSmithyDocumentSerde +} + +// If an entity is rejected when a PutLogEvents request was made, this includes +// details about the reason for the rejection. +type RejectedEntityInfo struct { + + // The type of error that caused the rejection of the entity when calling + // PutLogEvents . + // + // This member is required. + ErrorType EntityRejectionErrorType + + noSmithyDocumentSerde +} + +// Represents the rejected events. +type RejectedLogEventsInfo struct { + + // The expired log events. + ExpiredLogEventEndIndex *int32 + + // The index of the first log event that is too new. This field is inclusive. + TooNewLogEventStartIndex *int32 + + // The index of the last log event that is too old. This field is exclusive. + TooOldLogEventEndIndex *int32 + + noSmithyDocumentSerde +} + +// This object defines one key that will be renamed with the [renameKey] processor. +// +// [renameKey]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-renameKey +type RenameKeyEntry struct { + + // The key to rename + // + // This member is required. + Key *string + + // The string to use for the new key name + // + // This member is required. + RenameTo *string + + // Specifies whether to overwrite the existing value if the destination key + // already exists. The default is false + OverwriteIfExists bool + + noSmithyDocumentSerde +} + +// Use this processor to rename keys in a log event. +// +// For more information about this processor including examples, see [renameKeys] in the +// CloudWatch Logs User Guide. +// +// [renameKeys]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-renameKeys +type RenameKeys struct { + + // An array of RenameKeyEntry objects, where each object contains the information + // about a single key to rename. + // + // This member is required. + Entries []RenameKeyEntry + + noSmithyDocumentSerde +} + +// This structure contains configuration details about an integration between +// CloudWatch Logs and another entity. +// +// The following types satisfy this interface: +// +// ResourceConfigMemberOpenSearchResourceConfig +type ResourceConfig interface { + isResourceConfig() +} + +// This structure contains configuration details about an integration between +// CloudWatch Logs and OpenSearch Service. +type ResourceConfigMemberOpenSearchResourceConfig struct { + Value OpenSearchResourceConfig + + noSmithyDocumentSerde +} + +func (*ResourceConfigMemberOpenSearchResourceConfig) isResourceConfig() {} + +// A policy enabling one or more entities to put logs to a log group in this +// account. +type ResourcePolicy struct { + + // Timestamp showing when this policy was last updated, expressed as the number of + // milliseconds after Jan 1, 1970 00:00:00 UTC . + LastUpdatedTime *int64 + + // The details of the policy. + PolicyDocument *string + + // The name of the resource policy. + PolicyName *string + + // Specifies scope of the resource policy. Valid values are ACCOUNT or RESOURCE. + PolicyScope PolicyScope + + // The ARN of the CloudWatch Logs resource to which the resource policy is + // attached. Only populated for resource-scoped policies. + ResourceArn *string + + // The revision ID of the resource policy. Only populated for resource-scoped + // policies. + RevisionId *string + + noSmithyDocumentSerde +} + +// Contains one field from one log event returned by a CloudWatch Logs Insights +// query, along with the value of that field. +// +// For more information about the fields that are generated by CloudWatch logs, +// see [Supported Logs and Discovered Fields]. +// +// [Supported Logs and Discovered Fields]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_AnalyzeLogData-discoverable-fields.html +type ResultField struct { + + // The log event field. + Field *string + + // The value of this field. + Value *string + + noSmithyDocumentSerde +} + +// Configuration for Amazon S3 destination where scheduled query results are +// delivered. +type S3Configuration struct { + + // The Amazon S3 URI where query results are delivered. Must be a valid S3 URI + // format. + // + // This member is required. + DestinationIdentifier *string + + // The ARN of the IAM role that grants permissions to write query results to the + // specified Amazon S3 destination. + // + // This member is required. + RoleArn *string + + // The Amazon Resource Name (ARN) of the KMS encryption key. Must belong to the + // same Amazon Web Services Region as the destination Amazon S3 bucket. + KmsKeyId *string + + // The Amazon Web Services accountId for the bucket owning account. + OwnerAccountId *string + + noSmithyDocumentSerde +} + +// This structure contains delivery configurations that apply only when the +// delivery destination resource is an S3 bucket. +type S3DeliveryConfiguration struct { + + // This parameter causes the S3 objects that contain delivered logs to use a + // prefix structure that allows for integration with Apache Hive. + EnableHiveCompatiblePath *bool + + // This string allows re-configuring the S3 object prefix to contain either static + // or variable sections. The valid variables to use in the suffix path will vary by + // each log source. To find the values supported for the suffix path for each log + // source, use the [DescribeConfigurationTemplates]operation and check the allowedSuffixPathFields field in the + // response. + // + // [DescribeConfigurationTemplates]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeConfigurationTemplates.html + SuffixPath *string + + noSmithyDocumentSerde +} + +// Represents a data source association with an S3 Table Integration, including +// its status and metadata. +type S3TableIntegrationSource struct { + + // The timestamp when the data source association was created. + CreatedTimeStamp *int64 + + // The data source associated with the S3 Table Integration. + DataSource *DataSource + + // The unique identifier for this data source association. + Identifier *string + + // The current status of the data source association. + Status S3TableIntegrationSourceStatus + + // Additional information about the status of the data source association. + StatusReason *string + + noSmithyDocumentSerde +} + +// Information about a destination where scheduled query results are processed, +// including processing status and any error messages. +type ScheduledQueryDestination struct { + + // The identifier for the destination where results are delivered. + DestinationIdentifier *string + + // The type of destination for query results. + DestinationType ScheduledQueryDestinationType + + // Error message if destination processing failed. + ErrorMessage *string + + // The identifier of the processed result at the destination. + ProcessedIdentifier *string + + // The processing status of the destination delivery. + Status ActionStatus + + noSmithyDocumentSerde +} + +// Summary information about a scheduled query, including basic configuration and +// execution status. +type ScheduledQuerySummary struct { + + // The timestamp when the scheduled query was created. + CreationTime *int64 + + // Configuration for where query results are delivered. + DestinationConfiguration *DestinationConfiguration + + // The status of the most recent execution. + LastExecutionStatus ExecutionStatus + + // The timestamp when the scheduled query was last executed. + LastTriggeredTime *int64 + + // The timestamp when the scheduled query was last updated. + LastUpdatedTime *int64 + + // The name of the scheduled query. + Name *string + + // The cron expression that defines when the scheduled query runs. + ScheduleExpression *string + + // The ARN of the scheduled query. + ScheduledQueryArn *string + + // The current state of the scheduled query. + State ScheduledQueryState + + // The timezone used for evaluating the schedule expression. + Timezone *string + + noSmithyDocumentSerde +} + +// Represents the search status of a log stream. +type SearchedLogStream struct { + + // The name of the log stream. + LogStreamName *string + + // Indicates whether all the events in this log stream were searched. + SearchedCompletely *bool + + noSmithyDocumentSerde +} + +// Use this processor to split a field into an array of strings using a delimiting +// character. +// +// For more information about this processor including examples, see [splitString] in the +// CloudWatch Logs User Guide. +// +// [splitString]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-splitString +type SplitString struct { + + // An array of SplitStringEntry objects, where each object contains the + // information about one field to split. + // + // This member is required. + Entries []SplitStringEntry + + noSmithyDocumentSerde +} + +// This object defines one log field that will be split with the [splitString] processor. +// +// [splitString]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-splitString +type SplitStringEntry struct { + + // The separator characters to split the string entry on. + // + // This member is required. + Delimiter *string + + // The key of the field to split. + // + // This member is required. + Source *string + + noSmithyDocumentSerde +} + +// This object includes the stream returned by your [StartLiveTail] request. +// +// The following types satisfy this interface: +// +// StartLiveTailResponseStreamMemberSessionStart +// StartLiveTailResponseStreamMemberSessionUpdate +// +// [StartLiveTail]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_StartLiveTail.html +type StartLiveTailResponseStream interface { + isStartLiveTailResponseStream() +} + +// This object contains information about this Live Tail session, including the +// log groups included and the log stream filters, if any. +type StartLiveTailResponseStreamMemberSessionStart struct { + Value LiveTailSessionStart + + noSmithyDocumentSerde +} + +func (*StartLiveTailResponseStreamMemberSessionStart) isStartLiveTailResponseStream() {} + +// This object contains the log events and session metadata. +type StartLiveTailResponseStreamMemberSessionUpdate struct { + Value LiveTailSessionUpdate + + noSmithyDocumentSerde +} + +func (*StartLiveTailResponseStreamMemberSessionUpdate) isStartLiveTailResponseStream() {} + +// Represents a subscription filter. +type SubscriptionFilter struct { + + // This parameter is valid only for log groups that have an active log + // transformer. For more information about log transformers, see [PutTransformer]. + // + // If this value is true , the subscription filter is applied on the transformed + // version of the log events instead of the original ingested log events. + // + // [PutTransformer]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutTransformer.html + ApplyOnTransformedLogs bool + + // The creation time of the subscription filter, expressed as the number of + // milliseconds after Jan 1, 1970 00:00:00 UTC . + CreationTime *int64 + + // The Amazon Resource Name (ARN) of the destination. + DestinationArn *string + + // The method used to distribute log data to the destination, which can be either + // random or grouped by log stream. + Distribution Distribution + + // The list of system fields that are included in the log events sent to the + // subscription destination. Returns the emitSystemFields value if it was + // specified when the subscription filter was created. + EmitSystemFields []string + + // The filter expression that specifies which log events are processed by this + // subscription filter based on system fields. Returns the fieldSelectionCriteria + // value if it was specified when the subscription filter was created. + FieldSelectionCriteria *string + + // The name of the subscription filter. + FilterName *string + + // A symbolic description of how CloudWatch Logs should interpret the data in each + // log event. For example, a log event can contain timestamps, IP addresses, + // strings, and so on. You use the filter pattern to specify what to look for in + // the log event message. + FilterPattern *string + + // The name of the log group. + LogGroupName *string + + // + RoleArn *string + + noSmithyDocumentSerde +} + +// This processor matches a key’s value against a regular expression and replaces +// all matches with a replacement string. +// +// For more information about this processor including examples, see [substituteString] in the +// CloudWatch Logs User Guide. +// +// [substituteString]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-substituteString +type SubstituteString struct { + + // An array of objects, where each object contains the information about one key + // to match and replace. + // + // This member is required. + Entries []SubstituteStringEntry + + noSmithyDocumentSerde +} + +// This object defines one log field key that will be replaced using the [substituteString] +// processor. +// +// [substituteString]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-substituteString +type SubstituteStringEntry struct { + + // The regular expression string to be replaced. Special regex characters such as + // [ and ] must be escaped using \\ when using double quotes and with \ when using + // single quotes. For more information, see [Class Pattern]on the Oracle web site. + // + // [Class Pattern]: https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/regex/Pattern.html + // + // This member is required. + From *string + + // The key to modify + // + // This member is required. + Source *string + + // The string to be substituted for each match of from + // + // This member is required. + To *string + + noSmithyDocumentSerde +} + +// If you are suppressing an anomaly temporariliy, this structure defines how long +// the suppression period is to be. +type SuppressionPeriod struct { + + // Specifies whether the value of value is in seconds, minutes, or hours. + SuppressionUnit SuppressionUnit + + // Specifies the number of seconds, minutes or hours to suppress this anomaly. + // There is no maximum. + Value int32 + + noSmithyDocumentSerde +} + +// This structure contains information for one log event that has been processed +// by a log transformer. +type TransformedLogRecord struct { + + // The original log event message before it was transformed. + EventMessage *string + + // The event number. + EventNumber int64 + + // The log event message after being transformed. + TransformedEventMessage *string + + noSmithyDocumentSerde +} + +// A record of a scheduled query execution, including execution status, timestamp, +// and destination processing results. +type TriggerHistoryRecord struct { + + // Information about destination processing for this query execution. + Destinations []ScheduledQueryDestination + + // Error message if the query execution failed. + ErrorMessage *string + + // The execution status of the scheduled query run. + ExecutionStatus ExecutionStatus + + // The unique identifier for this query execution. + QueryId *string + + // The timestamp when the scheduled query execution was triggered. + TriggeredTimestamp *int64 + + noSmithyDocumentSerde +} + +// Use this processor to remove leading and trailing whitespace. +// +// For more information about this processor including examples, see [trimString] in the +// CloudWatch Logs User Guide. +// +// [trimString]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-trimString +type TrimString struct { + + // The array containing the keys of the fields to trim. + // + // This member is required. + WithKeys []string + + noSmithyDocumentSerde +} + +// Use this processor to convert a value type associated with the specified key to +// the specified type. It's a casting processor that changes the types of the +// specified fields. Values can be converted into one of the following datatypes: +// integer , double , string and boolean . +// +// For more information about this processor including examples, see [trimString] in the +// CloudWatch Logs User Guide. +// +// [trimString]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-trimString +type TypeConverter struct { + + // An array of TypeConverterEntry objects, where each object contains the + // information about one field to change the type of. + // + // This member is required. + Entries []TypeConverterEntry + + noSmithyDocumentSerde +} + +// This object defines one value type that will be converted using the [typeConverter] processor. +// +// [typeConverter]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-typeConverter +type TypeConverterEntry struct { + + // The key with the value that is to be converted to a different type. + // + // This member is required. + Key *string + + // The type to convert the field value to. Valid values are integer , double , + // string and boolean . + // + // This member is required. + Type Type + + noSmithyDocumentSerde +} + +// This processor converts a string field to uppercase. +// +// For more information about this processor including examples, see [upperCaseString] in the +// CloudWatch Logs User Guide. +// +// [upperCaseString]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch-Logs-Transformation.html#CloudWatch-Logs-Transformation-upperCaseString +type UpperCaseString struct { + + // The array of containing the keys of the field to convert to uppercase. + // + // This member is required. + WithKeys []string + + noSmithyDocumentSerde +} + +type noSmithyDocumentSerde = smithydocument.NoSerde + +// UnknownUnionMember is returned when a union member is returned over the wire, +// but has an unknown tag. +type UnknownUnionMember struct { + Tag string + Value []byte + + noSmithyDocumentSerde +} + +func (*UnknownUnionMember) isGetLogObjectResponseStream() {} +func (*UnknownUnionMember) isIntegrationDetails() {} +func (*UnknownUnionMember) isResourceConfig() {} +func (*UnknownUnionMember) isStartLiveTailResponseStream() {} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/validators.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/validators.go new file mode 100644 index 00000000000..cab0383e7f6 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/validators.go @@ -0,0 +1,4607 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudwatchlogs + +import ( + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/middleware" +) + +type validateOpAssociateKmsKey struct { +} + +func (*validateOpAssociateKmsKey) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpAssociateKmsKey) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*AssociateKmsKeyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpAssociateKmsKeyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpAssociateSourceToS3TableIntegration struct { +} + +func (*validateOpAssociateSourceToS3TableIntegration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpAssociateSourceToS3TableIntegration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*AssociateSourceToS3TableIntegrationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpAssociateSourceToS3TableIntegrationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCancelExportTask struct { +} + +func (*validateOpCancelExportTask) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCancelExportTask) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CancelExportTaskInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCancelExportTaskInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCancelImportTask struct { +} + +func (*validateOpCancelImportTask) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCancelImportTask) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CancelImportTaskInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCancelImportTaskInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateDelivery struct { +} + +func (*validateOpCreateDelivery) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateDelivery) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateDeliveryInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateDeliveryInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateExportTask struct { +} + +func (*validateOpCreateExportTask) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateExportTask) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateExportTaskInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateExportTaskInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateImportTask struct { +} + +func (*validateOpCreateImportTask) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateImportTask) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateImportTaskInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateImportTaskInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateLogAnomalyDetector struct { +} + +func (*validateOpCreateLogAnomalyDetector) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateLogAnomalyDetector) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateLogAnomalyDetectorInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateLogAnomalyDetectorInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateLogGroup struct { +} + +func (*validateOpCreateLogGroup) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateLogGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateLogGroupInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateLogGroupInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateLogStream struct { +} + +func (*validateOpCreateLogStream) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateLogStream) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateLogStreamInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateLogStreamInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateLookupTable struct { +} + +func (*validateOpCreateLookupTable) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateLookupTable) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateLookupTableInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateLookupTableInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateScheduledQuery struct { +} + +func (*validateOpCreateScheduledQuery) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateScheduledQuery) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateScheduledQueryInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateScheduledQueryInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteAccountPolicy struct { +} + +func (*validateOpDeleteAccountPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteAccountPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteAccountPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteAccountPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteDataProtectionPolicy struct { +} + +func (*validateOpDeleteDataProtectionPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteDataProtectionPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteDataProtectionPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteDataProtectionPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteDeliveryDestination struct { +} + +func (*validateOpDeleteDeliveryDestination) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteDeliveryDestination) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteDeliveryDestinationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteDeliveryDestinationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteDeliveryDestinationPolicy struct { +} + +func (*validateOpDeleteDeliveryDestinationPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteDeliveryDestinationPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteDeliveryDestinationPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteDeliveryDestinationPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteDelivery struct { +} + +func (*validateOpDeleteDelivery) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteDelivery) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteDeliveryInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteDeliveryInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteDeliverySource struct { +} + +func (*validateOpDeleteDeliverySource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteDeliverySource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteDeliverySourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteDeliverySourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteDestination struct { +} + +func (*validateOpDeleteDestination) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteDestination) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteDestinationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteDestinationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteIndexPolicy struct { +} + +func (*validateOpDeleteIndexPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteIndexPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteIndexPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteIndexPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteIntegration struct { +} + +func (*validateOpDeleteIntegration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteIntegration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteIntegrationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteIntegrationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteLogAnomalyDetector struct { +} + +func (*validateOpDeleteLogAnomalyDetector) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteLogAnomalyDetector) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteLogAnomalyDetectorInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteLogAnomalyDetectorInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteLogGroup struct { +} + +func (*validateOpDeleteLogGroup) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteLogGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteLogGroupInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteLogGroupInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteLogStream struct { +} + +func (*validateOpDeleteLogStream) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteLogStream) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteLogStreamInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteLogStreamInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteLookupTable struct { +} + +func (*validateOpDeleteLookupTable) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteLookupTable) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteLookupTableInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteLookupTableInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteMetricFilter struct { +} + +func (*validateOpDeleteMetricFilter) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteMetricFilter) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteMetricFilterInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteMetricFilterInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteQueryDefinition struct { +} + +func (*validateOpDeleteQueryDefinition) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteQueryDefinition) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteQueryDefinitionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteQueryDefinitionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteRetentionPolicy struct { +} + +func (*validateOpDeleteRetentionPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteRetentionPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteRetentionPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteRetentionPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteScheduledQuery struct { +} + +func (*validateOpDeleteScheduledQuery) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteScheduledQuery) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteScheduledQueryInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteScheduledQueryInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteSubscriptionFilter struct { +} + +func (*validateOpDeleteSubscriptionFilter) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteSubscriptionFilter) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteSubscriptionFilterInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteSubscriptionFilterInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteTransformer struct { +} + +func (*validateOpDeleteTransformer) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteTransformer) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteTransformerInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteTransformerInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeAccountPolicies struct { +} + +func (*validateOpDescribeAccountPolicies) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeAccountPolicies) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeAccountPoliciesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeAccountPoliciesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeFieldIndexes struct { +} + +func (*validateOpDescribeFieldIndexes) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeFieldIndexes) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeFieldIndexesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeFieldIndexesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeImportTaskBatches struct { +} + +func (*validateOpDescribeImportTaskBatches) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeImportTaskBatches) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeImportTaskBatchesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeImportTaskBatchesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeIndexPolicies struct { +} + +func (*validateOpDescribeIndexPolicies) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeIndexPolicies) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeIndexPoliciesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeIndexPoliciesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeSubscriptionFilters struct { +} + +func (*validateOpDescribeSubscriptionFilters) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeSubscriptionFilters) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeSubscriptionFiltersInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeSubscriptionFiltersInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDisassociateSourceFromS3TableIntegration struct { +} + +func (*validateOpDisassociateSourceFromS3TableIntegration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDisassociateSourceFromS3TableIntegration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DisassociateSourceFromS3TableIntegrationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDisassociateSourceFromS3TableIntegrationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetDataProtectionPolicy struct { +} + +func (*validateOpGetDataProtectionPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetDataProtectionPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetDataProtectionPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetDataProtectionPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetDeliveryDestination struct { +} + +func (*validateOpGetDeliveryDestination) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetDeliveryDestination) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetDeliveryDestinationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetDeliveryDestinationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetDeliveryDestinationPolicy struct { +} + +func (*validateOpGetDeliveryDestinationPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetDeliveryDestinationPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetDeliveryDestinationPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetDeliveryDestinationPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetDelivery struct { +} + +func (*validateOpGetDelivery) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetDelivery) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetDeliveryInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetDeliveryInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetDeliverySource struct { +} + +func (*validateOpGetDeliverySource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetDeliverySource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetDeliverySourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetDeliverySourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetIntegration struct { +} + +func (*validateOpGetIntegration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetIntegration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetIntegrationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetIntegrationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetLogAnomalyDetector struct { +} + +func (*validateOpGetLogAnomalyDetector) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetLogAnomalyDetector) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetLogAnomalyDetectorInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetLogAnomalyDetectorInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetLogEvents struct { +} + +func (*validateOpGetLogEvents) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetLogEvents) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetLogEventsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetLogEventsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetLogFields struct { +} + +func (*validateOpGetLogFields) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetLogFields) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetLogFieldsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetLogFieldsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetLogObject struct { +} + +func (*validateOpGetLogObject) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetLogObject) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetLogObjectInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetLogObjectInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetLogRecord struct { +} + +func (*validateOpGetLogRecord) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetLogRecord) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetLogRecordInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetLogRecordInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetLookupTable struct { +} + +func (*validateOpGetLookupTable) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetLookupTable) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetLookupTableInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetLookupTableInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetQueryResults struct { +} + +func (*validateOpGetQueryResults) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetQueryResults) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetQueryResultsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetQueryResultsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetScheduledQueryHistory struct { +} + +func (*validateOpGetScheduledQueryHistory) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetScheduledQueryHistory) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetScheduledQueryHistoryInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetScheduledQueryHistoryInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetScheduledQuery struct { +} + +func (*validateOpGetScheduledQuery) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetScheduledQuery) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetScheduledQueryInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetScheduledQueryInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetTransformer struct { +} + +func (*validateOpGetTransformer) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetTransformer) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetTransformerInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetTransformerInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListAggregateLogGroupSummaries struct { +} + +func (*validateOpListAggregateLogGroupSummaries) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListAggregateLogGroupSummaries) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListAggregateLogGroupSummariesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListAggregateLogGroupSummariesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListLogGroupsForQuery struct { +} + +func (*validateOpListLogGroupsForQuery) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListLogGroupsForQuery) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListLogGroupsForQueryInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListLogGroupsForQueryInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListLogGroups struct { +} + +func (*validateOpListLogGroups) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListLogGroups) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListLogGroupsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListLogGroupsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListSourcesForS3TableIntegration struct { +} + +func (*validateOpListSourcesForS3TableIntegration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListSourcesForS3TableIntegration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListSourcesForS3TableIntegrationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListSourcesForS3TableIntegrationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListTagsForResource struct { +} + +func (*validateOpListTagsForResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListTagsForResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListTagsForResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListTagsForResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListTagsLogGroup struct { +} + +func (*validateOpListTagsLogGroup) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListTagsLogGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListTagsLogGroupInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListTagsLogGroupInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpPutAccountPolicy struct { +} + +func (*validateOpPutAccountPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutAccountPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutAccountPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutAccountPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpPutBearerTokenAuthentication struct { +} + +func (*validateOpPutBearerTokenAuthentication) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutBearerTokenAuthentication) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutBearerTokenAuthenticationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutBearerTokenAuthenticationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpPutDataProtectionPolicy struct { +} + +func (*validateOpPutDataProtectionPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutDataProtectionPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutDataProtectionPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutDataProtectionPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpPutDeliveryDestination struct { +} + +func (*validateOpPutDeliveryDestination) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutDeliveryDestination) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutDeliveryDestinationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutDeliveryDestinationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpPutDeliveryDestinationPolicy struct { +} + +func (*validateOpPutDeliveryDestinationPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutDeliveryDestinationPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutDeliveryDestinationPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutDeliveryDestinationPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpPutDeliverySource struct { +} + +func (*validateOpPutDeliverySource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutDeliverySource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutDeliverySourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutDeliverySourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpPutDestination struct { +} + +func (*validateOpPutDestination) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutDestination) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutDestinationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutDestinationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpPutDestinationPolicy struct { +} + +func (*validateOpPutDestinationPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutDestinationPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutDestinationPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutDestinationPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpPutIndexPolicy struct { +} + +func (*validateOpPutIndexPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutIndexPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutIndexPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutIndexPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpPutIntegration struct { +} + +func (*validateOpPutIntegration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutIntegration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutIntegrationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutIntegrationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpPutLogEvents struct { +} + +func (*validateOpPutLogEvents) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutLogEvents) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutLogEventsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutLogEventsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpPutLogGroupDeletionProtection struct { +} + +func (*validateOpPutLogGroupDeletionProtection) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutLogGroupDeletionProtection) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutLogGroupDeletionProtectionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutLogGroupDeletionProtectionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpPutMetricFilter struct { +} + +func (*validateOpPutMetricFilter) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutMetricFilter) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutMetricFilterInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutMetricFilterInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpPutQueryDefinition struct { +} + +func (*validateOpPutQueryDefinition) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutQueryDefinition) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutQueryDefinitionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutQueryDefinitionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpPutRetentionPolicy struct { +} + +func (*validateOpPutRetentionPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutRetentionPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutRetentionPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutRetentionPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpPutSubscriptionFilter struct { +} + +func (*validateOpPutSubscriptionFilter) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutSubscriptionFilter) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutSubscriptionFilterInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutSubscriptionFilterInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpPutTransformer struct { +} + +func (*validateOpPutTransformer) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutTransformer) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutTransformerInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutTransformerInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpStartLiveTail struct { +} + +func (*validateOpStartLiveTail) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStartLiveTail) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StartLiveTailInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStartLiveTailInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpStartQuery struct { +} + +func (*validateOpStartQuery) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStartQuery) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StartQueryInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStartQueryInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpStopQuery struct { +} + +func (*validateOpStopQuery) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStopQuery) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StopQueryInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStopQueryInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpTagLogGroup struct { +} + +func (*validateOpTagLogGroup) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpTagLogGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*TagLogGroupInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpTagLogGroupInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpTagResource struct { +} + +func (*validateOpTagResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpTagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*TagResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpTagResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpTestMetricFilter struct { +} + +func (*validateOpTestMetricFilter) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpTestMetricFilter) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*TestMetricFilterInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpTestMetricFilterInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpTestTransformer struct { +} + +func (*validateOpTestTransformer) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpTestTransformer) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*TestTransformerInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpTestTransformerInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUntagLogGroup struct { +} + +func (*validateOpUntagLogGroup) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUntagLogGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UntagLogGroupInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUntagLogGroupInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUntagResource struct { +} + +func (*validateOpUntagResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUntagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UntagResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUntagResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateAnomaly struct { +} + +func (*validateOpUpdateAnomaly) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateAnomaly) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateAnomalyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateAnomalyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateDeliveryConfiguration struct { +} + +func (*validateOpUpdateDeliveryConfiguration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateDeliveryConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateDeliveryConfigurationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateDeliveryConfigurationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateLogAnomalyDetector struct { +} + +func (*validateOpUpdateLogAnomalyDetector) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateLogAnomalyDetector) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateLogAnomalyDetectorInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateLogAnomalyDetectorInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateLookupTable struct { +} + +func (*validateOpUpdateLookupTable) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateLookupTable) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateLookupTableInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateLookupTableInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateScheduledQuery struct { +} + +func (*validateOpUpdateScheduledQuery) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateScheduledQuery) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateScheduledQueryInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateScheduledQueryInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +func addOpAssociateKmsKeyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAssociateKmsKey{}, middleware.After) +} + +func addOpAssociateSourceToS3TableIntegrationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAssociateSourceToS3TableIntegration{}, middleware.After) +} + +func addOpCancelExportTaskValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCancelExportTask{}, middleware.After) +} + +func addOpCancelImportTaskValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCancelImportTask{}, middleware.After) +} + +func addOpCreateDeliveryValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateDelivery{}, middleware.After) +} + +func addOpCreateExportTaskValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateExportTask{}, middleware.After) +} + +func addOpCreateImportTaskValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateImportTask{}, middleware.After) +} + +func addOpCreateLogAnomalyDetectorValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateLogAnomalyDetector{}, middleware.After) +} + +func addOpCreateLogGroupValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateLogGroup{}, middleware.After) +} + +func addOpCreateLogStreamValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateLogStream{}, middleware.After) +} + +func addOpCreateLookupTableValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateLookupTable{}, middleware.After) +} + +func addOpCreateScheduledQueryValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateScheduledQuery{}, middleware.After) +} + +func addOpDeleteAccountPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteAccountPolicy{}, middleware.After) +} + +func addOpDeleteDataProtectionPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteDataProtectionPolicy{}, middleware.After) +} + +func addOpDeleteDeliveryDestinationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteDeliveryDestination{}, middleware.After) +} + +func addOpDeleteDeliveryDestinationPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteDeliveryDestinationPolicy{}, middleware.After) +} + +func addOpDeleteDeliveryValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteDelivery{}, middleware.After) +} + +func addOpDeleteDeliverySourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteDeliverySource{}, middleware.After) +} + +func addOpDeleteDestinationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteDestination{}, middleware.After) +} + +func addOpDeleteIndexPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteIndexPolicy{}, middleware.After) +} + +func addOpDeleteIntegrationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteIntegration{}, middleware.After) +} + +func addOpDeleteLogAnomalyDetectorValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteLogAnomalyDetector{}, middleware.After) +} + +func addOpDeleteLogGroupValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteLogGroup{}, middleware.After) +} + +func addOpDeleteLogStreamValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteLogStream{}, middleware.After) +} + +func addOpDeleteLookupTableValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteLookupTable{}, middleware.After) +} + +func addOpDeleteMetricFilterValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteMetricFilter{}, middleware.After) +} + +func addOpDeleteQueryDefinitionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteQueryDefinition{}, middleware.After) +} + +func addOpDeleteRetentionPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteRetentionPolicy{}, middleware.After) +} + +func addOpDeleteScheduledQueryValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteScheduledQuery{}, middleware.After) +} + +func addOpDeleteSubscriptionFilterValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteSubscriptionFilter{}, middleware.After) +} + +func addOpDeleteTransformerValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteTransformer{}, middleware.After) +} + +func addOpDescribeAccountPoliciesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeAccountPolicies{}, middleware.After) +} + +func addOpDescribeFieldIndexesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeFieldIndexes{}, middleware.After) +} + +func addOpDescribeImportTaskBatchesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeImportTaskBatches{}, middleware.After) +} + +func addOpDescribeIndexPoliciesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeIndexPolicies{}, middleware.After) +} + +func addOpDescribeSubscriptionFiltersValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeSubscriptionFilters{}, middleware.After) +} + +func addOpDisassociateSourceFromS3TableIntegrationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDisassociateSourceFromS3TableIntegration{}, middleware.After) +} + +func addOpGetDataProtectionPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetDataProtectionPolicy{}, middleware.After) +} + +func addOpGetDeliveryDestinationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetDeliveryDestination{}, middleware.After) +} + +func addOpGetDeliveryDestinationPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetDeliveryDestinationPolicy{}, middleware.After) +} + +func addOpGetDeliveryValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetDelivery{}, middleware.After) +} + +func addOpGetDeliverySourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetDeliverySource{}, middleware.After) +} + +func addOpGetIntegrationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetIntegration{}, middleware.After) +} + +func addOpGetLogAnomalyDetectorValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetLogAnomalyDetector{}, middleware.After) +} + +func addOpGetLogEventsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetLogEvents{}, middleware.After) +} + +func addOpGetLogFieldsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetLogFields{}, middleware.After) +} + +func addOpGetLogObjectValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetLogObject{}, middleware.After) +} + +func addOpGetLogRecordValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetLogRecord{}, middleware.After) +} + +func addOpGetLookupTableValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetLookupTable{}, middleware.After) +} + +func addOpGetQueryResultsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetQueryResults{}, middleware.After) +} + +func addOpGetScheduledQueryHistoryValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetScheduledQueryHistory{}, middleware.After) +} + +func addOpGetScheduledQueryValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetScheduledQuery{}, middleware.After) +} + +func addOpGetTransformerValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetTransformer{}, middleware.After) +} + +func addOpListAggregateLogGroupSummariesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListAggregateLogGroupSummaries{}, middleware.After) +} + +func addOpListLogGroupsForQueryValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListLogGroupsForQuery{}, middleware.After) +} + +func addOpListLogGroupsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListLogGroups{}, middleware.After) +} + +func addOpListSourcesForS3TableIntegrationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListSourcesForS3TableIntegration{}, middleware.After) +} + +func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) +} + +func addOpListTagsLogGroupValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListTagsLogGroup{}, middleware.After) +} + +func addOpPutAccountPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutAccountPolicy{}, middleware.After) +} + +func addOpPutBearerTokenAuthenticationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutBearerTokenAuthentication{}, middleware.After) +} + +func addOpPutDataProtectionPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutDataProtectionPolicy{}, middleware.After) +} + +func addOpPutDeliveryDestinationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutDeliveryDestination{}, middleware.After) +} + +func addOpPutDeliveryDestinationPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutDeliveryDestinationPolicy{}, middleware.After) +} + +func addOpPutDeliverySourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutDeliverySource{}, middleware.After) +} + +func addOpPutDestinationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutDestination{}, middleware.After) +} + +func addOpPutDestinationPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutDestinationPolicy{}, middleware.After) +} + +func addOpPutIndexPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutIndexPolicy{}, middleware.After) +} + +func addOpPutIntegrationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutIntegration{}, middleware.After) +} + +func addOpPutLogEventsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutLogEvents{}, middleware.After) +} + +func addOpPutLogGroupDeletionProtectionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutLogGroupDeletionProtection{}, middleware.After) +} + +func addOpPutMetricFilterValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutMetricFilter{}, middleware.After) +} + +func addOpPutQueryDefinitionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutQueryDefinition{}, middleware.After) +} + +func addOpPutRetentionPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutRetentionPolicy{}, middleware.After) +} + +func addOpPutSubscriptionFilterValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutSubscriptionFilter{}, middleware.After) +} + +func addOpPutTransformerValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutTransformer{}, middleware.After) +} + +func addOpStartLiveTailValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStartLiveTail{}, middleware.After) +} + +func addOpStartQueryValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStartQuery{}, middleware.After) +} + +func addOpStopQueryValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStopQuery{}, middleware.After) +} + +func addOpTagLogGroupValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpTagLogGroup{}, middleware.After) +} + +func addOpTagResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpTagResource{}, middleware.After) +} + +func addOpTestMetricFilterValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpTestMetricFilter{}, middleware.After) +} + +func addOpTestTransformerValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpTestTransformer{}, middleware.After) +} + +func addOpUntagLogGroupValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUntagLogGroup{}, middleware.After) +} + +func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After) +} + +func addOpUpdateAnomalyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateAnomaly{}, middleware.After) +} + +func addOpUpdateDeliveryConfigurationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateDeliveryConfiguration{}, middleware.After) +} + +func addOpUpdateLogAnomalyDetectorValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateLogAnomalyDetector{}, middleware.After) +} + +func addOpUpdateLookupTableValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateLookupTable{}, middleware.After) +} + +func addOpUpdateScheduledQueryValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateScheduledQuery{}, middleware.After) +} + +func validateAddKeyEntries(v []types.AddKeyEntry) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AddKeyEntries"} + for i := range v { + if err := validateAddKeyEntry(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateAddKeyEntry(v *types.AddKeyEntry) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AddKeyEntry"} + if v.Key == nil { + invalidParams.Add(smithy.NewErrParamRequired("Key")) + } + if v.Value == nil { + invalidParams.Add(smithy.NewErrParamRequired("Value")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateAddKeys(v *types.AddKeys) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AddKeys"} + if v.Entries == nil { + invalidParams.Add(smithy.NewErrParamRequired("Entries")) + } else if v.Entries != nil { + if err := validateAddKeyEntries(v.Entries); err != nil { + invalidParams.AddNested("Entries", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCopyValue(v *types.CopyValue) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CopyValue"} + if v.Entries == nil { + invalidParams.Add(smithy.NewErrParamRequired("Entries")) + } else if v.Entries != nil { + if err := validateCopyValueEntries(v.Entries); err != nil { + invalidParams.AddNested("Entries", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCopyValueEntries(v []types.CopyValueEntry) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CopyValueEntries"} + for i := range v { + if err := validateCopyValueEntry(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCopyValueEntry(v *types.CopyValueEntry) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CopyValueEntry"} + if v.Source == nil { + invalidParams.Add(smithy.NewErrParamRequired("Source")) + } + if v.Target == nil { + invalidParams.Add(smithy.NewErrParamRequired("Target")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateDataSource(v *types.DataSource) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DataSource"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateDataSourceFilter(v *types.DataSourceFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DataSourceFilter"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateDataSourceFilters(v []types.DataSourceFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DataSourceFilters"} + for i := range v { + if err := validateDataSourceFilter(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateDateTimeConverter(v *types.DateTimeConverter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DateTimeConverter"} + if v.Source == nil { + invalidParams.Add(smithy.NewErrParamRequired("Source")) + } + if v.Target == nil { + invalidParams.Add(smithy.NewErrParamRequired("Target")) + } + if v.MatchPatterns == nil { + invalidParams.Add(smithy.NewErrParamRequired("MatchPatterns")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateDeleteKeys(v *types.DeleteKeys) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteKeys"} + if v.WithKeys == nil { + invalidParams.Add(smithy.NewErrParamRequired("WithKeys")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateDeliveryDestinationConfiguration(v *types.DeliveryDestinationConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeliveryDestinationConfiguration"} + if v.DestinationResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("DestinationResourceArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateDestinationConfiguration(v *types.DestinationConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DestinationConfiguration"} + if v.S3Configuration == nil { + invalidParams.Add(smithy.NewErrParamRequired("S3Configuration")) + } else if v.S3Configuration != nil { + if err := validateS3Configuration(v.S3Configuration); err != nil { + invalidParams.AddNested("S3Configuration", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateGrok(v *types.Grok) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Grok"} + if v.Match == nil { + invalidParams.Add(smithy.NewErrParamRequired("Match")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateInputLogEvent(v *types.InputLogEvent) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "InputLogEvent"} + if v.Timestamp == nil { + invalidParams.Add(smithy.NewErrParamRequired("Timestamp")) + } + if v.Message == nil { + invalidParams.Add(smithy.NewErrParamRequired("Message")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateInputLogEvents(v []types.InputLogEvent) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "InputLogEvents"} + for i := range v { + if err := validateInputLogEvent(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateListToMap(v *types.ListToMap) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListToMap"} + if v.Source == nil { + invalidParams.Add(smithy.NewErrParamRequired("Source")) + } + if v.Key == nil { + invalidParams.Add(smithy.NewErrParamRequired("Key")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateLowerCaseString(v *types.LowerCaseString) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "LowerCaseString"} + if v.WithKeys == nil { + invalidParams.Add(smithy.NewErrParamRequired("WithKeys")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateMetricTransformation(v *types.MetricTransformation) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MetricTransformation"} + if v.MetricName == nil { + invalidParams.Add(smithy.NewErrParamRequired("MetricName")) + } + if v.MetricNamespace == nil { + invalidParams.Add(smithy.NewErrParamRequired("MetricNamespace")) + } + if v.MetricValue == nil { + invalidParams.Add(smithy.NewErrParamRequired("MetricValue")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateMetricTransformations(v []types.MetricTransformation) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MetricTransformations"} + for i := range v { + if err := validateMetricTransformation(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateMoveKeyEntries(v []types.MoveKeyEntry) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MoveKeyEntries"} + for i := range v { + if err := validateMoveKeyEntry(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateMoveKeyEntry(v *types.MoveKeyEntry) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MoveKeyEntry"} + if v.Source == nil { + invalidParams.Add(smithy.NewErrParamRequired("Source")) + } + if v.Target == nil { + invalidParams.Add(smithy.NewErrParamRequired("Target")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateMoveKeys(v *types.MoveKeys) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MoveKeys"} + if v.Entries == nil { + invalidParams.Add(smithy.NewErrParamRequired("Entries")) + } else if v.Entries != nil { + if err := validateMoveKeyEntries(v.Entries); err != nil { + invalidParams.AddNested("Entries", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpenSearchResourceConfig(v *types.OpenSearchResourceConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OpenSearchResourceConfig"} + if v.DataSourceRoleArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("DataSourceRoleArn")) + } + if v.DashboardViewerPrincipals == nil { + invalidParams.Add(smithy.NewErrParamRequired("DashboardViewerPrincipals")) + } + if v.RetentionDays == nil { + invalidParams.Add(smithy.NewErrParamRequired("RetentionDays")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateParseToOCSF(v *types.ParseToOCSF) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ParseToOCSF"} + if len(v.EventSource) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("EventSource")) + } + if len(v.OcsfVersion) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("OcsfVersion")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateProcessor(v *types.Processor) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Processor"} + if v.AddKeys != nil { + if err := validateAddKeys(v.AddKeys); err != nil { + invalidParams.AddNested("AddKeys", err.(smithy.InvalidParamsError)) + } + } + if v.CopyValue != nil { + if err := validateCopyValue(v.CopyValue); err != nil { + invalidParams.AddNested("CopyValue", err.(smithy.InvalidParamsError)) + } + } + if v.DateTimeConverter != nil { + if err := validateDateTimeConverter(v.DateTimeConverter); err != nil { + invalidParams.AddNested("DateTimeConverter", err.(smithy.InvalidParamsError)) + } + } + if v.DeleteKeys != nil { + if err := validateDeleteKeys(v.DeleteKeys); err != nil { + invalidParams.AddNested("DeleteKeys", err.(smithy.InvalidParamsError)) + } + } + if v.Grok != nil { + if err := validateGrok(v.Grok); err != nil { + invalidParams.AddNested("Grok", err.(smithy.InvalidParamsError)) + } + } + if v.ListToMap != nil { + if err := validateListToMap(v.ListToMap); err != nil { + invalidParams.AddNested("ListToMap", err.(smithy.InvalidParamsError)) + } + } + if v.LowerCaseString != nil { + if err := validateLowerCaseString(v.LowerCaseString); err != nil { + invalidParams.AddNested("LowerCaseString", err.(smithy.InvalidParamsError)) + } + } + if v.MoveKeys != nil { + if err := validateMoveKeys(v.MoveKeys); err != nil { + invalidParams.AddNested("MoveKeys", err.(smithy.InvalidParamsError)) + } + } + if v.ParseToOCSF != nil { + if err := validateParseToOCSF(v.ParseToOCSF); err != nil { + invalidParams.AddNested("ParseToOCSF", err.(smithy.InvalidParamsError)) + } + } + if v.RenameKeys != nil { + if err := validateRenameKeys(v.RenameKeys); err != nil { + invalidParams.AddNested("RenameKeys", err.(smithy.InvalidParamsError)) + } + } + if v.SplitString != nil { + if err := validateSplitString(v.SplitString); err != nil { + invalidParams.AddNested("SplitString", err.(smithy.InvalidParamsError)) + } + } + if v.SubstituteString != nil { + if err := validateSubstituteString(v.SubstituteString); err != nil { + invalidParams.AddNested("SubstituteString", err.(smithy.InvalidParamsError)) + } + } + if v.TrimString != nil { + if err := validateTrimString(v.TrimString); err != nil { + invalidParams.AddNested("TrimString", err.(smithy.InvalidParamsError)) + } + } + if v.TypeConverter != nil { + if err := validateTypeConverter(v.TypeConverter); err != nil { + invalidParams.AddNested("TypeConverter", err.(smithy.InvalidParamsError)) + } + } + if v.UpperCaseString != nil { + if err := validateUpperCaseString(v.UpperCaseString); err != nil { + invalidParams.AddNested("UpperCaseString", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateProcessors(v []types.Processor) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Processors"} + for i := range v { + if err := validateProcessor(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateQueryParameter(v *types.QueryParameter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "QueryParameter"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateQueryParameterList(v []types.QueryParameter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "QueryParameterList"} + for i := range v { + if err := validateQueryParameter(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRenameKeyEntries(v []types.RenameKeyEntry) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RenameKeyEntries"} + for i := range v { + if err := validateRenameKeyEntry(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRenameKeyEntry(v *types.RenameKeyEntry) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RenameKeyEntry"} + if v.Key == nil { + invalidParams.Add(smithy.NewErrParamRequired("Key")) + } + if v.RenameTo == nil { + invalidParams.Add(smithy.NewErrParamRequired("RenameTo")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRenameKeys(v *types.RenameKeys) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RenameKeys"} + if v.Entries == nil { + invalidParams.Add(smithy.NewErrParamRequired("Entries")) + } else if v.Entries != nil { + if err := validateRenameKeyEntries(v.Entries); err != nil { + invalidParams.AddNested("Entries", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateResourceConfig(v types.ResourceConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ResourceConfig"} + switch uv := v.(type) { + case *types.ResourceConfigMemberOpenSearchResourceConfig: + if err := validateOpenSearchResourceConfig(&uv.Value); err != nil { + invalidParams.AddNested("[openSearchResourceConfig]", err.(smithy.InvalidParamsError)) + } + + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateS3Configuration(v *types.S3Configuration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "S3Configuration"} + if v.DestinationIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("DestinationIdentifier")) + } + if v.RoleArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("RoleArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateSplitString(v *types.SplitString) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SplitString"} + if v.Entries == nil { + invalidParams.Add(smithy.NewErrParamRequired("Entries")) + } else if v.Entries != nil { + if err := validateSplitStringEntries(v.Entries); err != nil { + invalidParams.AddNested("Entries", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateSplitStringEntries(v []types.SplitStringEntry) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SplitStringEntries"} + for i := range v { + if err := validateSplitStringEntry(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateSplitStringEntry(v *types.SplitStringEntry) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SplitStringEntry"} + if v.Source == nil { + invalidParams.Add(smithy.NewErrParamRequired("Source")) + } + if v.Delimiter == nil { + invalidParams.Add(smithy.NewErrParamRequired("Delimiter")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateSubstituteString(v *types.SubstituteString) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SubstituteString"} + if v.Entries == nil { + invalidParams.Add(smithy.NewErrParamRequired("Entries")) + } else if v.Entries != nil { + if err := validateSubstituteStringEntries(v.Entries); err != nil { + invalidParams.AddNested("Entries", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateSubstituteStringEntries(v []types.SubstituteStringEntry) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SubstituteStringEntries"} + for i := range v { + if err := validateSubstituteStringEntry(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateSubstituteStringEntry(v *types.SubstituteStringEntry) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SubstituteStringEntry"} + if v.Source == nil { + invalidParams.Add(smithy.NewErrParamRequired("Source")) + } + if v.From == nil { + invalidParams.Add(smithy.NewErrParamRequired("From")) + } + if v.To == nil { + invalidParams.Add(smithy.NewErrParamRequired("To")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateTrimString(v *types.TrimString) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TrimString"} + if v.WithKeys == nil { + invalidParams.Add(smithy.NewErrParamRequired("WithKeys")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateTypeConverter(v *types.TypeConverter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TypeConverter"} + if v.Entries == nil { + invalidParams.Add(smithy.NewErrParamRequired("Entries")) + } else if v.Entries != nil { + if err := validateTypeConverterEntries(v.Entries); err != nil { + invalidParams.AddNested("Entries", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateTypeConverterEntries(v []types.TypeConverterEntry) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TypeConverterEntries"} + for i := range v { + if err := validateTypeConverterEntry(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateTypeConverterEntry(v *types.TypeConverterEntry) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TypeConverterEntry"} + if v.Key == nil { + invalidParams.Add(smithy.NewErrParamRequired("Key")) + } + if len(v.Type) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Type")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateUpperCaseString(v *types.UpperCaseString) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpperCaseString"} + if v.WithKeys == nil { + invalidParams.Add(smithy.NewErrParamRequired("WithKeys")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpAssociateKmsKeyInput(v *AssociateKmsKeyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AssociateKmsKeyInput"} + if v.KmsKeyId == nil { + invalidParams.Add(smithy.NewErrParamRequired("KmsKeyId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpAssociateSourceToS3TableIntegrationInput(v *AssociateSourceToS3TableIntegrationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AssociateSourceToS3TableIntegrationInput"} + if v.IntegrationArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("IntegrationArn")) + } + if v.DataSource == nil { + invalidParams.Add(smithy.NewErrParamRequired("DataSource")) + } else if v.DataSource != nil { + if err := validateDataSource(v.DataSource); err != nil { + invalidParams.AddNested("DataSource", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCancelExportTaskInput(v *CancelExportTaskInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CancelExportTaskInput"} + if v.TaskId == nil { + invalidParams.Add(smithy.NewErrParamRequired("TaskId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCancelImportTaskInput(v *CancelImportTaskInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CancelImportTaskInput"} + if v.ImportId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ImportId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateDeliveryInput(v *CreateDeliveryInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateDeliveryInput"} + if v.DeliverySourceName == nil { + invalidParams.Add(smithy.NewErrParamRequired("DeliverySourceName")) + } + if v.DeliveryDestinationArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("DeliveryDestinationArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateExportTaskInput(v *CreateExportTaskInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateExportTaskInput"} + if v.LogGroupName == nil { + invalidParams.Add(smithy.NewErrParamRequired("LogGroupName")) + } + if v.From == nil { + invalidParams.Add(smithy.NewErrParamRequired("From")) + } + if v.To == nil { + invalidParams.Add(smithy.NewErrParamRequired("To")) + } + if v.Destination == nil { + invalidParams.Add(smithy.NewErrParamRequired("Destination")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateImportTaskInput(v *CreateImportTaskInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateImportTaskInput"} + if v.ImportSourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ImportSourceArn")) + } + if v.ImportRoleArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ImportRoleArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateLogAnomalyDetectorInput(v *CreateLogAnomalyDetectorInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateLogAnomalyDetectorInput"} + if v.LogGroupArnList == nil { + invalidParams.Add(smithy.NewErrParamRequired("LogGroupArnList")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateLogGroupInput(v *CreateLogGroupInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateLogGroupInput"} + if v.LogGroupName == nil { + invalidParams.Add(smithy.NewErrParamRequired("LogGroupName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateLogStreamInput(v *CreateLogStreamInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateLogStreamInput"} + if v.LogGroupName == nil { + invalidParams.Add(smithy.NewErrParamRequired("LogGroupName")) + } + if v.LogStreamName == nil { + invalidParams.Add(smithy.NewErrParamRequired("LogStreamName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateLookupTableInput(v *CreateLookupTableInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateLookupTableInput"} + if v.LookupTableName == nil { + invalidParams.Add(smithy.NewErrParamRequired("LookupTableName")) + } + if v.TableBody == nil { + invalidParams.Add(smithy.NewErrParamRequired("TableBody")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateScheduledQueryInput(v *CreateScheduledQueryInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateScheduledQueryInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if len(v.QueryLanguage) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("QueryLanguage")) + } + if v.QueryString == nil { + invalidParams.Add(smithy.NewErrParamRequired("QueryString")) + } + if v.ScheduleExpression == nil { + invalidParams.Add(smithy.NewErrParamRequired("ScheduleExpression")) + } + if v.DestinationConfiguration != nil { + if err := validateDestinationConfiguration(v.DestinationConfiguration); err != nil { + invalidParams.AddNested("DestinationConfiguration", err.(smithy.InvalidParamsError)) + } + } + if v.ExecutionRoleArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ExecutionRoleArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteAccountPolicyInput(v *DeleteAccountPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteAccountPolicyInput"} + if v.PolicyName == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyName")) + } + if len(v.PolicyType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("PolicyType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteDataProtectionPolicyInput(v *DeleteDataProtectionPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteDataProtectionPolicyInput"} + if v.LogGroupIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("LogGroupIdentifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteDeliveryDestinationInput(v *DeleteDeliveryDestinationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteDeliveryDestinationInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteDeliveryDestinationPolicyInput(v *DeleteDeliveryDestinationPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteDeliveryDestinationPolicyInput"} + if v.DeliveryDestinationName == nil { + invalidParams.Add(smithy.NewErrParamRequired("DeliveryDestinationName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteDeliveryInput(v *DeleteDeliveryInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteDeliveryInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteDeliverySourceInput(v *DeleteDeliverySourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteDeliverySourceInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteDestinationInput(v *DeleteDestinationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteDestinationInput"} + if v.DestinationName == nil { + invalidParams.Add(smithy.NewErrParamRequired("DestinationName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteIndexPolicyInput(v *DeleteIndexPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteIndexPolicyInput"} + if v.LogGroupIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("LogGroupIdentifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteIntegrationInput(v *DeleteIntegrationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteIntegrationInput"} + if v.IntegrationName == nil { + invalidParams.Add(smithy.NewErrParamRequired("IntegrationName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteLogAnomalyDetectorInput(v *DeleteLogAnomalyDetectorInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteLogAnomalyDetectorInput"} + if v.AnomalyDetectorArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("AnomalyDetectorArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteLogGroupInput(v *DeleteLogGroupInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteLogGroupInput"} + if v.LogGroupName == nil { + invalidParams.Add(smithy.NewErrParamRequired("LogGroupName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteLogStreamInput(v *DeleteLogStreamInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteLogStreamInput"} + if v.LogGroupName == nil { + invalidParams.Add(smithy.NewErrParamRequired("LogGroupName")) + } + if v.LogStreamName == nil { + invalidParams.Add(smithy.NewErrParamRequired("LogStreamName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteLookupTableInput(v *DeleteLookupTableInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteLookupTableInput"} + if v.LookupTableArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("LookupTableArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteMetricFilterInput(v *DeleteMetricFilterInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteMetricFilterInput"} + if v.LogGroupName == nil { + invalidParams.Add(smithy.NewErrParamRequired("LogGroupName")) + } + if v.FilterName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FilterName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteQueryDefinitionInput(v *DeleteQueryDefinitionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteQueryDefinitionInput"} + if v.QueryDefinitionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("QueryDefinitionId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteRetentionPolicyInput(v *DeleteRetentionPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteRetentionPolicyInput"} + if v.LogGroupName == nil { + invalidParams.Add(smithy.NewErrParamRequired("LogGroupName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteScheduledQueryInput(v *DeleteScheduledQueryInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteScheduledQueryInput"} + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteSubscriptionFilterInput(v *DeleteSubscriptionFilterInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteSubscriptionFilterInput"} + if v.LogGroupName == nil { + invalidParams.Add(smithy.NewErrParamRequired("LogGroupName")) + } + if v.FilterName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FilterName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteTransformerInput(v *DeleteTransformerInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteTransformerInput"} + if v.LogGroupIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("LogGroupIdentifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeAccountPoliciesInput(v *DescribeAccountPoliciesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeAccountPoliciesInput"} + if len(v.PolicyType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("PolicyType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeFieldIndexesInput(v *DescribeFieldIndexesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeFieldIndexesInput"} + if v.LogGroupIdentifiers == nil { + invalidParams.Add(smithy.NewErrParamRequired("LogGroupIdentifiers")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeImportTaskBatchesInput(v *DescribeImportTaskBatchesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeImportTaskBatchesInput"} + if v.ImportId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ImportId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeIndexPoliciesInput(v *DescribeIndexPoliciesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeIndexPoliciesInput"} + if v.LogGroupIdentifiers == nil { + invalidParams.Add(smithy.NewErrParamRequired("LogGroupIdentifiers")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeSubscriptionFiltersInput(v *DescribeSubscriptionFiltersInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeSubscriptionFiltersInput"} + if v.LogGroupName == nil { + invalidParams.Add(smithy.NewErrParamRequired("LogGroupName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDisassociateSourceFromS3TableIntegrationInput(v *DisassociateSourceFromS3TableIntegrationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DisassociateSourceFromS3TableIntegrationInput"} + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetDataProtectionPolicyInput(v *GetDataProtectionPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetDataProtectionPolicyInput"} + if v.LogGroupIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("LogGroupIdentifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetDeliveryDestinationInput(v *GetDeliveryDestinationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetDeliveryDestinationInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetDeliveryDestinationPolicyInput(v *GetDeliveryDestinationPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetDeliveryDestinationPolicyInput"} + if v.DeliveryDestinationName == nil { + invalidParams.Add(smithy.NewErrParamRequired("DeliveryDestinationName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetDeliveryInput(v *GetDeliveryInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetDeliveryInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetDeliverySourceInput(v *GetDeliverySourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetDeliverySourceInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetIntegrationInput(v *GetIntegrationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetIntegrationInput"} + if v.IntegrationName == nil { + invalidParams.Add(smithy.NewErrParamRequired("IntegrationName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetLogAnomalyDetectorInput(v *GetLogAnomalyDetectorInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetLogAnomalyDetectorInput"} + if v.AnomalyDetectorArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("AnomalyDetectorArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetLogEventsInput(v *GetLogEventsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetLogEventsInput"} + if v.LogStreamName == nil { + invalidParams.Add(smithy.NewErrParamRequired("LogStreamName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetLogFieldsInput(v *GetLogFieldsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetLogFieldsInput"} + if v.DataSourceName == nil { + invalidParams.Add(smithy.NewErrParamRequired("DataSourceName")) + } + if v.DataSourceType == nil { + invalidParams.Add(smithy.NewErrParamRequired("DataSourceType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetLogObjectInput(v *GetLogObjectInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetLogObjectInput"} + if v.LogObjectPointer == nil { + invalidParams.Add(smithy.NewErrParamRequired("LogObjectPointer")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetLogRecordInput(v *GetLogRecordInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetLogRecordInput"} + if v.LogRecordPointer == nil { + invalidParams.Add(smithy.NewErrParamRequired("LogRecordPointer")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetLookupTableInput(v *GetLookupTableInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetLookupTableInput"} + if v.LookupTableArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("LookupTableArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetQueryResultsInput(v *GetQueryResultsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetQueryResultsInput"} + if v.QueryId == nil { + invalidParams.Add(smithy.NewErrParamRequired("QueryId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetScheduledQueryHistoryInput(v *GetScheduledQueryHistoryInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetScheduledQueryHistoryInput"} + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + 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 validateOpGetScheduledQueryInput(v *GetScheduledQueryInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetScheduledQueryInput"} + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetTransformerInput(v *GetTransformerInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetTransformerInput"} + if v.LogGroupIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("LogGroupIdentifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListAggregateLogGroupSummariesInput(v *ListAggregateLogGroupSummariesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListAggregateLogGroupSummariesInput"} + if v.DataSources != nil { + if err := validateDataSourceFilters(v.DataSources); err != nil { + invalidParams.AddNested("DataSources", err.(smithy.InvalidParamsError)) + } + } + if len(v.GroupBy) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("GroupBy")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListLogGroupsForQueryInput(v *ListLogGroupsForQueryInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListLogGroupsForQueryInput"} + if v.QueryId == nil { + invalidParams.Add(smithy.NewErrParamRequired("QueryId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListLogGroupsInput(v *ListLogGroupsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListLogGroupsInput"} + if v.DataSources != nil { + if err := validateDataSourceFilters(v.DataSources); err != nil { + invalidParams.AddNested("DataSources", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListSourcesForS3TableIntegrationInput(v *ListSourcesForS3TableIntegrationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListSourcesForS3TableIntegrationInput"} + if v.IntegrationArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("IntegrationArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListTagsForResourceInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListTagsLogGroupInput(v *ListTagsLogGroupInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListTagsLogGroupInput"} + if v.LogGroupName == nil { + invalidParams.Add(smithy.NewErrParamRequired("LogGroupName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpPutAccountPolicyInput(v *PutAccountPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutAccountPolicyInput"} + if v.PolicyName == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyName")) + } + if v.PolicyDocument == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyDocument")) + } + if len(v.PolicyType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("PolicyType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpPutBearerTokenAuthenticationInput(v *PutBearerTokenAuthenticationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutBearerTokenAuthenticationInput"} + if v.LogGroupIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("LogGroupIdentifier")) + } + if v.BearerTokenAuthenticationEnabled == nil { + invalidParams.Add(smithy.NewErrParamRequired("BearerTokenAuthenticationEnabled")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpPutDataProtectionPolicyInput(v *PutDataProtectionPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutDataProtectionPolicyInput"} + if v.LogGroupIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("LogGroupIdentifier")) + } + if v.PolicyDocument == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyDocument")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpPutDeliveryDestinationInput(v *PutDeliveryDestinationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutDeliveryDestinationInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.DeliveryDestinationConfiguration != nil { + if err := validateDeliveryDestinationConfiguration(v.DeliveryDestinationConfiguration); err != nil { + invalidParams.AddNested("DeliveryDestinationConfiguration", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpPutDeliveryDestinationPolicyInput(v *PutDeliveryDestinationPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutDeliveryDestinationPolicyInput"} + if v.DeliveryDestinationName == nil { + invalidParams.Add(smithy.NewErrParamRequired("DeliveryDestinationName")) + } + if v.DeliveryDestinationPolicy == nil { + invalidParams.Add(smithy.NewErrParamRequired("DeliveryDestinationPolicy")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpPutDeliverySourceInput(v *PutDeliverySourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutDeliverySourceInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if v.LogType == nil { + invalidParams.Add(smithy.NewErrParamRequired("LogType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpPutDestinationInput(v *PutDestinationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutDestinationInput"} + if v.DestinationName == nil { + invalidParams.Add(smithy.NewErrParamRequired("DestinationName")) + } + if v.TargetArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("TargetArn")) + } + if v.RoleArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("RoleArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpPutDestinationPolicyInput(v *PutDestinationPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutDestinationPolicyInput"} + if v.DestinationName == nil { + invalidParams.Add(smithy.NewErrParamRequired("DestinationName")) + } + if v.AccessPolicy == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccessPolicy")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpPutIndexPolicyInput(v *PutIndexPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutIndexPolicyInput"} + if v.LogGroupIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("LogGroupIdentifier")) + } + if v.PolicyDocument == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyDocument")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpPutIntegrationInput(v *PutIntegrationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutIntegrationInput"} + if v.IntegrationName == nil { + invalidParams.Add(smithy.NewErrParamRequired("IntegrationName")) + } + if v.ResourceConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceConfig")) + } else if v.ResourceConfig != nil { + if err := validateResourceConfig(v.ResourceConfig); err != nil { + invalidParams.AddNested("ResourceConfig", err.(smithy.InvalidParamsError)) + } + } + if len(v.IntegrationType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("IntegrationType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpPutLogEventsInput(v *PutLogEventsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutLogEventsInput"} + if v.LogGroupName == nil { + invalidParams.Add(smithy.NewErrParamRequired("LogGroupName")) + } + if v.LogStreamName == nil { + invalidParams.Add(smithy.NewErrParamRequired("LogStreamName")) + } + if v.LogEvents == nil { + invalidParams.Add(smithy.NewErrParamRequired("LogEvents")) + } else if v.LogEvents != nil { + if err := validateInputLogEvents(v.LogEvents); err != nil { + invalidParams.AddNested("LogEvents", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpPutLogGroupDeletionProtectionInput(v *PutLogGroupDeletionProtectionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutLogGroupDeletionProtectionInput"} + if v.LogGroupIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("LogGroupIdentifier")) + } + if v.DeletionProtectionEnabled == nil { + invalidParams.Add(smithy.NewErrParamRequired("DeletionProtectionEnabled")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpPutMetricFilterInput(v *PutMetricFilterInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutMetricFilterInput"} + if v.LogGroupName == nil { + invalidParams.Add(smithy.NewErrParamRequired("LogGroupName")) + } + if v.FilterName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FilterName")) + } + if v.FilterPattern == nil { + invalidParams.Add(smithy.NewErrParamRequired("FilterPattern")) + } + if v.MetricTransformations == nil { + invalidParams.Add(smithy.NewErrParamRequired("MetricTransformations")) + } else if v.MetricTransformations != nil { + if err := validateMetricTransformations(v.MetricTransformations); err != nil { + invalidParams.AddNested("MetricTransformations", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpPutQueryDefinitionInput(v *PutQueryDefinitionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutQueryDefinitionInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.QueryString == nil { + invalidParams.Add(smithy.NewErrParamRequired("QueryString")) + } + if v.Parameters != nil { + if err := validateQueryParameterList(v.Parameters); err != nil { + invalidParams.AddNested("Parameters", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpPutRetentionPolicyInput(v *PutRetentionPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutRetentionPolicyInput"} + if v.LogGroupName == nil { + invalidParams.Add(smithy.NewErrParamRequired("LogGroupName")) + } + if v.RetentionInDays == nil { + invalidParams.Add(smithy.NewErrParamRequired("RetentionInDays")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpPutSubscriptionFilterInput(v *PutSubscriptionFilterInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutSubscriptionFilterInput"} + if v.LogGroupName == nil { + invalidParams.Add(smithy.NewErrParamRequired("LogGroupName")) + } + if v.FilterName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FilterName")) + } + if v.FilterPattern == nil { + invalidParams.Add(smithy.NewErrParamRequired("FilterPattern")) + } + if v.DestinationArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("DestinationArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpPutTransformerInput(v *PutTransformerInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutTransformerInput"} + if v.LogGroupIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("LogGroupIdentifier")) + } + if v.TransformerConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("TransformerConfig")) + } else if v.TransformerConfig != nil { + if err := validateProcessors(v.TransformerConfig); err != nil { + invalidParams.AddNested("TransformerConfig", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpStartLiveTailInput(v *StartLiveTailInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StartLiveTailInput"} + if v.LogGroupIdentifiers == nil { + invalidParams.Add(smithy.NewErrParamRequired("LogGroupIdentifiers")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpStartQueryInput(v *StartQueryInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StartQueryInput"} + if v.StartTime == nil { + invalidParams.Add(smithy.NewErrParamRequired("StartTime")) + } + if v.EndTime == nil { + invalidParams.Add(smithy.NewErrParamRequired("EndTime")) + } + if v.QueryString == nil { + invalidParams.Add(smithy.NewErrParamRequired("QueryString")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpStopQueryInput(v *StopQueryInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StopQueryInput"} + if v.QueryId == nil { + invalidParams.Add(smithy.NewErrParamRequired("QueryId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpTagLogGroupInput(v *TagLogGroupInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TagLogGroupInput"} + if v.LogGroupName == nil { + invalidParams.Add(smithy.NewErrParamRequired("LogGroupName")) + } + if v.Tags == nil { + invalidParams.Add(smithy.NewErrParamRequired("Tags")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpTagResourceInput(v *TagResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TagResourceInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if v.Tags == nil { + invalidParams.Add(smithy.NewErrParamRequired("Tags")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpTestMetricFilterInput(v *TestMetricFilterInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TestMetricFilterInput"} + if v.FilterPattern == nil { + invalidParams.Add(smithy.NewErrParamRequired("FilterPattern")) + } + if v.LogEventMessages == nil { + invalidParams.Add(smithy.NewErrParamRequired("LogEventMessages")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpTestTransformerInput(v *TestTransformerInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TestTransformerInput"} + if v.TransformerConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("TransformerConfig")) + } else if v.TransformerConfig != nil { + if err := validateProcessors(v.TransformerConfig); err != nil { + invalidParams.AddNested("TransformerConfig", err.(smithy.InvalidParamsError)) + } + } + if v.LogEventMessages == nil { + invalidParams.Add(smithy.NewErrParamRequired("LogEventMessages")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUntagLogGroupInput(v *UntagLogGroupInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UntagLogGroupInput"} + if v.LogGroupName == nil { + invalidParams.Add(smithy.NewErrParamRequired("LogGroupName")) + } + if v.Tags == nil { + invalidParams.Add(smithy.NewErrParamRequired("Tags")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUntagResourceInput(v *UntagResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UntagResourceInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if v.TagKeys == nil { + invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateAnomalyInput(v *UpdateAnomalyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateAnomalyInput"} + if v.AnomalyDetectorArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("AnomalyDetectorArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateDeliveryConfigurationInput(v *UpdateDeliveryConfigurationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateDeliveryConfigurationInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateLogAnomalyDetectorInput(v *UpdateLogAnomalyDetectorInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateLogAnomalyDetectorInput"} + if v.AnomalyDetectorArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("AnomalyDetectorArn")) + } + if v.Enabled == nil { + invalidParams.Add(smithy.NewErrParamRequired("Enabled")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateLookupTableInput(v *UpdateLookupTableInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateLookupTableInput"} + if v.LookupTableArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("LookupTableArn")) + } + if v.TableBody == nil { + invalidParams.Add(smithy.NewErrParamRequired("TableBody")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateScheduledQueryInput(v *UpdateScheduledQueryInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateScheduledQueryInput"} + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if len(v.QueryLanguage) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("QueryLanguage")) + } + if v.QueryString == nil { + invalidParams.Add(smithy.NewErrParamRequired("QueryString")) + } + if v.ScheduleExpression == nil { + invalidParams.Add(smithy.NewErrParamRequired("ScheduleExpression")) + } + if v.DestinationConfiguration != nil { + if err := validateDestinationConfiguration(v.DestinationConfiguration); err != nil { + invalidParams.AddNested("DestinationConfiguration", err.(smithy.InvalidParamsError)) + } + } + if v.ExecutionRoleArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ExecutionRoleArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/CHANGELOG.md new file mode 100644 index 00000000000..0d14e257ce2 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/CHANGELOG.md @@ -0,0 +1,845 @@ +# v1.68.13 (2026-03-26) + +* **Bug Fix**: Fix a bug where a recorded clock skew could persist on the client even if the client and server clock ended up realigning. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.68.12 (2026-03-13) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.68.11 (2026-03-03) + +* **Dependency Update**: Bump minimum Go version to 1.24 +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.68.10 (2026-02-23) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.68.9 (2026-01-09) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.68.8 (2025-12-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.68.7 (2025-12-02) + +* **Dependency Update**: Updated to the latest SDK module versions +* **Dependency Update**: Upgrade to smithy-go v1.24.0. Notably this version of the library reduces the allocation footprint of the middleware system. We observe a ~10% reduction in allocations per SDK call with this change. + +# v1.68.6 (2025-11-25) + +* **Bug Fix**: Add error check for endpoint param binding during auth scheme resolution to fix panic reported in #3234 + +# v1.68.5 (2025-11-19.2) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.68.4 (2025-11-12) + +* **Bug Fix**: Further reduce allocation overhead when the metrics system isn't in-use. +* **Bug Fix**: Reduce allocation overhead when the client doesn't have any HTTP interceptors configured. +* **Bug Fix**: Remove blank trace spans towards the beginning of the request that added no additional information. This conveys a slight reduction in overall allocations. + +# v1.68.3 (2025-11-11) + +* **Bug Fix**: Return validation error if input region is not a valid host label. + +# v1.68.2 (2025-11-04) + +* **Dependency Update**: Updated to the latest SDK module versions +* **Dependency Update**: Upgrade to smithy-go v1.23.2 which should convey some passive reduction of overall allocations, especially when not using the metrics system. + +# v1.68.1 (2025-10-30) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.68.0 (2025-10-23) + +* **Feature**: Update endpoint ruleset parameters casing +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.67.6 (2025-10-16) + +* **Dependency Update**: Bump minimum Go version to 1.23. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.67.5 (2025-09-26) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.67.4 (2025-09-23) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.67.3 (2025-09-10) + +* No change notes available for this release. + +# v1.67.2 (2025-09-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.67.1 (2025-08-29) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.67.0 (2025-08-27) + +* **Feature**: Remove incorrect endpoint tests +* **Dependency Update**: Update to smithy-go v1.23.0. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.66.2 (2025-08-21) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.66.1 (2025-08-20) + +* **Bug Fix**: Remove unused deserialization code. + +# v1.66.0 (2025-08-12) + +* **Feature**: AWS CodeBuild now supports PullRequestBuildPolicy in webhook object. + +# v1.65.0 (2025-08-11) + +* **Feature**: Add support for configuring per-service Options via callback on global config. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.64.0 (2025-08-07) + +* **Feature**: AWS CodeBuild now supports comment-based pull request control. + +# v1.63.0 (2025-08-04) + +* **Feature**: Support configurable auth scheme preferences in service clients via AWS_AUTH_SCHEME_PREFERENCE in the environment, auth_scheme_preference in the config file, and through in-code settings on LoadDefaultConfig and client constructor methods. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.62.1 (2025-07-30) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.62.0 (2025-07-28) + +* **Feature**: Add support for HTTP interceptors. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.61.3 (2025-07-19) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.61.2 (2025-06-17) + +* **Dependency Update**: Update to smithy-go v1.22.4. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.61.1 (2025-06-10) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.61.0 (2025-05-15) + +* **Feature**: AWS CodeBuild now supports Docker Server capability + +# v1.60.0 (2025-04-23) + +* **Feature**: Add support for custom instance type for reserved capacity fleets + +# v1.59.0 (2025-04-07) + +* **Feature**: AWS CodeBuild now offers an enhanced debugging experience. + +# v1.58.1 (2025-04-03) + +* No change notes available for this release. + +# v1.58.0 (2025-04-02) + +* **Feature**: This release adds support for environment type WINDOWS_SERVER_2022_CONTAINER in ProjectEnvironment + +# v1.57.0 (2025-03-28) + +* **Feature**: This release adds support for cacheNamespace in ProjectCache + +# v1.56.0 (2025-03-13) + +* **Feature**: AWS CodeBuild now supports webhook filtering by organization name + +# v1.55.1 (2025-03-04.2) + +* **Bug Fix**: Add assurance test for operation order. + +# v1.55.0 (2025-02-27) + +* **Feature**: Track credential providers via User-Agent Feature ids +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.54.0 (2025-02-25) + +* **Feature**: Adding "reportArns" field in output of BatchGetBuildBatches API. "reportArns" is an array that contains the ARNs of reports created by merging reports from builds associated with the batch build. + +# v1.53.0 (2025-02-20) + +* **Feature**: Add webhook status and status message to AWS CodeBuild webhooks + +# v1.52.1 (2025-02-18) + +* **Bug Fix**: Bump go version to 1.22 +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.52.0 (2025-02-14) + +* **Feature**: Added test suite names to test case metadata + +# v1.51.3 (2025-02-12) + +* **Documentation**: Add note for the RUNNER_BUILDKITE_BUILD buildType. + +# v1.51.2 (2025-02-05) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.51.1 (2025-02-04) + +* No change notes available for this release. + +# v1.51.0 (2025-01-31) + +* **Feature**: Added support for CodeBuild self-hosted Buildkite runner builds +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.50.4 (2025-01-30) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.50.3 (2025-01-24) + +* **Dependency Update**: Updated to the latest SDK module versions +* **Dependency Update**: Upgrade to smithy-go v1.22.2. + +# v1.50.2 (2025-01-17) + +* **Bug Fix**: Fix bug where credentials weren't refreshed during retry loop. + +# v1.50.1 (2025-01-15) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.50.0 (2025-01-09) + +* **Feature**: AWS CodeBuild Now Supports BuildBatch in Reserved Capacity and Lambda +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.49.4 (2024-12-19) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.49.3 (2024-12-13) + +* No change notes available for this release. + +# v1.49.2 (2024-12-02) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.49.1 (2024-11-18) + +* **Dependency Update**: Update to smithy-go v1.22.1. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.49.0 (2024-11-12) + +* **Feature**: AWS CodeBuild now supports non-containerized Linux and Windows builds on Reserved Capacity. + +# v1.48.1 (2024-11-07) + +* **Bug Fix**: Adds case-insensitive handling of error message fields in service responses + +# v1.48.0 (2024-11-06) + +* **Feature**: AWS CodeBuild now adds additional compute types for reserved capacity fleet. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.47.1 (2024-10-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.47.0 (2024-10-25) + +* **Feature**: AWS CodeBuild now supports automatically retrying failed builds + +# v1.46.0 (2024-10-15) + +* **Feature**: Enable proxy for reserved capacity fleet. + +# v1.45.2 (2024-10-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.45.1 (2024-10-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.45.0 (2024-10-04) + +* **Feature**: Add support for HTTP client metrics. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.44.4 (2024-10-03) + +* No change notes available for this release. + +# v1.44.3 (2024-09-27) + +* No change notes available for this release. + +# v1.44.2 (2024-09-25) + +* No change notes available for this release. + +# v1.44.1 (2024-09-23) + +* No change notes available for this release. + +# v1.44.0 (2024-09-20) + +* **Feature**: Add tracing and metrics support to service clients. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.43.0 (2024-09-17) + +* **Feature**: GitLab Enhancements - Add support for Self-Hosted GitLab runners in CodeBuild. Add group webhooks +* **Bug Fix**: **BREAKFIX**: Only generate AccountIDEndpointMode config for services that use it. This is a compiler break, but removes no actual functionality, as no services currently use the account ID in endpoint resolution. + +# v1.42.3 (2024-09-04) + +* No change notes available for this release. + +# v1.42.2 (2024-09-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.42.1 (2024-08-23) + +* **Documentation**: Added support for the MAC_ARM environment type for CodeBuild fleets. + +# v1.42.0 (2024-08-19) + +* **Feature**: AWS CodeBuild now supports creating fleets with macOS platform for running builds. + +# v1.41.1 (2024-08-15) + +* **Dependency Update**: Bump minimum Go version to 1.21. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.41.0 (2024-08-14) + +* **Feature**: AWS CodeBuild now supports using Secrets Manager to store git credentials and using multiple source credentials in a single project. + +# v1.40.3 (2024-07-10.2) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.40.2 (2024-07-10) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.40.1 (2024-06-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.40.0 (2024-06-26) + +* **Feature**: Support list-of-string endpoint parameter. + +# v1.39.1 (2024-06-19) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.39.0 (2024-06-18) + +* **Feature**: Track usage of various AWS SDK features in user-agent string. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.38.0 (2024-06-17) + +* **Feature**: AWS CodeBuild now supports global and organization GitHub webhooks +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.37.3 (2024-06-07) + +* **Bug Fix**: Add clock skew correction on all service clients +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.37.2 (2024-06-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.37.1 (2024-05-31) + +* **Documentation**: AWS CodeBuild now supports Self-hosted GitHub Actions runners for Github Enterprise + +# v1.37.0 (2024-05-29) + +* **Feature**: AWS CodeBuild now supports manually creating GitHub webhooks + +# v1.36.1 (2024-05-23) + +* No change notes available for this release. + +# v1.36.0 (2024-05-17) + +* **Feature**: Aws CodeBuild now supports 36 hours build timeout + +# v1.35.1 (2024-05-16) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.35.0 (2024-05-15) + +* **Feature**: CodeBuild Reserved Capacity VPC Support +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.34.2 (2024-05-08) + +* **Bug Fix**: GoDoc improvement + +# v1.34.1 (2024-04-11) + +* **Documentation**: Support access tokens for Bitbucket sources + +# v1.34.0 (2024-04-09) + +* **Feature**: Add new webhook filter types for GitHub webhooks + +# v1.33.0 (2024-03-29) + +* **Feature**: Add new fleet status code for Reserved Capacity. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.32.0 (2024-03-25) + +* **Feature**: Supporting GitLab and GitLab Self Managed as source types in AWS CodeBuild. + +# v1.31.2 (2024-03-20) + +* **Documentation**: This release adds support for new webhook events (RELEASED and PRERELEASED) and filter types (TAG_NAME and RELEASE_NAME). + +# v1.31.1 (2024-03-18) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.31.0 (2024-03-15) + +* **Feature**: AWS CodeBuild now supports overflow behavior on Reserved Capacity. + +# v1.30.3 (2024-03-08) + +* **Documentation**: This release adds support for a new webhook event: PULL_REQUEST_CLOSED. + +# v1.30.2 (2024-03-07) + +* **Bug Fix**: Remove dependency on go-cmp. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.30.1 (2024-02-23) + +* **Bug Fix**: Move all common, SDK-side middleware stack ops into the service client module to prevent cross-module compatibility issues in the future. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.30.0 (2024-02-22) + +* **Feature**: Add middleware stack snapshot tests. + +# v1.29.3 (2024-02-21) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.29.2 (2024-02-20) + +* **Bug Fix**: When sourcing values for a service's `EndpointParameters`, the lack of a configured region (i.e. `options.Region == ""`) will now translate to a `nil` value for `EndpointParameters.Region` instead of a pointer to the empty string `""`. This will result in a much more explicit error when calling an operation instead of an obscure hostname lookup failure. + +# v1.29.1 (2024-02-15) + +* **Bug Fix**: Correct failure to determine the error type in awsJson services that could occur when errors were modeled with a non-string `code` field. + +# v1.29.0 (2024-02-13) + +* **Feature**: Bump minimum Go version to 1.20 per our language support policy. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.28.0 (2024-01-19) + +* **Feature**: Release CodeBuild Reserved Capacity feature + +# v1.27.0 (2024-01-08) + +* **Feature**: Aws CodeBuild now supports new compute type BUILD_GENERAL1_XLARGE + +# v1.26.6 (2024-01-04) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.26.5 (2023-12-08) + +* **Bug Fix**: Reinstate presence of default Retryer in functional options, but still respect max attempts set therein. + +# v1.26.4 (2023-12-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.26.3 (2023-12-06) + +* **Bug Fix**: Restore pre-refactor auth behavior where all operations could technically be performed anonymously. + +# v1.26.2 (2023-12-01) + +* **Bug Fix**: Correct wrapping of errors in authentication workflow. +* **Bug Fix**: Correctly recognize cache-wrapped instances of AnonymousCredentials at client construction. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.26.1 (2023-11-30) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.26.0 (2023-11-29) + +* **Feature**: Expose Options() accessor on service clients. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.25.5 (2023-11-28.2) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.25.4 (2023-11-28) + +* **Bug Fix**: Respect setting RetryMaxAttempts in functional options at client construction. + +# v1.25.3 (2023-11-20) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.25.2 (2023-11-15) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.25.1 (2023-11-09) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.25.0 (2023-11-06) + +* **Feature**: AWS CodeBuild now supports AWS Lambda compute. + +# v1.24.0 (2023-11-01) + +* **Feature**: Adds support for configured endpoints via environment variables and the AWS shared configuration file. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.23.0 (2023-10-31) + +* **Feature**: **BREAKING CHANGE**: Bump minimum go version to 1.19 per the revised [go version support policy](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-aligns-with-go-release-policy-on-supported-runtimes/). +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.22.2 (2023-10-12) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.22.1 (2023-10-06) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.22.0 (2023-09-18) + +* **Announcement**: [BREAKFIX] Change in MaxResults datatype from value to pointer type in cognito-sync service. +* **Feature**: Adds several endpoint ruleset changes across all models: smaller rulesets, removed non-unique regional endpoints, fixes FIPS and DualStack endpoints, and make region not required in SDK::Endpoint. Additional breakfix to cognito-sync field. + +# v1.21.5 (2023-08-21) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.21.4 (2023-08-18) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.21.3 (2023-08-17) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.21.2 (2023-08-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.21.1 (2023-08-01) + +* No change notes available for this release. + +# v1.21.0 (2023-07-31) + +* **Feature**: Adds support for smithy-modeled endpoint resolution. A new rules-based endpoint resolution will be added to the SDK which will supercede and deprecate existing endpoint resolution. Specifically, EndpointResolver will be deprecated while BaseEndpoint and EndpointResolverV2 will take its place. For more information, please see the Endpoints section in our Developer Guide. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.20.17 (2023-07-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.20.16 (2023-07-13) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.20.15 (2023-06-15) + +* No change notes available for this release. + +# v1.20.14 (2023-06-13) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.20.13 (2023-05-25) + +* No change notes available for this release. + +# v1.20.12 (2023-05-04) + +* No change notes available for this release. + +# v1.20.11 (2023-04-24) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.20.10 (2023-04-10) + +* No change notes available for this release. + +# v1.20.9 (2023-04-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.20.8 (2023-04-05) + +* No change notes available for this release. + +# v1.20.7 (2023-03-21) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.20.6 (2023-03-10) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.20.5 (2023-02-22) + +* **Bug Fix**: Prevent nil pointer dereference when retrieving error codes. + +# v1.20.4 (2023-02-20) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.20.3 (2023-02-15) + +* **Announcement**: When receiving an error response in restJson-based services, an incorrect error type may have been returned based on the content of the response. This has been fixed via PR #2012 tracked in issue #1910. +* **Bug Fix**: Correct error type parsing for restJson services. + +# v1.20.2 (2023-02-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.20.1 (2023-01-20) + +* No change notes available for this release. + +# v1.20.0 (2023-01-05) + +* **Feature**: Add `ErrorCodeOverride` field to all error structs (aws/smithy-go#401). + +# v1.19.21 (2022-12-15) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.19.20 (2022-12-02) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.19.19 (2022-10-24) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.19.18 (2022-10-21) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.19.17 (2022-09-20) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.19.16 (2022-09-14) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.19.15 (2022-09-02) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.19.14 (2022-08-31) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.19.13 (2022-08-29) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.19.12 (2022-08-11) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.19.11 (2022-08-09) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.19.10 (2022-08-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.19.9 (2022-08-01) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.19.8 (2022-07-05) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.19.7 (2022-06-29) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.19.6 (2022-06-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.19.5 (2022-05-17) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.19.4 (2022-04-25) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.19.3 (2022-03-30) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.19.2 (2022-03-24) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.19.1 (2022-03-23) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.19.0 (2022-03-08) + +* **Feature**: Updated `github.com/aws/smithy-go` to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.0 (2022-02-24) + +* **Feature**: API client updated +* **Feature**: Adds RetryMaxAttempts and RetryMod to API client Options. This allows the API clients' default Retryer to be configured from the shared configuration files or environment variables. Adding a new Retry mode of `Adaptive`. `Adaptive` retry mode is an experimental mode, adding client rate limiting when throttles reponses are received from an API. See [retry.AdaptiveMode](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws/retry#AdaptiveMode) for more details, and configuration options. +* **Feature**: Updated `github.com/aws/smithy-go` to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.0 (2022-01-14) + +* **Feature**: Updated `github.com/aws/smithy-go` to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.16.0 (2022-01-07) + +* **Feature**: Updated `github.com/aws/smithy-go` to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.15.0 (2021-12-21) + +* **Feature**: API Paginators now support specifying the initial starting token, and support stopping on empty string tokens. + +# v1.14.2 (2021-12-02) + +* **Bug Fix**: Fixes a bug that prevented aws.EndpointResolverWithOptions from being used by the service client. ([#1514](https://github.com/aws/aws-sdk-go-v2/pull/1514)) +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.14.1 (2021-11-19) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.14.0 (2021-11-12) + +* **Feature**: Service clients now support custom endpoints that have an initial URI path defined. + +# v1.13.0 (2021-11-06) + +* **Feature**: The SDK now supports configuration of FIPS and DualStack endpoints using environment variables, shared configuration, or programmatically. +* **Feature**: Updated `github.com/aws/smithy-go` to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.12.0 (2021-10-21) + +* **Feature**: Updated to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.11.0 (2021-10-11) + +* **Feature**: API client updated +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.10.1 (2021-09-17) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.10.0 (2021-09-02) + +* **Feature**: API client updated + +# v1.9.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.8.0 (2021-08-19) + +* **Feature**: API client updated +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.7.0 (2021-08-12) + +* **Feature**: API client updated + +# v1.6.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.5.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.5.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.4.1 (2021-05-20) + +* **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/codebuild/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/LICENSE.txt new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/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/codebuild/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_client.go new file mode 100644 index 00000000000..e4be3185ba0 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_client.go @@ -0,0 +1,929 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/aws/defaults" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/retry" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy" + internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" + smithy "github.com/aws/smithy-go" + smithydocument "github.com/aws/smithy-go/document" + "github.com/aws/smithy-go/logging" + "github.com/aws/smithy-go/metrics" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net" + "net/http" + "sync/atomic" + "time" +) + +const ServiceID = "CodeBuild" +const ServiceAPIVersion = "2016-10-06" + +type operationMetrics struct { + Duration metrics.Float64Histogram + SerializeDuration metrics.Float64Histogram + ResolveIdentityDuration metrics.Float64Histogram + ResolveEndpointDuration metrics.Float64Histogram + SignRequestDuration metrics.Float64Histogram + DeserializeDuration metrics.Float64Histogram +} + +func (m *operationMetrics) histogramFor(name string) metrics.Float64Histogram { + switch name { + case "client.call.duration": + return m.Duration + case "client.call.serialization_duration": + return m.SerializeDuration + case "client.call.resolve_identity_duration": + return m.ResolveIdentityDuration + case "client.call.resolve_endpoint_duration": + return m.ResolveEndpointDuration + case "client.call.signing_duration": + return m.SignRequestDuration + case "client.call.deserialization_duration": + return m.DeserializeDuration + default: + panic("unrecognized operation metric") + } +} + +func timeOperationMetric[T any]( + ctx context.Context, metric string, fn func() (T, error), + opts ...metrics.RecordMetricOption, +) (T, error) { + mm := getOperationMetrics(ctx) + if mm == nil { // not using the metrics system + return fn() + } + + instr := mm.histogramFor(metric) + opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) + + start := time.Now() + v, err := fn() + end := time.Now() + + elapsed := end.Sub(start) + instr.Record(ctx, float64(elapsed)/1e9, opts...) + return v, err +} + +func startMetricTimer(ctx context.Context, metric string, opts ...metrics.RecordMetricOption) func() { + mm := getOperationMetrics(ctx) + if mm == nil { // not using the metrics system + return func() {} + } + + instr := mm.histogramFor(metric) + opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) + + var ended bool + start := time.Now() + return func() { + if ended { + return + } + ended = true + + end := time.Now() + + elapsed := end.Sub(start) + instr.Record(ctx, float64(elapsed)/1e9, opts...) + } +} + +func withOperationMetadata(ctx context.Context) metrics.RecordMetricOption { + return func(o *metrics.RecordMetricOptions) { + o.Properties.Set("rpc.service", middleware.GetServiceID(ctx)) + o.Properties.Set("rpc.method", middleware.GetOperationName(ctx)) + } +} + +type operationMetricsKey struct{} + +func withOperationMetrics(parent context.Context, mp metrics.MeterProvider) (context.Context, error) { + if _, ok := mp.(metrics.NopMeterProvider); ok { + // not using the metrics system - setting up the metrics context is a memory-intensive operation + // so we should skip it in this case + return parent, nil + } + + meter := mp.Meter("github.com/aws/aws-sdk-go-v2/service/codebuild") + om := &operationMetrics{} + + var err error + + om.Duration, err = operationMetricTimer(meter, "client.call.duration", + "Overall call duration (including retries and time to send or receive request and response body)") + if err != nil { + return nil, err + } + om.SerializeDuration, err = operationMetricTimer(meter, "client.call.serialization_duration", + "The time it takes to serialize a message body") + if err != nil { + return nil, err + } + om.ResolveIdentityDuration, err = operationMetricTimer(meter, "client.call.auth.resolve_identity_duration", + "The time taken to acquire an identity (AWS credentials, bearer token, etc) from an Identity Provider") + if err != nil { + return nil, err + } + om.ResolveEndpointDuration, err = operationMetricTimer(meter, "client.call.resolve_endpoint_duration", + "The time it takes to resolve an endpoint (endpoint resolver, not DNS) for the request") + if err != nil { + return nil, err + } + om.SignRequestDuration, err = operationMetricTimer(meter, "client.call.auth.signing_duration", + "The time it takes to sign a request") + if err != nil { + return nil, err + } + om.DeserializeDuration, err = operationMetricTimer(meter, "client.call.deserialization_duration", + "The time it takes to deserialize a message body") + if err != nil { + return nil, err + } + + return context.WithValue(parent, operationMetricsKey{}, om), nil +} + +func operationMetricTimer(m metrics.Meter, name, desc string) (metrics.Float64Histogram, error) { + return m.Float64Histogram(name, func(o *metrics.InstrumentOptions) { + o.UnitLabel = "s" + o.Description = desc + }) +} + +func getOperationMetrics(ctx context.Context) *operationMetrics { + if v := ctx.Value(operationMetricsKey{}); v != nil { + return v.(*operationMetrics) + } + return nil +} + +func operationTracer(p tracing.TracerProvider) tracing.Tracer { + return p.Tracer("github.com/aws/aws-sdk-go-v2/service/codebuild") +} + +// Client provides the API client to make operations call for AWS CodeBuild. +type Client struct { + options Options + + // Difference between the time reported by the server and the client + timeOffset *atomic.Int64 +} + +// New returns an initialized Client based on the functional options. Provide +// additional functional options to further configure the behavior of the client, +// such as changing the client's endpoint or adding custom middleware behavior. +func New(options Options, optFns ...func(*Options)) *Client { + options = options.Copy() + + resolveDefaultLogger(&options) + + setResolvedDefaultsMode(&options) + + resolveRetryer(&options) + + resolveHTTPClient(&options) + + resolveHTTPSignerV4(&options) + + resolveEndpointResolverV2(&options) + + resolveTracerProvider(&options) + + resolveMeterProvider(&options) + + resolveAuthSchemeResolver(&options) + + for _, fn := range optFns { + fn(&options) + } + + finalizeRetryMaxAttempts(&options) + + ignoreAnonymousAuth(&options) + + wrapWithAnonymousAuth(&options) + + resolveAuthSchemes(&options) + + client := &Client{ + options: options, + } + + initializeTimeOffsetResolver(client) + + return client +} + +// Options returns a copy of the client configuration. +// +// Callers SHOULD NOT perform mutations on any inner structures within client +// config. Config overrides should instead be made on a per-operation basis through +// functional options. +func (c *Client) Options() Options { + return c.options.Copy() +} + +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) + ctx = middleware.WithServiceID(ctx, ServiceID) + ctx = middleware.WithOperationName(ctx, opID) + + stack := middleware.NewStack(opID, smithyhttp.NewStackRequest) + options := c.options.Copy() + + for _, fn := range optFns { + fn(&options) + } + + finalizeOperationRetryMaxAttempts(&options, *c) + + finalizeClientEndpointResolverOptions(&options) + + for _, fn := range stackFns { + if err := fn(stack, options); err != nil { + return nil, metadata, err + } + } + + for _, fn := range options.APIOptions { + if err := fn(stack); err != nil { + return nil, metadata, err + } + } + + ctx, err = withOperationMetrics(ctx, options.MeterProvider) + if err != nil { + return nil, metadata, err + } + + tracer := operationTracer(options.TracerProvider) + spanName := fmt.Sprintf("%s.%s", ServiceID, opID) + + ctx = tracing.WithOperationTracer(ctx, tracer) + + ctx, span := tracer.StartSpan(ctx, spanName, func(o *tracing.SpanOptions) { + o.Kind = tracing.SpanKindClient + o.Properties.Set("rpc.system", "aws-api") + o.Properties.Set("rpc.method", opID) + o.Properties.Set("rpc.service", ServiceID) + }) + endTimer := startMetricTimer(ctx, "client.call.duration") + defer endTimer() + defer span.End() + + handler := smithyhttp.NewClientHandlerWithOptions(options.HTTPClient, func(o *smithyhttp.ClientHandler) { + o.Meter = options.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/codebuild") + }) + decorated := middleware.DecorateHandler(handler, stack) + result, metadata, err = decorated.Handle(ctx, params) + if err != nil { + span.SetProperty("exception.type", fmt.Sprintf("%T", err)) + span.SetProperty("exception.message", err.Error()) + + var aerr smithy.APIError + if errors.As(err, &aerr) { + span.SetProperty("api.error_code", aerr.ErrorCode()) + span.SetProperty("api.error_message", aerr.ErrorMessage()) + span.SetProperty("api.error_fault", aerr.ErrorFault().String()) + } + + err = &smithy.OperationError{ + ServiceID: ServiceID, + OperationName: opID, + Err: err, + } + } + + span.SetProperty("error", err != nil) + if err == nil { + span.SetStatus(tracing.SpanStatusOK) + } else { + span.SetStatus(tracing.SpanStatusError) + } + + return result, metadata, err +} + +type operationInputKey struct{} + +func setOperationInput(ctx context.Context, input interface{}) context.Context { + return middleware.WithStackValue(ctx, operationInputKey{}, input) +} + +func getOperationInput(ctx context.Context) interface{} { + return middleware.GetStackValue(ctx, operationInputKey{}) +} + +type setOperationInputMiddleware struct { +} + +func (*setOperationInputMiddleware) ID() string { + return "setOperationInput" +} + +func (m *setOperationInputMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + ctx = setOperationInput(ctx, in.Parameters) + return next.HandleSerialize(ctx, in) +} + +func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, operation string) error { + if err := stack.Finalize.Add(&resolveAuthSchemeMiddleware{operation: operation, options: options}, middleware.Before); err != nil { + return fmt.Errorf("add ResolveAuthScheme: %w", err) + } + if err := stack.Finalize.Insert(&getIdentityMiddleware{options: options}, "ResolveAuthScheme", middleware.After); err != nil { + return fmt.Errorf("add GetIdentity: %v", err) + } + if err := stack.Finalize.Insert(&resolveEndpointV2Middleware{options: options}, "GetIdentity", middleware.After); err != nil { + return fmt.Errorf("add ResolveEndpointV2: %v", err) + } + if err := stack.Finalize.Insert(&signRequestMiddleware{options: options}, "ResolveEndpointV2", middleware.After); err != nil { + return fmt.Errorf("add Signing: %w", err) + } + return nil +} +func resolveAuthSchemeResolver(options *Options) { + if options.AuthSchemeResolver == nil { + options.AuthSchemeResolver = &defaultAuthSchemeResolver{} + } +} + +func resolveAuthSchemes(options *Options) { + if options.AuthSchemes == nil { + options.AuthSchemes = []smithyhttp.AuthScheme{ + internalauth.NewHTTPAuthScheme("aws.auth#sigv4", &internalauthsmithy.V4SignerAdapter{ + Signer: options.HTTPSignerV4, + Logger: options.Logger, + LogSigning: options.ClientLogMode.IsSigning(), + }), + } + } +} + +type noSmithyDocumentSerde = smithydocument.NoSerde + +type legacyEndpointContextSetter struct { + LegacyResolver EndpointResolver +} + +func (*legacyEndpointContextSetter) ID() string { + return "legacyEndpointContextSetter" +} + +func (m *legacyEndpointContextSetter) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.LegacyResolver != nil { + ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, true) + } + + return next.HandleInitialize(ctx, in) + +} +func addlegacyEndpointContextSetter(stack *middleware.Stack, o Options) error { + return stack.Initialize.Add(&legacyEndpointContextSetter{ + LegacyResolver: o.EndpointResolver, + }, middleware.Before) +} + +func resolveDefaultLogger(o *Options) { + if o.Logger != nil { + return + } + o.Logger = logging.Nop{} +} + +func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { + return middleware.AddSetLoggerMiddleware(stack, o.Logger) +} + +func setResolvedDefaultsMode(o *Options) { + if len(o.resolvedDefaultsMode) > 0 { + return + } + + var mode aws.DefaultsMode + mode.SetFromString(string(o.DefaultsMode)) + + if mode == aws.DefaultsModeAuto { + mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment) + } + + o.resolvedDefaultsMode = mode +} + +// NewFromConfig returns a new client from the provided config. +func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { + opts := Options{ + Region: cfg.Region, + DefaultsMode: cfg.DefaultsMode, + RuntimeEnvironment: cfg.RuntimeEnvironment, + HTTPClient: cfg.HTTPClient, + Credentials: cfg.Credentials, + APIOptions: cfg.APIOptions, + Logger: cfg.Logger, + ClientLogMode: cfg.ClientLogMode, + AppID: cfg.AppID, + AuthSchemePreference: cfg.AuthSchemePreference, + } + resolveAWSRetryerProvider(cfg, &opts) + resolveAWSRetryMaxAttempts(cfg, &opts) + resolveAWSRetryMode(cfg, &opts) + resolveAWSEndpointResolver(cfg, &opts) + resolveInterceptors(cfg, &opts) + resolveUseDualStackEndpoint(cfg, &opts) + resolveUseFIPSEndpoint(cfg, &opts) + resolveBaseEndpoint(cfg, &opts) + return New(opts, func(o *Options) { + for _, opt := range cfg.ServiceOptions { + opt(ServiceID, o) + } + for _, opt := range optFns { + opt(o) + } + }) +} + +func resolveHTTPClient(o *Options) { + var buildable *awshttp.BuildableClient + + if o.HTTPClient != nil { + var ok bool + buildable, ok = o.HTTPClient.(*awshttp.BuildableClient) + if !ok { + return + } + } else { + buildable = awshttp.NewBuildableClient() + } + + modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) + if err == nil { + buildable = buildable.WithDialerOptions(func(dialer *net.Dialer) { + if dialerTimeout, ok := modeConfig.GetConnectTimeout(); ok { + dialer.Timeout = dialerTimeout + } + }) + + buildable = buildable.WithTransportOptions(func(transport *http.Transport) { + if tlsHandshakeTimeout, ok := modeConfig.GetTLSNegotiationTimeout(); ok { + transport.TLSHandshakeTimeout = tlsHandshakeTimeout + } + }) + } + + o.HTTPClient = buildable +} + +func resolveRetryer(o *Options) { + if o.Retryer != nil { + return + } + + if len(o.RetryMode) == 0 { + modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) + if err == nil { + o.RetryMode = modeConfig.RetryMode + } + } + if len(o.RetryMode) == 0 { + o.RetryMode = aws.RetryModeStandard + } + + var standardOptions []func(*retry.StandardOptions) + if v := o.RetryMaxAttempts; v != 0 { + standardOptions = append(standardOptions, func(so *retry.StandardOptions) { + so.MaxAttempts = v + }) + } + + switch o.RetryMode { + case aws.RetryModeAdaptive: + var adaptiveOptions []func(*retry.AdaptiveModeOptions) + if len(standardOptions) != 0 { + adaptiveOptions = append(adaptiveOptions, func(ao *retry.AdaptiveModeOptions) { + ao.StandardOptions = append(ao.StandardOptions, standardOptions...) + }) + } + o.Retryer = retry.NewAdaptiveMode(adaptiveOptions...) + + default: + o.Retryer = retry.NewStandard(standardOptions...) + } +} + +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + +func resolveAWSRetryMode(cfg aws.Config, o *Options) { + if len(cfg.RetryMode) == 0 { + return + } + o.RetryMode = cfg.RetryMode +} +func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) { + if cfg.RetryMaxAttempts == 0 { + return + } + o.RetryMaxAttempts = cfg.RetryMaxAttempts +} + +func finalizeRetryMaxAttempts(o *Options) { + if o.RetryMaxAttempts == 0 { + return + } + + o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts) +} + +func finalizeOperationRetryMaxAttempts(o *Options, client Client) { + if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts { + return + } + + o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts) +} + +func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { + if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil { + return + } + o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions) +} + +func resolveInterceptors(cfg aws.Config, o *Options) { + o.Interceptors = cfg.Interceptors.Copy() +} + +func addClientUserAgent(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "codebuild", goModuleVersion) + if len(options.AppID) > 0 { + ua.AddSDKAgentKey(awsmiddleware.ApplicationIdentifier, options.AppID) + } + + return nil +} + +func getOrAddRequestUserAgent(stack *middleware.Stack) (*awsmiddleware.RequestUserAgent, error) { + id := (*awsmiddleware.RequestUserAgent)(nil).ID() + mw, ok := stack.Build.Get(id) + if !ok { + mw = awsmiddleware.NewRequestUserAgent() + if err := stack.Build.Add(mw, middleware.After); err != nil { + return nil, err + } + } + + ua, ok := mw.(*awsmiddleware.RequestUserAgent) + if !ok { + return nil, fmt.Errorf("%T for %s middleware did not match expected type", mw, id) + } + + return ua, nil +} + +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 addClientRequestID(stack *middleware.Stack) error { + return stack.Build.Add(&awsmiddleware.ClientRequestID{}, middleware.After) +} + +func addComputeContentLength(stack *middleware.Stack) error { + return stack.Build.Add(&smithyhttp.ComputeContentLength{}, middleware.After) +} + +func addRawResponseToMetadata(stack *middleware.Stack) error { + return stack.Deserialize.Add(&awsmiddleware.AddRawResponse{}, middleware.Before) +} + +func addRecordResponseTiming(stack *middleware.Stack) error { + return stack.Deserialize.Add(&awsmiddleware.RecordResponseTiming{}, middleware.After) +} + +func addSpanRetryLoop(stack *middleware.Stack, options Options) error { + return stack.Finalize.Insert(&spanRetryLoop{options: options}, "Retry", middleware.Before) +} + +type spanRetryLoop struct { + options Options +} + +func (*spanRetryLoop) ID() string { + return "spanRetryLoop" +} + +func (m *spanRetryLoop) HandleFinalize( + ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler, +) ( + middleware.FinalizeOutput, middleware.Metadata, error, +) { + tracer := operationTracer(m.options.TracerProvider) + ctx, span := tracer.StartSpan(ctx, "RetryLoop") + defer span.End() + + return next.HandleFinalize(ctx, in) +} +func addStreamingEventsPayload(stack *middleware.Stack) error { + return stack.Finalize.Add(&v4.StreamingEventsPayload{}, middleware.Before) +} + +func addUnsignedPayload(stack *middleware.Stack) error { + return stack.Finalize.Insert(&v4.UnsignedPayload{}, "ResolveEndpointV2", middleware.After) +} + +func addComputePayloadSHA256(stack *middleware.Stack) error { + return stack.Finalize.Insert(&v4.ComputePayloadSHA256{}, "ResolveEndpointV2", middleware.After) +} + +func addContentSHA256Header(stack *middleware.Stack) error { + return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) +} + +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + +func addRetry(stack *middleware.Stack, o Options, c *Client) error { + attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { + m.LogAttempts = o.ClientLogMode.IsRetries() + m.OperationMeter = o.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/codebuild") + m.ClientSkew = c.timeOffset + }) + if err := stack.Finalize.Insert(attempt, "ResolveAuthScheme", middleware.Before); err != nil { + return err + } + if err := stack.Finalize.Insert(&retry.MetricsHeader{}, attempt.ID(), middleware.After); err != nil { + return err + } + return nil +} + +// resolves dual-stack endpoint configuration +func resolveUseDualStackEndpoint(cfg aws.Config, o *Options) error { + if len(cfg.ConfigSources) == 0 { + return nil + } + value, found, err := internalConfig.ResolveUseDualStackEndpoint(context.Background(), cfg.ConfigSources) + if err != nil { + return err + } + if found { + o.EndpointOptions.UseDualStackEndpoint = value + } + return nil +} + +// resolves FIPS endpoint configuration +func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { + if len(cfg.ConfigSources) == 0 { + return nil + } + value, found, err := internalConfig.ResolveUseFIPSEndpoint(context.Background(), cfg.ConfigSources) + if err != nil { + return err + } + if found { + o.EndpointOptions.UseFIPSEndpoint = value + } + return nil +} + +func initializeTimeOffsetResolver(c *Client) { + c.timeOffset = new(atomic.Int64) +} + +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + +type setCredentialSourceMiddleware struct { + ua *awsmiddleware.RequestUserAgent + options Options +} + +func (m setCredentialSourceMiddleware) ID() string { return "SetCredentialSourceMiddleware" } + +func (m setCredentialSourceMiddleware) HandleBuild(ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler) ( + out middleware.BuildOutput, metadata middleware.Metadata, err error, +) { + asProviderSource, ok := m.options.Credentials.(aws.CredentialProviderSource) + if !ok { + return next.HandleBuild(ctx, in) + } + providerSources := asProviderSource.ProviderSources() + for _, source := range providerSources { + m.ua.AddCredentialsSource(source) + } + return next.HandleBuild(ctx, in) +} + +func addCredentialSource(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + mw := setCredentialSourceMiddleware{ua: ua, options: options} + return stack.Build.Insert(&mw, "UserAgent", middleware.Before) +} + +func resolveTracerProvider(options *Options) { + if options.TracerProvider == nil { + options.TracerProvider = &tracing.NopTracerProvider{} + } +} + +func resolveMeterProvider(options *Options) { + if options.MeterProvider == nil { + options.MeterProvider = metrics.NopMeterProvider{} + } +} + +func addRecursionDetection(stack *middleware.Stack) error { + return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) +} + +func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { + return stack.Deserialize.Insert(&awsmiddleware.RequestIDRetriever{}, "OperationDeserializer", middleware.Before) + +} + +func addResponseErrorMiddleware(stack *middleware.Stack) error { + return stack.Deserialize.Insert(&awshttp.ResponseErrorWrapper{}, "RequestIDRetriever", middleware.Before) + +} + +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) +} + +type disableHTTPSMiddleware struct { + DisableHTTPS bool +} + +func (*disableHTTPSMiddleware) ID() string { + return "disableHTTPS" +} + +func (m *disableHTTPSMiddleware) 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, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.DisableHTTPS && !smithyhttp.GetHostnameImmutable(ctx) { + req.URL.Scheme = "http" + } + + return next.HandleFinalize(ctx, in) +} + +func addDisableHTTPSMiddleware(stack *middleware.Stack, o Options) error { + return stack.Finalize.Insert(&disableHTTPSMiddleware{ + DisableHTTPS: o.EndpointOptions.DisableHTTPS, + }, "ResolveEndpointV2", middleware.After) +} + +func addInterceptBeforeRetryLoop(stack *middleware.Stack, opts Options) error { + return stack.Finalize.Insert(&smithyhttp.InterceptBeforeRetryLoop{ + Interceptors: opts.Interceptors.BeforeRetryLoop, + }, "Retry", middleware.Before) +} + +func addInterceptAttempt(stack *middleware.Stack, opts Options) error { + return stack.Finalize.Insert(&smithyhttp.InterceptAttempt{ + BeforeAttempt: opts.Interceptors.BeforeAttempt, + AfterAttempt: opts.Interceptors.AfterAttempt, + }, "Retry", middleware.After) +} + +func addInterceptors(stack *middleware.Stack, opts Options) error { + // middlewares are expensive, don't add all of these interceptor ones unless the caller + // actually has at least one interceptor configured + // + // at the moment it's all-or-nothing because some of the middlewares here are responsible for + // setting fields in the interceptor context for future ones + if len(opts.Interceptors.BeforeExecution) == 0 && + len(opts.Interceptors.BeforeSerialization) == 0 && len(opts.Interceptors.AfterSerialization) == 0 && + len(opts.Interceptors.BeforeRetryLoop) == 0 && + len(opts.Interceptors.BeforeAttempt) == 0 && + len(opts.Interceptors.BeforeSigning) == 0 && len(opts.Interceptors.AfterSigning) == 0 && + len(opts.Interceptors.BeforeTransmit) == 0 && len(opts.Interceptors.AfterTransmit) == 0 && + len(opts.Interceptors.BeforeDeserialization) == 0 && len(opts.Interceptors.AfterDeserialization) == 0 && + len(opts.Interceptors.AfterAttempt) == 0 && len(opts.Interceptors.AfterExecution) == 0 { + return nil + } + + return errors.Join( + stack.Initialize.Add(&smithyhttp.InterceptExecution{ + BeforeExecution: opts.Interceptors.BeforeExecution, + AfterExecution: opts.Interceptors.AfterExecution, + }, middleware.Before), + stack.Serialize.Insert(&smithyhttp.InterceptBeforeSerialization{ + Interceptors: opts.Interceptors.BeforeSerialization, + }, "OperationSerializer", middleware.Before), + stack.Serialize.Insert(&smithyhttp.InterceptAfterSerialization{ + Interceptors: opts.Interceptors.AfterSerialization, + }, "OperationSerializer", middleware.After), + stack.Finalize.Insert(&smithyhttp.InterceptBeforeSigning{ + Interceptors: opts.Interceptors.BeforeSigning, + }, "Signing", middleware.Before), + stack.Finalize.Insert(&smithyhttp.InterceptAfterSigning{ + Interceptors: opts.Interceptors.AfterSigning, + }, "Signing", middleware.After), + stack.Deserialize.Add(&smithyhttp.InterceptTransmit{ + BeforeTransmit: opts.Interceptors.BeforeTransmit, + AfterTransmit: opts.Interceptors.AfterTransmit, + }, middleware.After), + stack.Deserialize.Insert(&smithyhttp.InterceptBeforeDeserialization{ + Interceptors: opts.Interceptors.BeforeDeserialization, + }, "OperationDeserializer", middleware.After), // (deserialize stack is called in reverse) + stack.Deserialize.Insert(&smithyhttp.InterceptAfterDeserialization{ + Interceptors: opts.Interceptors.AfterDeserialization, + }, "OperationDeserializer", middleware.Before), + ) +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_BatchDeleteBuilds.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_BatchDeleteBuilds.go new file mode 100644 index 00000000000..d0b47c3b35d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_BatchDeleteBuilds.go @@ -0,0 +1,157 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/codebuild/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes one or more builds. +func (c *Client) BatchDeleteBuilds(ctx context.Context, params *BatchDeleteBuildsInput, optFns ...func(*Options)) (*BatchDeleteBuildsOutput, error) { + if params == nil { + params = &BatchDeleteBuildsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "BatchDeleteBuilds", params, optFns, c.addOperationBatchDeleteBuildsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*BatchDeleteBuildsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type BatchDeleteBuildsInput struct { + + // The IDs of the builds to delete. + // + // This member is required. + Ids []string + + noSmithyDocumentSerde +} + +type BatchDeleteBuildsOutput struct { + + // The IDs of the builds that were successfully deleted. + BuildsDeleted []string + + // Information about any builds that could not be successfully deleted. + BuildsNotDeleted []types.BuildNotDeleted + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationBatchDeleteBuildsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpBatchDeleteBuilds{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpBatchDeleteBuilds{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "BatchDeleteBuilds"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpBatchDeleteBuildsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchDeleteBuilds(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opBatchDeleteBuilds(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "BatchDeleteBuilds", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_BatchGetBuildBatches.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_BatchGetBuildBatches.go new file mode 100644 index 00000000000..9ff28c056d8 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_BatchGetBuildBatches.go @@ -0,0 +1,157 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/codebuild/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves information about one or more batch builds. +func (c *Client) BatchGetBuildBatches(ctx context.Context, params *BatchGetBuildBatchesInput, optFns ...func(*Options)) (*BatchGetBuildBatchesOutput, error) { + if params == nil { + params = &BatchGetBuildBatchesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "BatchGetBuildBatches", params, optFns, c.addOperationBatchGetBuildBatchesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*BatchGetBuildBatchesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type BatchGetBuildBatchesInput struct { + + // An array that contains the batch build identifiers to retrieve. + // + // This member is required. + Ids []string + + noSmithyDocumentSerde +} + +type BatchGetBuildBatchesOutput struct { + + // An array of BuildBatch objects that represent the retrieved batch builds. + BuildBatches []types.BuildBatch + + // An array that contains the identifiers of any batch builds that are not found. + BuildBatchesNotFound []string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationBatchGetBuildBatchesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpBatchGetBuildBatches{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpBatchGetBuildBatches{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "BatchGetBuildBatches"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpBatchGetBuildBatchesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchGetBuildBatches(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opBatchGetBuildBatches(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "BatchGetBuildBatches", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_BatchGetBuilds.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_BatchGetBuilds.go new file mode 100644 index 00000000000..7957aa326e2 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_BatchGetBuilds.go @@ -0,0 +1,157 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/codebuild/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets information about one or more builds. +func (c *Client) BatchGetBuilds(ctx context.Context, params *BatchGetBuildsInput, optFns ...func(*Options)) (*BatchGetBuildsOutput, error) { + if params == nil { + params = &BatchGetBuildsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "BatchGetBuilds", params, optFns, c.addOperationBatchGetBuildsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*BatchGetBuildsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type BatchGetBuildsInput struct { + + // The IDs of the builds. + // + // This member is required. + Ids []string + + noSmithyDocumentSerde +} + +type BatchGetBuildsOutput struct { + + // Information about the requested builds. + Builds []types.Build + + // The IDs of builds for which information could not be found. + BuildsNotFound []string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationBatchGetBuildsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpBatchGetBuilds{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpBatchGetBuilds{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "BatchGetBuilds"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpBatchGetBuildsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchGetBuilds(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opBatchGetBuilds(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "BatchGetBuilds", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_BatchGetCommandExecutions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_BatchGetCommandExecutions.go new file mode 100644 index 00000000000..a7443a23a55 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_BatchGetCommandExecutions.go @@ -0,0 +1,162 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/codebuild/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets information about the command executions. +func (c *Client) BatchGetCommandExecutions(ctx context.Context, params *BatchGetCommandExecutionsInput, optFns ...func(*Options)) (*BatchGetCommandExecutionsOutput, error) { + if params == nil { + params = &BatchGetCommandExecutionsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "BatchGetCommandExecutions", params, optFns, c.addOperationBatchGetCommandExecutionsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*BatchGetCommandExecutionsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type BatchGetCommandExecutionsInput struct { + + // A comma separated list of commandExecutionIds . + // + // This member is required. + CommandExecutionIds []string + + // A sandboxId or sandboxArn . + // + // This member is required. + SandboxId *string + + noSmithyDocumentSerde +} + +type BatchGetCommandExecutionsOutput struct { + + // Information about the requested command executions. + CommandExecutions []types.CommandExecution + + // The IDs of command executions for which information could not be found. + CommandExecutionsNotFound []string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationBatchGetCommandExecutionsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpBatchGetCommandExecutions{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpBatchGetCommandExecutions{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "BatchGetCommandExecutions"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpBatchGetCommandExecutionsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchGetCommandExecutions(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opBatchGetCommandExecutions(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "BatchGetCommandExecutions", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_BatchGetFleets.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_BatchGetFleets.go new file mode 100644 index 00000000000..27a96242e37 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_BatchGetFleets.go @@ -0,0 +1,157 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/codebuild/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets information about one or more compute fleets. +func (c *Client) BatchGetFleets(ctx context.Context, params *BatchGetFleetsInput, optFns ...func(*Options)) (*BatchGetFleetsOutput, error) { + if params == nil { + params = &BatchGetFleetsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "BatchGetFleets", params, optFns, c.addOperationBatchGetFleetsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*BatchGetFleetsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type BatchGetFleetsInput struct { + + // The names or ARNs of the compute fleets. + // + // This member is required. + Names []string + + noSmithyDocumentSerde +} + +type BatchGetFleetsOutput struct { + + // Information about the requested compute fleets. + Fleets []types.Fleet + + // The names of compute fleets for which information could not be found. + FleetsNotFound []string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationBatchGetFleetsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpBatchGetFleets{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpBatchGetFleets{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "BatchGetFleets"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpBatchGetFleetsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchGetFleets(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opBatchGetFleets(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "BatchGetFleets", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_BatchGetProjects.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_BatchGetProjects.go new file mode 100644 index 00000000000..010a99df1a0 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_BatchGetProjects.go @@ -0,0 +1,159 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/codebuild/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets information about one or more build projects. +func (c *Client) BatchGetProjects(ctx context.Context, params *BatchGetProjectsInput, optFns ...func(*Options)) (*BatchGetProjectsOutput, error) { + if params == nil { + params = &BatchGetProjectsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "BatchGetProjects", params, optFns, c.addOperationBatchGetProjectsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*BatchGetProjectsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type BatchGetProjectsInput struct { + + // The names or ARNs of the build projects. To get information about a project + // shared with your Amazon Web Services account, its ARN must be specified. You + // cannot specify a shared project using its name. + // + // This member is required. + Names []string + + noSmithyDocumentSerde +} + +type BatchGetProjectsOutput struct { + + // Information about the requested build projects. + Projects []types.Project + + // The names of build projects for which information could not be found. + ProjectsNotFound []string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationBatchGetProjectsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpBatchGetProjects{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpBatchGetProjects{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "BatchGetProjects"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpBatchGetProjectsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchGetProjects(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opBatchGetProjects(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "BatchGetProjects", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_BatchGetReportGroups.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_BatchGetReportGroups.go new file mode 100644 index 00000000000..5ffdcf23cd8 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_BatchGetReportGroups.go @@ -0,0 +1,158 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/codebuild/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns an array of report groups. +func (c *Client) BatchGetReportGroups(ctx context.Context, params *BatchGetReportGroupsInput, optFns ...func(*Options)) (*BatchGetReportGroupsOutput, error) { + if params == nil { + params = &BatchGetReportGroupsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "BatchGetReportGroups", params, optFns, c.addOperationBatchGetReportGroupsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*BatchGetReportGroupsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type BatchGetReportGroupsInput struct { + + // An array of report group ARNs that identify the report groups to return. + // + // This member is required. + ReportGroupArns []string + + noSmithyDocumentSerde +} + +type BatchGetReportGroupsOutput struct { + + // The array of report groups returned by BatchGetReportGroups . + ReportGroups []types.ReportGroup + + // An array of ARNs passed to BatchGetReportGroups that are not associated with a + // ReportGroup . + ReportGroupsNotFound []string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationBatchGetReportGroupsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpBatchGetReportGroups{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpBatchGetReportGroups{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "BatchGetReportGroups"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpBatchGetReportGroupsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchGetReportGroups(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opBatchGetReportGroups(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "BatchGetReportGroups", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_BatchGetReports.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_BatchGetReports.go new file mode 100644 index 00000000000..d7cd6efdfbc --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_BatchGetReports.go @@ -0,0 +1,158 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/codebuild/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns an array of reports. +func (c *Client) BatchGetReports(ctx context.Context, params *BatchGetReportsInput, optFns ...func(*Options)) (*BatchGetReportsOutput, error) { + if params == nil { + params = &BatchGetReportsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "BatchGetReports", params, optFns, c.addOperationBatchGetReportsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*BatchGetReportsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type BatchGetReportsInput struct { + + // An array of ARNs that identify the Report objects to return. + // + // This member is required. + ReportArns []string + + noSmithyDocumentSerde +} + +type BatchGetReportsOutput struct { + + // The array of Report objects returned by BatchGetReports . + Reports []types.Report + + // An array of ARNs passed to BatchGetReportGroups that are not associated with a + // Report . + ReportsNotFound []string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationBatchGetReportsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpBatchGetReports{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpBatchGetReports{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "BatchGetReports"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpBatchGetReportsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchGetReports(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opBatchGetReports(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "BatchGetReports", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_BatchGetSandboxes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_BatchGetSandboxes.go new file mode 100644 index 00000000000..3ca6c5edbb4 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_BatchGetSandboxes.go @@ -0,0 +1,157 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/codebuild/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets information about the sandbox status. +func (c *Client) BatchGetSandboxes(ctx context.Context, params *BatchGetSandboxesInput, optFns ...func(*Options)) (*BatchGetSandboxesOutput, error) { + if params == nil { + params = &BatchGetSandboxesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "BatchGetSandboxes", params, optFns, c.addOperationBatchGetSandboxesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*BatchGetSandboxesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type BatchGetSandboxesInput struct { + + // A comma separated list of sandboxIds or sandboxArns . + // + // This member is required. + Ids []string + + noSmithyDocumentSerde +} + +type BatchGetSandboxesOutput struct { + + // Information about the requested sandboxes. + Sandboxes []types.Sandbox + + // The IDs of sandboxes for which information could not be found. + SandboxesNotFound []string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationBatchGetSandboxesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpBatchGetSandboxes{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpBatchGetSandboxes{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "BatchGetSandboxes"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpBatchGetSandboxesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchGetSandboxes(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opBatchGetSandboxes(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "BatchGetSandboxes", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_CreateFleet.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_CreateFleet.go new file mode 100644 index 00000000000..d995aa066df --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_CreateFleet.go @@ -0,0 +1,332 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/codebuild/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a compute fleet. +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 initial number of machines allocated to the fleet, which defines the number + // of builds that can run in parallel. + // + // This member is required. + BaseCapacity *int32 + + // Information about the compute resources the compute fleet uses. Available + // values include: + // + // - ATTRIBUTE_BASED_COMPUTE : Specify the amount of vCPUs, memory, disk space, + // and the type of machine. + // + // If you use ATTRIBUTE_BASED_COMPUTE , you must define your attributes by using + // computeConfiguration . CodeBuild will select the cheapest instance that + // satisfies your specified attributes. For more information, see [Reserved capacity environment types]in the + // CodeBuild User Guide. + // + // - CUSTOM_INSTANCE_TYPE : Specify the instance type for your compute fleet. For + // a list of supported instance types, see [Supported instance families]in the CodeBuild User Guide. + // + // - BUILD_GENERAL1_SMALL : Use up to 4 GiB memory and 2 vCPUs for builds. + // + // - BUILD_GENERAL1_MEDIUM : Use up to 8 GiB memory and 4 vCPUs for builds. + // + // - BUILD_GENERAL1_LARGE : Use up to 16 GiB memory and 8 vCPUs for builds, + // depending on your environment type. + // + // - BUILD_GENERAL1_XLARGE : Use up to 72 GiB memory and 36 vCPUs for builds, + // depending on your environment type. + // + // - BUILD_GENERAL1_2XLARGE : Use up to 144 GiB memory, 72 vCPUs, and 824 GB of + // SSD storage for builds. This compute type supports Docker images up to 100 GB + // uncompressed. + // + // - BUILD_LAMBDA_1GB : Use up to 1 GiB memory for builds. Only available for + // environment type LINUX_LAMBDA_CONTAINER and ARM_LAMBDA_CONTAINER . + // + // - BUILD_LAMBDA_2GB : Use up to 2 GiB memory for builds. Only available for + // environment type LINUX_LAMBDA_CONTAINER and ARM_LAMBDA_CONTAINER . + // + // - BUILD_LAMBDA_4GB : Use up to 4 GiB memory for builds. Only available for + // environment type LINUX_LAMBDA_CONTAINER and ARM_LAMBDA_CONTAINER . + // + // - BUILD_LAMBDA_8GB : Use up to 8 GiB memory for builds. Only available for + // environment type LINUX_LAMBDA_CONTAINER and ARM_LAMBDA_CONTAINER . + // + // - BUILD_LAMBDA_10GB : Use up to 10 GiB memory for builds. Only available for + // environment type LINUX_LAMBDA_CONTAINER and ARM_LAMBDA_CONTAINER . + // + // If you use BUILD_GENERAL1_SMALL : + // + // - For environment type LINUX_CONTAINER , you can use up to 4 GiB memory and 2 + // vCPUs for builds. + // + // - For environment type LINUX_GPU_CONTAINER , you can use up to 16 GiB memory, + // 4 vCPUs, and 1 NVIDIA A10G Tensor Core GPU for builds. + // + // - For environment type ARM_CONTAINER , you can use up to 4 GiB memory and 2 + // vCPUs on ARM-based processors for builds. + // + // If you use BUILD_GENERAL1_LARGE : + // + // - For environment type LINUX_CONTAINER , you can use up to 16 GiB memory and 8 + // vCPUs for builds. + // + // - For environment type LINUX_GPU_CONTAINER , you can use up to 255 GiB memory, + // 32 vCPUs, and 4 NVIDIA Tesla V100 GPUs for builds. + // + // - For environment type ARM_CONTAINER , you can use up to 16 GiB memory and 8 + // vCPUs on ARM-based processors for builds. + // + // For more information, see [On-demand environment types] in the CodeBuild User Guide. + // + // [Supported instance families]: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html#environment-reserved-capacity.instance-types + // [Reserved capacity environment types]: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html#environment-reserved-capacity.types + // [On-demand environment types]: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html#environment.types + // + // This member is required. + ComputeType types.ComputeType + + // The environment type of the compute fleet. + // + // - The environment type ARM_CONTAINER is available only in regions US East (N. + // Virginia), US East (Ohio), US West (Oregon), EU (Ireland), Asia Pacific + // (Mumbai), Asia Pacific (Tokyo), Asia Pacific (Singapore), Asia Pacific (Sydney), + // EU (Frankfurt), and South America (São Paulo). + // + // - The environment type ARM_EC2 is available only in regions US East (N. + // Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia + // Pacific (Tokyo), Asia Pacific (Singapore), Asia Pacific (Sydney), South America + // (São Paulo), and Asia Pacific (Mumbai). + // + // - The environment type LINUX_CONTAINER is available only in regions US East + // (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), + // Asia Pacific (Tokyo), Asia Pacific (Singapore), Asia Pacific (Sydney), South + // America (São Paulo), and Asia Pacific (Mumbai). + // + // - The environment type LINUX_EC2 is available only in regions US East (N. + // Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia + // Pacific (Tokyo), Asia Pacific (Singapore), Asia Pacific (Sydney), South America + // (São Paulo), and Asia Pacific (Mumbai). + // + // - The environment type LINUX_GPU_CONTAINER is available only in regions US + // East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU + // (Frankfurt), Asia Pacific (Tokyo), and Asia Pacific (Sydney). + // + // - The environment type MAC_ARM is available for Medium fleets only in regions + // US East (N. Virginia), US East (Ohio), US West (Oregon), Asia Pacific (Sydney), + // and EU (Frankfurt) + // + // - The environment type MAC_ARM is available for Large fleets only in regions + // US East (N. Virginia), US East (Ohio), US West (Oregon), and Asia Pacific + // (Sydney). + // + // - The environment type WINDOWS_EC2 is available only in regions US East (N. + // Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia + // Pacific (Tokyo), Asia Pacific (Singapore), Asia Pacific (Sydney), South America + // (São Paulo), and Asia Pacific (Mumbai). + // + // - The environment type WINDOWS_SERVER_2019_CONTAINER is available only in + // regions US East (N. Virginia), US East (Ohio), US West (Oregon), Asia Pacific + // (Sydney), Asia Pacific (Tokyo), Asia Pacific (Mumbai) and EU (Ireland). + // + // - The environment type WINDOWS_SERVER_2022_CONTAINER is available only in + // regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), + // EU (Frankfurt), Asia Pacific (Sydney), Asia Pacific (Singapore), Asia Pacific + // (Tokyo), South America (São Paulo) and Asia Pacific (Mumbai). + // + // For more information, see [Build environment compute types] in the CodeBuild user guide. + // + // [Build environment compute types]: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html + // + // This member is required. + EnvironmentType types.EnvironmentType + + // The name of the compute fleet. + // + // This member is required. + Name *string + + // The compute configuration of the compute fleet. This is only required if + // computeType is set to ATTRIBUTE_BASED_COMPUTE or CUSTOM_INSTANCE_TYPE . + ComputeConfiguration *types.ComputeConfiguration + + // The service role associated with the compute fleet. For more information, see [Allow a user to add a permission policy for a fleet service role] + // in the CodeBuild User Guide. + // + // [Allow a user to add a permission policy for a fleet service role]: https://docs.aws.amazon.com/codebuild/latest/userguide/auth-and-access-control-iam-identity-based-access-control.html#customer-managed-policies-example-permission-policy-fleet-service-role.html + FleetServiceRole *string + + // The Amazon Machine Image (AMI) of the compute fleet. + ImageId *string + + // The compute fleet overflow behavior. + // + // - For overflow behavior QUEUE , your overflow builds need to wait on the + // existing fleet instance to become available. + // + // - For overflow behavior ON_DEMAND , your overflow builds run on CodeBuild + // on-demand. + // + // If you choose to set your overflow behavior to on-demand while creating a + // VPC-connected fleet, make sure that you add the required VPC permissions to your + // project service role. For more information, see [Example policy statement to allow CodeBuild access to Amazon Web Services services required to create a VPC network interface]. + // + // [Example policy statement to allow CodeBuild access to Amazon Web Services services required to create a VPC network interface]: https://docs.aws.amazon.com/codebuild/latest/userguide/auth-and-access-control-iam-identity-based-access-control.html#customer-managed-policies-example-create-vpc-network-interface + OverflowBehavior types.FleetOverflowBehavior + + // The proxy configuration of the compute fleet. + ProxyConfiguration *types.ProxyConfiguration + + // The scaling configuration of the compute fleet. + ScalingConfiguration *types.ScalingConfigurationInput + + // A list of tag key and value pairs associated with this compute fleet. + // + // These tags are available for use by Amazon Web Services services that support + // CodeBuild build project tags. + Tags []types.Tag + + // Information about the VPC configuration that CodeBuild accesses. + VpcConfig *types.VpcConfig + + noSmithyDocumentSerde +} + +type CreateFleetOutput struct { + + // Information about the compute fleet + Fleet *types.Fleet + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateFleetMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateFleet{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateFleet{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateFleet"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); 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 = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateFleet(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateFleet", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_CreateProject.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_CreateProject.go new file mode 100644 index 00000000000..7485fc8537b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_CreateProject.go @@ -0,0 +1,281 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/codebuild/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a build project. +func (c *Client) CreateProject(ctx context.Context, params *CreateProjectInput, optFns ...func(*Options)) (*CreateProjectOutput, error) { + if params == nil { + params = &CreateProjectInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateProject", params, optFns, c.addOperationCreateProjectMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateProjectOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateProjectInput struct { + + // Information about the build output artifacts for the build project. + // + // This member is required. + Artifacts *types.ProjectArtifacts + + // Information about the build environment for the build project. + // + // This member is required. + Environment *types.ProjectEnvironment + + // The name of the build project. + // + // This member is required. + Name *string + + // The ARN of the IAM role that enables CodeBuild to interact with dependent + // Amazon Web Services services on behalf of the Amazon Web Services account. + // + // This member is required. + ServiceRole *string + + // Information about the build input source code for the build project. + // + // This member is required. + Source *types.ProjectSource + + // The maximum number of additional automatic retries after a failed build. For + // example, if the auto-retry limit is set to 2, CodeBuild will call the RetryBuild + // API to automatically retry your build for up to 2 additional times. + AutoRetryLimit *int32 + + // Set this to true to generate a publicly accessible URL for your project's build + // badge. + BadgeEnabled *bool + + // A ProjectBuildBatchConfig object that defines the batch build options for the project. + BuildBatchConfig *types.ProjectBuildBatchConfig + + // Stores recently used information so that it can be quickly accessed at a later + // time. + Cache *types.ProjectCache + + // The maximum number of concurrent builds that are allowed for this project. + // + // New builds are only started if the current number of builds is less than or + // equal to this limit. If the current build count meets this limit, new builds are + // throttled and are not run. + ConcurrentBuildLimit *int32 + + // A description that makes the build project easy to identify. + Description *string + + // The Key Management Service customer master key (CMK) to be used for encrypting + // the build output artifacts. + // + // You can use a cross-account KMS key to encrypt the build output artifacts if + // your service role has permission to that key. + // + // You can specify either the Amazon Resource Name (ARN) of the CMK or, if + // available, the CMK's alias (using the format alias/ ). + EncryptionKey *string + + // An array of ProjectFileSystemLocation objects for a CodeBuild build project. A + // ProjectFileSystemLocation object specifies the identifier , location , + // mountOptions , mountPoint , and type of a file system created using Amazon + // Elastic File System. + FileSystemLocations []types.ProjectFileSystemLocation + + // Information about logs for the build project. These can be logs in CloudWatch + // Logs, logs uploaded to a specified S3 bucket, or both. + LogsConfig *types.LogsConfig + + // The number of minutes a build is allowed to be queued before it times out. + QueuedTimeoutInMinutes *int32 + + // An array of ProjectArtifacts objects. + SecondaryArtifacts []types.ProjectArtifacts + + // An array of ProjectSourceVersion objects. If secondarySourceVersions is + // specified at the build level, then they take precedence over these + // secondarySourceVersions (at the project level). + SecondarySourceVersions []types.ProjectSourceVersion + + // An array of ProjectSource objects. + SecondarySources []types.ProjectSource + + // A version of the build input to be built for this project. If not specified, + // the latest version is used. If specified, it must be one of: + // + // - For CodeCommit: the commit ID, branch, or Git tag to use. + // + // - For GitHub: the commit ID, pull request ID, branch name, or tag name that + // corresponds to the version of the source code you want to build. If a pull + // request ID is specified, it must use the format pr/pull-request-ID (for + // example pr/25 ). If a branch name is specified, the branch's HEAD commit ID is + // used. If not specified, the default branch's HEAD commit ID is used. + // + // - For GitLab: the commit ID, branch, or Git tag to use. + // + // - For Bitbucket: the commit ID, branch name, or tag name that corresponds to + // the version of the source code you want to build. If a branch name is specified, + // the branch's HEAD commit ID is used. If not specified, the default branch's HEAD + // commit ID is used. + // + // - For Amazon S3: the version ID of the object that represents the build input + // ZIP file to use. + // + // If sourceVersion is specified at the build level, then that version takes + // precedence over this sourceVersion (at the project level). + // + // For more information, see [Source Version Sample with CodeBuild] in the CodeBuild User Guide. + // + // [Source Version Sample with CodeBuild]: https://docs.aws.amazon.com/codebuild/latest/userguide/sample-source-version.html + SourceVersion *string + + // A list of tag key and value pairs associated with this build project. + // + // These tags are available for use by Amazon Web Services services that support + // CodeBuild build project tags. + Tags []types.Tag + + // How long, in minutes, from 5 to 2160 (36 hours), for CodeBuild to wait before + // it times out any build that has not been marked as completed. The default is 60 + // minutes. + TimeoutInMinutes *int32 + + // VpcConfig enables CodeBuild to access resources in an Amazon VPC. + // + // If you're using compute fleets during project creation, do not provide + // vpcConfig. + VpcConfig *types.VpcConfig + + noSmithyDocumentSerde +} + +type CreateProjectOutput struct { + + // Information about the build project that was created. + Project *types.Project + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateProjectMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateProject{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateProject{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateProject"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpCreateProjectValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateProject(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateProject(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateProject", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_CreateReportGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_CreateReportGroup.go new file mode 100644 index 00000000000..c903285e217 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_CreateReportGroup.go @@ -0,0 +1,171 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/codebuild/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a report group. A report group contains a collection of reports. +func (c *Client) CreateReportGroup(ctx context.Context, params *CreateReportGroupInput, optFns ...func(*Options)) (*CreateReportGroupOutput, error) { + if params == nil { + params = &CreateReportGroupInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateReportGroup", params, optFns, c.addOperationCreateReportGroupMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateReportGroupOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateReportGroupInput struct { + + // A ReportExportConfig object that contains information about where the report + // group test results are exported. + // + // This member is required. + ExportConfig *types.ReportExportConfig + + // The name of the report group. + // + // This member is required. + Name *string + + // The type of report group. + // + // This member is required. + Type types.ReportType + + // A list of tag key and value pairs associated with this report group. + // + // These tags are available for use by Amazon Web Services services that support + // CodeBuild report group tags. + Tags []types.Tag + + noSmithyDocumentSerde +} + +type CreateReportGroupOutput struct { + + // Information about the report group that was created. + ReportGroup *types.ReportGroup + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateReportGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateReportGroup{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateReportGroup{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateReportGroup"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpCreateReportGroupValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateReportGroup(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateReportGroup(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateReportGroup", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_CreateWebhook.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_CreateWebhook.go new file mode 100644 index 00000000000..fc02c76b265 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_CreateWebhook.go @@ -0,0 +1,211 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/codebuild/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// For an existing CodeBuild build project that has its source code stored in a +// GitHub or Bitbucket repository, enables CodeBuild to start rebuilding the source +// code every time a code change is pushed to the repository. +// +// If you enable webhooks for an CodeBuild project, and the project is used as a +// build step in CodePipeline, then two identical builds are created for each +// commit. One build is triggered through webhooks, and one through CodePipeline. +// Because billing is on a per-build basis, you are billed for both builds. +// Therefore, if you are using CodePipeline, we recommend that you disable webhooks +// in CodeBuild. In the CodeBuild console, clear the Webhook box. For more +// information, see step 5 in [Change a Build Project's Settings]. +// +// [Change a Build Project's Settings]: https://docs.aws.amazon.com/codebuild/latest/userguide/change-project.html#change-project-console +func (c *Client) CreateWebhook(ctx context.Context, params *CreateWebhookInput, optFns ...func(*Options)) (*CreateWebhookOutput, error) { + if params == nil { + params = &CreateWebhookInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateWebhook", params, optFns, c.addOperationCreateWebhookMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateWebhookOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateWebhookInput struct { + + // The name of the CodeBuild project. + // + // This member is required. + ProjectName *string + + // A regular expression used to determine which repository branches are built when + // a webhook is triggered. If the name of a branch matches the regular expression, + // then it is built. If branchFilter is empty, then all branches are built. + // + // It is recommended that you use filterGroups instead of branchFilter . + BranchFilter *string + + // Specifies the type of build this webhook will trigger. + // + // RUNNER_BUILDKITE_BUILD is only available for NO_SOURCE source type projects + // configured for Buildkite runner builds. For more information about + // CodeBuild-hosted Buildkite runner builds, see [Tutorial: Configure a CodeBuild-hosted Buildkite runner]in the CodeBuild user guide. + // + // [Tutorial: Configure a CodeBuild-hosted Buildkite runner]: https://docs.aws.amazon.com/codebuild/latest/userguide/sample-runner-buildkite.html + BuildType types.WebhookBuildType + + // An array of arrays of WebhookFilter objects used to determine which webhooks + // are triggered. At least one WebhookFilter in the array must specify EVENT as + // its type . + // + // For a build to be triggered, at least one filter group in the filterGroups + // array must pass. For a filter group to pass, each of its filters must pass. + FilterGroups [][]types.WebhookFilter + + // If manualCreation is true, CodeBuild doesn't create a webhook in GitHub and + // instead returns payloadUrl and secret values for the webhook. The payloadUrl + // and secret values in the output can be used to manually create a webhook within + // GitHub. + // + // manualCreation is only available for GitHub webhooks. + ManualCreation *bool + + // A PullRequestBuildPolicy object that defines comment-based approval + // requirements for triggering builds on pull requests. This policy helps control + // when automated builds are executed based on contributor permissions and approval + // workflows. + PullRequestBuildPolicy *types.PullRequestBuildPolicy + + // The scope configuration for global or organization webhooks. + // + // Global or organization webhooks are only available for GitHub and Github + // Enterprise webhooks. + ScopeConfiguration *types.ScopeConfiguration + + noSmithyDocumentSerde +} + +type CreateWebhookOutput struct { + + // Information about a webhook that connects repository events to a build project + // in CodeBuild. + Webhook *types.Webhook + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateWebhookMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateWebhook{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateWebhook{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateWebhook"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpCreateWebhookValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateWebhook(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateWebhook(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateWebhook", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_DeleteBuildBatch.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_DeleteBuildBatch.go new file mode 100644 index 00000000000..ee611ed2d51 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_DeleteBuildBatch.go @@ -0,0 +1,162 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/codebuild/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a batch build. +func (c *Client) DeleteBuildBatch(ctx context.Context, params *DeleteBuildBatchInput, optFns ...func(*Options)) (*DeleteBuildBatchOutput, error) { + if params == nil { + params = &DeleteBuildBatchInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteBuildBatch", params, optFns, c.addOperationDeleteBuildBatchMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteBuildBatchOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteBuildBatchInput struct { + + // The identifier of the batch build to delete. + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +type DeleteBuildBatchOutput struct { + + // An array of strings that contain the identifiers of the builds that were + // deleted. + BuildsDeleted []string + + // An array of BuildNotDeleted objects that specify the builds that could not be + // deleted. + BuildsNotDeleted []types.BuildNotDeleted + + // The status code. + StatusCode *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteBuildBatchMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteBuildBatch{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteBuildBatch{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteBuildBatch"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeleteBuildBatchValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteBuildBatch(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteBuildBatch(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteBuildBatch", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_DeleteFleet.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_DeleteFleet.go new file mode 100644 index 00000000000..8997c1415fe --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_DeleteFleet.go @@ -0,0 +1,150 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a compute fleet. When you delete a compute fleet, its builds are not +// deleted. +func (c *Client) DeleteFleet(ctx context.Context, params *DeleteFleetInput, optFns ...func(*Options)) (*DeleteFleetOutput, error) { + if params == nil { + params = &DeleteFleetInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteFleet", params, optFns, c.addOperationDeleteFleetMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteFleetOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteFleetInput struct { + + // The ARN of the compute fleet. + // + // This member is required. + Arn *string + + noSmithyDocumentSerde +} + +type DeleteFleetOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteFleetMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteFleet{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteFleet{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteFleet"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeleteFleetValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteFleet(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteFleet(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteFleet", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_DeleteProject.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_DeleteProject.go new file mode 100644 index 00000000000..b6d36e489cb --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_DeleteProject.go @@ -0,0 +1,151 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a build project. When you delete a project, its builds are not +// +// deleted. +func (c *Client) DeleteProject(ctx context.Context, params *DeleteProjectInput, optFns ...func(*Options)) (*DeleteProjectOutput, error) { + if params == nil { + params = &DeleteProjectInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteProject", params, optFns, c.addOperationDeleteProjectMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteProjectOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteProjectInput struct { + + // The name of the build project. + // + // This member is required. + Name *string + + noSmithyDocumentSerde +} + +type DeleteProjectOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteProjectMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteProject{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteProject{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteProject"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeleteProjectValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteProject(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteProject(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteProject", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_DeleteReport.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_DeleteReport.go new file mode 100644 index 00000000000..900454d5c85 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_DeleteReport.go @@ -0,0 +1,149 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a report. +func (c *Client) DeleteReport(ctx context.Context, params *DeleteReportInput, optFns ...func(*Options)) (*DeleteReportOutput, error) { + if params == nil { + params = &DeleteReportInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteReport", params, optFns, c.addOperationDeleteReportMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteReportOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteReportInput struct { + + // The ARN of the report to delete. + // + // This member is required. + Arn *string + + noSmithyDocumentSerde +} + +type DeleteReportOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteReportMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteReport{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteReport{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteReport"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeleteReportValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteReport(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteReport(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteReport", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_DeleteReportGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_DeleteReportGroup.go new file mode 100644 index 00000000000..5863069ddec --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_DeleteReportGroup.go @@ -0,0 +1,162 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a report group. Before you delete a report group, you must delete its +// reports. +func (c *Client) DeleteReportGroup(ctx context.Context, params *DeleteReportGroupInput, optFns ...func(*Options)) (*DeleteReportGroupOutput, error) { + if params == nil { + params = &DeleteReportGroupInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteReportGroup", params, optFns, c.addOperationDeleteReportGroupMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteReportGroupOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteReportGroupInput struct { + + // The ARN of the report group to delete. + // + // This member is required. + Arn *string + + // If true , deletes any reports that belong to a report group before deleting the + // report group. + // + // If false , you must delete any reports in the report group. Use [ListReportsForReportGroup] to get the + // reports in a report group. Use [DeleteReport]to delete the reports. If you call + // DeleteReportGroup for a report group that contains one or more reports, an + // exception is thrown. + // + // [ListReportsForReportGroup]: https://docs.aws.amazon.com/codebuild/latest/APIReference/API_ListReportsForReportGroup.html + // [DeleteReport]: https://docs.aws.amazon.com/codebuild/latest/APIReference/API_DeleteReport.html + DeleteReports bool + + noSmithyDocumentSerde +} + +type DeleteReportGroupOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteReportGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteReportGroup{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteReportGroup{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteReportGroup"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeleteReportGroupValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteReportGroup(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteReportGroup(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteReportGroup", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_DeleteResourcePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_DeleteResourcePolicy.go new file mode 100644 index 00000000000..e8bc8e408c6 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_DeleteResourcePolicy.go @@ -0,0 +1,149 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a resource policy that is identified by its resource ARN. +func (c *Client) DeleteResourcePolicy(ctx context.Context, params *DeleteResourcePolicyInput, optFns ...func(*Options)) (*DeleteResourcePolicyOutput, error) { + if params == nil { + params = &DeleteResourcePolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteResourcePolicy", params, optFns, c.addOperationDeleteResourcePolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteResourcePolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteResourcePolicyInput struct { + + // The ARN of the resource that is associated with the resource policy. + // + // This member is required. + ResourceArn *string + + noSmithyDocumentSerde +} + +type DeleteResourcePolicyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteResourcePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteResourcePolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteResourcePolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteResourcePolicy"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeleteResourcePolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteResourcePolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteResourcePolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteResourcePolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_DeleteSourceCredentials.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_DeleteSourceCredentials.go new file mode 100644 index 00000000000..6a87d4c8169 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_DeleteSourceCredentials.go @@ -0,0 +1,153 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a set of GitHub, GitHub Enterprise, or Bitbucket source credentials. +func (c *Client) DeleteSourceCredentials(ctx context.Context, params *DeleteSourceCredentialsInput, optFns ...func(*Options)) (*DeleteSourceCredentialsOutput, error) { + if params == nil { + params = &DeleteSourceCredentialsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteSourceCredentials", params, optFns, c.addOperationDeleteSourceCredentialsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteSourceCredentialsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteSourceCredentialsInput struct { + + // The Amazon Resource Name (ARN) of the token. + // + // This member is required. + Arn *string + + noSmithyDocumentSerde +} + +type DeleteSourceCredentialsOutput struct { + + // The Amazon Resource Name (ARN) of the token. + Arn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteSourceCredentialsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteSourceCredentials{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteSourceCredentials{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteSourceCredentials"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeleteSourceCredentialsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteSourceCredentials(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteSourceCredentials(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteSourceCredentials", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_DeleteWebhook.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_DeleteWebhook.go new file mode 100644 index 00000000000..6978e9f9b8e --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_DeleteWebhook.go @@ -0,0 +1,151 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// For an existing CodeBuild build project that has its source code stored in a +// GitHub or Bitbucket repository, stops CodeBuild from rebuilding the source code +// every time a code change is pushed to the repository. +func (c *Client) DeleteWebhook(ctx context.Context, params *DeleteWebhookInput, optFns ...func(*Options)) (*DeleteWebhookOutput, error) { + if params == nil { + params = &DeleteWebhookInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteWebhook", params, optFns, c.addOperationDeleteWebhookMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteWebhookOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteWebhookInput struct { + + // The name of the CodeBuild project. + // + // This member is required. + ProjectName *string + + noSmithyDocumentSerde +} + +type DeleteWebhookOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteWebhookMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteWebhook{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteWebhook{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteWebhook"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeleteWebhookValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteWebhook(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteWebhook(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteWebhook", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_DescribeCodeCoverages.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_DescribeCodeCoverages.go new file mode 100644 index 00000000000..796b03765d2 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_DescribeCodeCoverages.go @@ -0,0 +1,277 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/codebuild/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves one or more code coverage reports. +func (c *Client) DescribeCodeCoverages(ctx context.Context, params *DescribeCodeCoveragesInput, optFns ...func(*Options)) (*DescribeCodeCoveragesOutput, error) { + if params == nil { + params = &DescribeCodeCoveragesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeCodeCoverages", params, optFns, c.addOperationDescribeCodeCoveragesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeCodeCoveragesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeCodeCoveragesInput struct { + + // The ARN of the report for which test cases are returned. + // + // This member is required. + ReportArn *string + + // The maximum line coverage percentage to report. + MaxLineCoveragePercentage *float64 + + // The maximum number of results to return. + MaxResults *int32 + + // The minimum line coverage percentage to report. + MinLineCoveragePercentage *float64 + + // The nextToken value returned from a previous call to DescribeCodeCoverages . + // This specifies the next item to return. To return the beginning of the list, + // exclude this parameter. + NextToken *string + + // Specifies how the results are sorted. Possible values are: + // + // FILE_PATH The results are sorted by file path. + // + // LINE_COVERAGE_PERCENTAGE The results are sorted by the percentage of lines that + // are covered. + SortBy types.ReportCodeCoverageSortByType + + // Specifies if the results are sorted in ascending or descending order. + SortOrder types.SortOrderType + + noSmithyDocumentSerde +} + +type DescribeCodeCoveragesOutput struct { + + // An array of CodeCoverage objects that contain the results. + CodeCoverages []types.CodeCoverage + + // If there are more items to return, this contains a token that is passed to a + // subsequent call to DescribeCodeCoverages to retrieve the next set of items. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeCodeCoveragesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeCodeCoverages{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeCodeCoverages{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeCodeCoverages"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDescribeCodeCoveragesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeCodeCoverages(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// DescribeCodeCoveragesPaginatorOptions is the paginator options for +// DescribeCodeCoverages +type DescribeCodeCoveragesPaginatorOptions struct { + // The maximum number of results to return. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeCodeCoveragesPaginator is a paginator for DescribeCodeCoverages +type DescribeCodeCoveragesPaginator struct { + options DescribeCodeCoveragesPaginatorOptions + client DescribeCodeCoveragesAPIClient + params *DescribeCodeCoveragesInput + nextToken *string + firstPage bool +} + +// NewDescribeCodeCoveragesPaginator returns a new DescribeCodeCoveragesPaginator +func NewDescribeCodeCoveragesPaginator(client DescribeCodeCoveragesAPIClient, params *DescribeCodeCoveragesInput, optFns ...func(*DescribeCodeCoveragesPaginatorOptions)) *DescribeCodeCoveragesPaginator { + if params == nil { + params = &DescribeCodeCoveragesInput{} + } + + options := DescribeCodeCoveragesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeCodeCoveragesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeCodeCoveragesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeCodeCoverages page. +func (p *DescribeCodeCoveragesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeCodeCoveragesOutput, 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 + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeCodeCoverages(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 +} + +// DescribeCodeCoveragesAPIClient is a client that implements the +// DescribeCodeCoverages operation. +type DescribeCodeCoveragesAPIClient interface { + DescribeCodeCoverages(context.Context, *DescribeCodeCoveragesInput, ...func(*Options)) (*DescribeCodeCoveragesOutput, error) +} + +var _ DescribeCodeCoveragesAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opDescribeCodeCoverages(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeCodeCoverages", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_DescribeTestCases.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_DescribeTestCases.go new file mode 100644 index 00000000000..e7fe97a3282 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_DescribeTestCases.go @@ -0,0 +1,273 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/codebuild/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a list of details about test cases for a report. +func (c *Client) DescribeTestCases(ctx context.Context, params *DescribeTestCasesInput, optFns ...func(*Options)) (*DescribeTestCasesOutput, error) { + if params == nil { + params = &DescribeTestCasesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeTestCases", params, optFns, c.addOperationDescribeTestCasesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeTestCasesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeTestCasesInput struct { + + // The ARN of the report for which test cases are returned. + // + // This member is required. + ReportArn *string + + // A TestCaseFilter object used to filter the returned reports. + Filter *types.TestCaseFilter + + // The maximum number of paginated test cases returned per response. Use nextToken + // to iterate pages in the list of returned TestCase objects. The default value is + // 100. + MaxResults *int32 + + // During a previous call, the maximum number of items that can be returned is + // the value specified in maxResults . If there more items in the list, then a + // unique string called a nextToken is returned. To get the next batch of items in + // the list, call this operation again, adding the next token to the call. To get + // all of the items in the list, keep calling this operation with each subsequent + // next token that is returned, until no more next tokens are returned. + NextToken *string + + noSmithyDocumentSerde +} + +type DescribeTestCasesOutput struct { + + // During a previous call, the maximum number of items that can be returned is + // the value specified in maxResults . If there more items in the list, then a + // unique string called a nextToken is returned. To get the next batch of items in + // the list, call this operation again, adding the next token to the call. To get + // all of the items in the list, keep calling this operation with each subsequent + // next token that is returned, until no more next tokens are returned. + NextToken *string + + // The returned list of test cases. + TestCases []types.TestCase + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeTestCasesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeTestCases{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeTestCases{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeTestCases"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDescribeTestCasesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeTestCases(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// DescribeTestCasesPaginatorOptions is the paginator options for DescribeTestCases +type DescribeTestCasesPaginatorOptions struct { + // The maximum number of paginated test cases returned per response. Use nextToken + // to iterate pages in the list of returned TestCase objects. The default 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 +} + +// DescribeTestCasesPaginator is a paginator for DescribeTestCases +type DescribeTestCasesPaginator struct { + options DescribeTestCasesPaginatorOptions + client DescribeTestCasesAPIClient + params *DescribeTestCasesInput + nextToken *string + firstPage bool +} + +// NewDescribeTestCasesPaginator returns a new DescribeTestCasesPaginator +func NewDescribeTestCasesPaginator(client DescribeTestCasesAPIClient, params *DescribeTestCasesInput, optFns ...func(*DescribeTestCasesPaginatorOptions)) *DescribeTestCasesPaginator { + if params == nil { + params = &DescribeTestCasesInput{} + } + + options := DescribeTestCasesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeTestCasesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeTestCasesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeTestCases page. +func (p *DescribeTestCasesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeTestCasesOutput, 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 + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeTestCases(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 +} + +// DescribeTestCasesAPIClient is a client that implements the DescribeTestCases +// operation. +type DescribeTestCasesAPIClient interface { + DescribeTestCases(context.Context, *DescribeTestCasesInput, ...func(*Options)) (*DescribeTestCasesOutput, error) +} + +var _ DescribeTestCasesAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opDescribeTestCases(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeTestCases", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_GetReportGroupTrend.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_GetReportGroupTrend.go new file mode 100644 index 00000000000..402e22e69c5 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_GetReportGroupTrend.go @@ -0,0 +1,193 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/codebuild/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Analyzes and accumulates test report values for the specified test reports. +func (c *Client) GetReportGroupTrend(ctx context.Context, params *GetReportGroupTrendInput, optFns ...func(*Options)) (*GetReportGroupTrendOutput, error) { + if params == nil { + params = &GetReportGroupTrendInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetReportGroupTrend", params, optFns, c.addOperationGetReportGroupTrendMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetReportGroupTrendOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetReportGroupTrendInput struct { + + // The ARN of the report group that contains the reports to analyze. + // + // This member is required. + ReportGroupArn *string + + // The test report value to accumulate. This must be one of the following values: + // + // Test reports: DURATION Accumulate the test run times for the specified reports. + // + // PASS_RATE Accumulate the percentage of tests that passed for the specified test + // reports. + // + // TOTAL Accumulate the total number of tests for the specified test reports. + // + // Code coverage reports: BRANCH_COVERAGE Accumulate the branch coverage + // percentages for the specified test reports. + // + // BRANCHES_COVERED Accumulate the branches covered values for the specified test + // reports. + // + // BRANCHES_MISSED Accumulate the branches missed values for the specified test + // reports. + // + // LINE_COVERAGE Accumulate the line coverage percentages for the specified test + // reports. + // + // LINES_COVERED Accumulate the lines covered values for the specified test + // reports. + // + // LINES_MISSED Accumulate the lines not covered values for the specified test + // reports. + // + // This member is required. + TrendField types.ReportGroupTrendFieldType + + // The number of reports to analyze. This operation always retrieves the most + // recent reports. + // + // If this parameter is omitted, the most recent 100 reports are analyzed. + NumOfReports *int32 + + noSmithyDocumentSerde +} + +type GetReportGroupTrendOutput struct { + + // An array that contains the raw data for each report. + RawData []types.ReportWithRawData + + // Contains the accumulated trend data. + Stats *types.ReportGroupTrendStats + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetReportGroupTrendMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetReportGroupTrend{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetReportGroupTrend{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetReportGroupTrend"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetReportGroupTrendValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetReportGroupTrend(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetReportGroupTrend(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetReportGroupTrend", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_GetResourcePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_GetResourcePolicy.go new file mode 100644 index 00000000000..e111bc31ad6 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_GetResourcePolicy.go @@ -0,0 +1,153 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets a resource policy that is identified by its resource ARN. +func (c *Client) GetResourcePolicy(ctx context.Context, params *GetResourcePolicyInput, optFns ...func(*Options)) (*GetResourcePolicyOutput, error) { + if params == nil { + params = &GetResourcePolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetResourcePolicy", params, optFns, c.addOperationGetResourcePolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetResourcePolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetResourcePolicyInput struct { + + // The ARN of the resource that is associated with the resource policy. + // + // This member is required. + ResourceArn *string + + noSmithyDocumentSerde +} + +type GetResourcePolicyOutput struct { + + // The resource policy for the resource identified by the input ARN parameter. + Policy *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetResourcePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetResourcePolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetResourcePolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetResourcePolicy"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetResourcePolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetResourcePolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetResourcePolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetResourcePolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_ImportSourceCredentials.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_ImportSourceCredentials.go new file mode 100644 index 00000000000..69bdc064bdf --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_ImportSourceCredentials.go @@ -0,0 +1,180 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/codebuild/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Imports the source repository credentials for an CodeBuild project that has +// +// its source code stored in a GitHub, GitHub Enterprise, GitLab, GitLab Self +// Managed, or Bitbucket repository. +func (c *Client) ImportSourceCredentials(ctx context.Context, params *ImportSourceCredentialsInput, optFns ...func(*Options)) (*ImportSourceCredentialsOutput, error) { + if params == nil { + params = &ImportSourceCredentialsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ImportSourceCredentials", params, optFns, c.addOperationImportSourceCredentialsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ImportSourceCredentialsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ImportSourceCredentialsInput struct { + + // The type of authentication used to connect to a GitHub, GitHub Enterprise, + // GitLab, GitLab Self Managed, or Bitbucket repository. An OAUTH connection is not + // supported by the API and must be created using the CodeBuild console. + // + // This member is required. + AuthType types.AuthType + + // The source provider used for this project. + // + // This member is required. + ServerType types.ServerType + + // For GitHub or GitHub Enterprise, this is the personal access token. For + // Bitbucket, this is either the access token or the app password. For the authType + // CODECONNECTIONS, this is the connectionArn . For the authType SECRETS_MANAGER, + // this is the secretArn . + // + // This member is required. + Token *string + + // Set to false to prevent overwriting the repository source credentials. Set to + // true to overwrite the repository source credentials. The default value is true . + ShouldOverwrite *bool + + // The Bitbucket username when the authType is BASIC_AUTH. This parameter is not + // valid for other types of source providers or connections. + Username *string + + noSmithyDocumentSerde +} + +type ImportSourceCredentialsOutput struct { + + // The Amazon Resource Name (ARN) of the token. + Arn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationImportSourceCredentialsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpImportSourceCredentials{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpImportSourceCredentials{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ImportSourceCredentials"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpImportSourceCredentialsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opImportSourceCredentials(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opImportSourceCredentials(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ImportSourceCredentials", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_InvalidateProjectCache.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_InvalidateProjectCache.go new file mode 100644 index 00000000000..d6ccb89bec7 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_InvalidateProjectCache.go @@ -0,0 +1,149 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Resets the cache for a project. +func (c *Client) InvalidateProjectCache(ctx context.Context, params *InvalidateProjectCacheInput, optFns ...func(*Options)) (*InvalidateProjectCacheOutput, error) { + if params == nil { + params = &InvalidateProjectCacheInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "InvalidateProjectCache", params, optFns, c.addOperationInvalidateProjectCacheMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*InvalidateProjectCacheOutput) + out.ResultMetadata = metadata + return out, nil +} + +type InvalidateProjectCacheInput struct { + + // The name of the CodeBuild build project that the cache is reset for. + // + // This member is required. + ProjectName *string + + noSmithyDocumentSerde +} + +type InvalidateProjectCacheOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationInvalidateProjectCacheMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpInvalidateProjectCache{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpInvalidateProjectCache{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "InvalidateProjectCache"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpInvalidateProjectCacheValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opInvalidateProjectCache(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opInvalidateProjectCache(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "InvalidateProjectCache", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_ListBuildBatches.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_ListBuildBatches.go new file mode 100644 index 00000000000..f9086b125a2 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_ListBuildBatches.go @@ -0,0 +1,263 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/codebuild/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves the identifiers of your build batches in the current region. +func (c *Client) ListBuildBatches(ctx context.Context, params *ListBuildBatchesInput, optFns ...func(*Options)) (*ListBuildBatchesOutput, error) { + if params == nil { + params = &ListBuildBatchesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListBuildBatches", params, optFns, c.addOperationListBuildBatchesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListBuildBatchesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListBuildBatchesInput struct { + + // A BuildBatchFilter object that specifies the filters for the search. + Filter *types.BuildBatchFilter + + // The maximum number of results to return. + MaxResults *int32 + + // The nextToken value returned from a previous call to ListBuildBatches . This + // specifies the next item to return. To return the beginning of the list, exclude + // this parameter. + NextToken *string + + // Specifies the sort order of the returned items. Valid values include: + // + // - ASCENDING : List the batch build identifiers in ascending order by + // identifier. + // + // - DESCENDING : List the batch build identifiers in descending order by + // identifier. + SortOrder types.SortOrderType + + noSmithyDocumentSerde +} + +type ListBuildBatchesOutput struct { + + // An array of strings that contains the batch build identifiers. + Ids []string + + // If there are more items to return, this contains a token that is passed to a + // subsequent call to ListBuildBatches to retrieve the next set of items. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListBuildBatchesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListBuildBatches{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListBuildBatches{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListBuildBatches"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListBuildBatches(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// ListBuildBatchesPaginatorOptions is the paginator options for ListBuildBatches +type ListBuildBatchesPaginatorOptions struct { + // The maximum number of results to return. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListBuildBatchesPaginator is a paginator for ListBuildBatches +type ListBuildBatchesPaginator struct { + options ListBuildBatchesPaginatorOptions + client ListBuildBatchesAPIClient + params *ListBuildBatchesInput + nextToken *string + firstPage bool +} + +// NewListBuildBatchesPaginator returns a new ListBuildBatchesPaginator +func NewListBuildBatchesPaginator(client ListBuildBatchesAPIClient, params *ListBuildBatchesInput, optFns ...func(*ListBuildBatchesPaginatorOptions)) *ListBuildBatchesPaginator { + if params == nil { + params = &ListBuildBatchesInput{} + } + + options := ListBuildBatchesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListBuildBatchesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListBuildBatchesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListBuildBatches page. +func (p *ListBuildBatchesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListBuildBatchesOutput, 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 + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListBuildBatches(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 +} + +// ListBuildBatchesAPIClient is a client that implements the ListBuildBatches +// operation. +type ListBuildBatchesAPIClient interface { + ListBuildBatches(context.Context, *ListBuildBatchesInput, ...func(*Options)) (*ListBuildBatchesOutput, error) +} + +var _ ListBuildBatchesAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListBuildBatches(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListBuildBatches", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_ListBuildBatchesForProject.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_ListBuildBatchesForProject.go new file mode 100644 index 00000000000..fc1eb7c6ada --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_ListBuildBatchesForProject.go @@ -0,0 +1,269 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/codebuild/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves the identifiers of the build batches for a specific project. +func (c *Client) ListBuildBatchesForProject(ctx context.Context, params *ListBuildBatchesForProjectInput, optFns ...func(*Options)) (*ListBuildBatchesForProjectOutput, error) { + if params == nil { + params = &ListBuildBatchesForProjectInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListBuildBatchesForProject", params, optFns, c.addOperationListBuildBatchesForProjectMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListBuildBatchesForProjectOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListBuildBatchesForProjectInput struct { + + // A BuildBatchFilter object that specifies the filters for the search. + Filter *types.BuildBatchFilter + + // The maximum number of results to return. + MaxResults *int32 + + // The nextToken value returned from a previous call to ListBuildBatchesForProject + // . This specifies the next item to return. To return the beginning of the list, + // exclude this parameter. + NextToken *string + + // The name of the project. + ProjectName *string + + // Specifies the sort order of the returned items. Valid values include: + // + // - ASCENDING : List the batch build identifiers in ascending order by + // identifier. + // + // - DESCENDING : List the batch build identifiers in descending order by + // identifier. + SortOrder types.SortOrderType + + noSmithyDocumentSerde +} + +type ListBuildBatchesForProjectOutput struct { + + // An array of strings that contains the batch build identifiers. + Ids []string + + // If there are more items to return, this contains a token that is passed to a + // subsequent call to ListBuildBatchesForProject to retrieve the next set of items. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListBuildBatchesForProjectMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListBuildBatchesForProject{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListBuildBatchesForProject{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListBuildBatchesForProject"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListBuildBatchesForProject(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// ListBuildBatchesForProjectPaginatorOptions is the paginator options for +// ListBuildBatchesForProject +type ListBuildBatchesForProjectPaginatorOptions struct { + // The maximum number of results to return. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListBuildBatchesForProjectPaginator is a paginator for +// ListBuildBatchesForProject +type ListBuildBatchesForProjectPaginator struct { + options ListBuildBatchesForProjectPaginatorOptions + client ListBuildBatchesForProjectAPIClient + params *ListBuildBatchesForProjectInput + nextToken *string + firstPage bool +} + +// NewListBuildBatchesForProjectPaginator returns a new +// ListBuildBatchesForProjectPaginator +func NewListBuildBatchesForProjectPaginator(client ListBuildBatchesForProjectAPIClient, params *ListBuildBatchesForProjectInput, optFns ...func(*ListBuildBatchesForProjectPaginatorOptions)) *ListBuildBatchesForProjectPaginator { + if params == nil { + params = &ListBuildBatchesForProjectInput{} + } + + options := ListBuildBatchesForProjectPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListBuildBatchesForProjectPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListBuildBatchesForProjectPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListBuildBatchesForProject page. +func (p *ListBuildBatchesForProjectPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListBuildBatchesForProjectOutput, 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 + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListBuildBatchesForProject(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 +} + +// ListBuildBatchesForProjectAPIClient is a client that implements the +// ListBuildBatchesForProject operation. +type ListBuildBatchesForProjectAPIClient interface { + ListBuildBatchesForProject(context.Context, *ListBuildBatchesForProjectInput, ...func(*Options)) (*ListBuildBatchesForProjectOutput, error) +} + +var _ ListBuildBatchesForProjectAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListBuildBatchesForProject(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListBuildBatchesForProject", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_ListBuilds.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_ListBuilds.go new file mode 100644 index 00000000000..93a2585b527 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_ListBuilds.go @@ -0,0 +1,247 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/codebuild/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets a list of build IDs, with each build ID representing a single build. +func (c *Client) ListBuilds(ctx context.Context, params *ListBuildsInput, optFns ...func(*Options)) (*ListBuildsOutput, error) { + if params == nil { + params = &ListBuildsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListBuilds", params, optFns, c.addOperationListBuildsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListBuildsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListBuildsInput struct { + + // During a previous call, if there are more than 100 items in the list, only the + // first 100 items are returned, along with a unique string called a nextToken. To + // get the next batch of items in the list, call this operation again, adding the + // next token to the call. To get all of the items in the list, keep calling this + // operation with each subsequent next token that is returned, until no more next + // tokens are returned. + NextToken *string + + // The order to list build IDs. Valid values include: + // + // - ASCENDING : List the build IDs in ascending order by build ID. + // + // - DESCENDING : List the build IDs in descending order by build ID. + SortOrder types.SortOrderType + + noSmithyDocumentSerde +} + +type ListBuildsOutput struct { + + // A list of build IDs, with each build ID representing a single build. + Ids []string + + // If there are more than 100 items in the list, only the first 100 items are + // returned, along with a unique string called a nextToken. To get the next batch + // of items in the list, call this operation again, adding the next token to the + // call. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListBuildsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListBuilds{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListBuilds{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListBuilds"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListBuilds(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// ListBuildsPaginatorOptions is the paginator options for ListBuilds +type ListBuildsPaginatorOptions 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 +} + +// ListBuildsPaginator is a paginator for ListBuilds +type ListBuildsPaginator struct { + options ListBuildsPaginatorOptions + client ListBuildsAPIClient + params *ListBuildsInput + nextToken *string + firstPage bool +} + +// NewListBuildsPaginator returns a new ListBuildsPaginator +func NewListBuildsPaginator(client ListBuildsAPIClient, params *ListBuildsInput, optFns ...func(*ListBuildsPaginatorOptions)) *ListBuildsPaginator { + if params == nil { + params = &ListBuildsInput{} + } + + options := ListBuildsPaginatorOptions{} + + for _, fn := range optFns { + fn(&options) + } + + return &ListBuildsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListBuildsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListBuilds page. +func (p *ListBuildsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListBuildsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListBuilds(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 +} + +// ListBuildsAPIClient is a client that implements the ListBuilds operation. +type ListBuildsAPIClient interface { + ListBuilds(context.Context, *ListBuildsInput, ...func(*Options)) (*ListBuildsOutput, error) +} + +var _ ListBuildsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListBuilds(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListBuilds", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_ListBuildsForProject.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_ListBuildsForProject.go new file mode 100644 index 00000000000..0acbe4aeaba --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_ListBuildsForProject.go @@ -0,0 +1,266 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/codebuild/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets a list of build identifiers for the specified build project, with each +// build identifier representing a single build. +func (c *Client) ListBuildsForProject(ctx context.Context, params *ListBuildsForProjectInput, optFns ...func(*Options)) (*ListBuildsForProjectOutput, error) { + if params == nil { + params = &ListBuildsForProjectInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListBuildsForProject", params, optFns, c.addOperationListBuildsForProjectMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListBuildsForProjectOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListBuildsForProjectInput struct { + + // The name of the CodeBuild project. + // + // This member is required. + ProjectName *string + + // During a previous call, if there are more than 100 items in the list, only the + // first 100 items are returned, along with a unique string called a nextToken. To + // get the next batch of items in the list, call this operation again, adding the + // next token to the call. To get all of the items in the list, keep calling this + // operation with each subsequent next token that is returned, until no more next + // tokens are returned. + NextToken *string + + // The order to sort the results in. The results are sorted by build number, not + // the build identifier. If this is not specified, the results are sorted in + // descending order. + // + // Valid values include: + // + // - ASCENDING : List the build identifiers in ascending order, by build number. + // + // - DESCENDING : List the build identifiers in descending order, by build number. + // + // If the project has more than 100 builds, setting the sort order will result in + // an error. + SortOrder types.SortOrderType + + noSmithyDocumentSerde +} + +type ListBuildsForProjectOutput struct { + + // A list of build identifiers for the specified build project, with each build ID + // representing a single build. + Ids []string + + // If there are more than 100 items in the list, only the first 100 items are + // returned, along with a unique string called a nextToken. To get the next batch + // of items in the list, call this operation again, adding the next token to the + // call. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListBuildsForProjectMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListBuildsForProject{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListBuildsForProject{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListBuildsForProject"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpListBuildsForProjectValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListBuildsForProject(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// ListBuildsForProjectPaginatorOptions is the paginator options for +// ListBuildsForProject +type ListBuildsForProjectPaginatorOptions 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 +} + +// ListBuildsForProjectPaginator is a paginator for ListBuildsForProject +type ListBuildsForProjectPaginator struct { + options ListBuildsForProjectPaginatorOptions + client ListBuildsForProjectAPIClient + params *ListBuildsForProjectInput + nextToken *string + firstPage bool +} + +// NewListBuildsForProjectPaginator returns a new ListBuildsForProjectPaginator +func NewListBuildsForProjectPaginator(client ListBuildsForProjectAPIClient, params *ListBuildsForProjectInput, optFns ...func(*ListBuildsForProjectPaginatorOptions)) *ListBuildsForProjectPaginator { + if params == nil { + params = &ListBuildsForProjectInput{} + } + + options := ListBuildsForProjectPaginatorOptions{} + + for _, fn := range optFns { + fn(&options) + } + + return &ListBuildsForProjectPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListBuildsForProjectPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListBuildsForProject page. +func (p *ListBuildsForProjectPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListBuildsForProjectOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListBuildsForProject(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 +} + +// ListBuildsForProjectAPIClient is a client that implements the +// ListBuildsForProject operation. +type ListBuildsForProjectAPIClient interface { + ListBuildsForProject(context.Context, *ListBuildsForProjectInput, ...func(*Options)) (*ListBuildsForProjectOutput, error) +} + +var _ ListBuildsForProjectAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListBuildsForProject(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListBuildsForProject", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_ListCommandExecutionsForSandbox.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_ListCommandExecutionsForSandbox.go new file mode 100644 index 00000000000..793c312fadc --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_ListCommandExecutionsForSandbox.go @@ -0,0 +1,263 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/codebuild/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets a list of command executions for a sandbox. +func (c *Client) ListCommandExecutionsForSandbox(ctx context.Context, params *ListCommandExecutionsForSandboxInput, optFns ...func(*Options)) (*ListCommandExecutionsForSandboxOutput, error) { + if params == nil { + params = &ListCommandExecutionsForSandboxInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListCommandExecutionsForSandbox", params, optFns, c.addOperationListCommandExecutionsForSandboxMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListCommandExecutionsForSandboxOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListCommandExecutionsForSandboxInput struct { + + // A sandboxId or sandboxArn . + // + // This member is required. + SandboxId *string + + // The maximum number of sandbox records to be retrieved. + MaxResults *int32 + + // The next token, if any, to get paginated results. You will get this value from + // previous execution of list sandboxes. + NextToken *string + + // The order in which sandbox records should be retrieved. + SortOrder types.SortOrderType + + noSmithyDocumentSerde +} + +type ListCommandExecutionsForSandboxOutput struct { + + // Information about the requested command executions. + CommandExecutions []types.CommandExecution + + // Information about the next token to get paginated results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListCommandExecutionsForSandboxMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListCommandExecutionsForSandbox{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListCommandExecutionsForSandbox{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListCommandExecutionsForSandbox"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpListCommandExecutionsForSandboxValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCommandExecutionsForSandbox(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// ListCommandExecutionsForSandboxPaginatorOptions is the paginator options for +// ListCommandExecutionsForSandbox +type ListCommandExecutionsForSandboxPaginatorOptions struct { + // The maximum number of sandbox records to be retrieved. + 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 +} + +// ListCommandExecutionsForSandboxPaginator is a paginator for +// ListCommandExecutionsForSandbox +type ListCommandExecutionsForSandboxPaginator struct { + options ListCommandExecutionsForSandboxPaginatorOptions + client ListCommandExecutionsForSandboxAPIClient + params *ListCommandExecutionsForSandboxInput + nextToken *string + firstPage bool +} + +// NewListCommandExecutionsForSandboxPaginator returns a new +// ListCommandExecutionsForSandboxPaginator +func NewListCommandExecutionsForSandboxPaginator(client ListCommandExecutionsForSandboxAPIClient, params *ListCommandExecutionsForSandboxInput, optFns ...func(*ListCommandExecutionsForSandboxPaginatorOptions)) *ListCommandExecutionsForSandboxPaginator { + if params == nil { + params = &ListCommandExecutionsForSandboxInput{} + } + + options := ListCommandExecutionsForSandboxPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListCommandExecutionsForSandboxPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListCommandExecutionsForSandboxPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListCommandExecutionsForSandbox page. +func (p *ListCommandExecutionsForSandboxPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListCommandExecutionsForSandboxOutput, 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 + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListCommandExecutionsForSandbox(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 +} + +// ListCommandExecutionsForSandboxAPIClient is a client that implements the +// ListCommandExecutionsForSandbox operation. +type ListCommandExecutionsForSandboxAPIClient interface { + ListCommandExecutionsForSandbox(context.Context, *ListCommandExecutionsForSandboxInput, ...func(*Options)) (*ListCommandExecutionsForSandboxOutput, error) +} + +var _ ListCommandExecutionsForSandboxAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListCommandExecutionsForSandbox(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListCommandExecutionsForSandbox", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_ListCuratedEnvironmentImages.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_ListCuratedEnvironmentImages.go new file mode 100644 index 00000000000..bd046ddb2c7 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_ListCuratedEnvironmentImages.go @@ -0,0 +1,146 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/codebuild/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets information about Docker images that are managed by CodeBuild. +func (c *Client) ListCuratedEnvironmentImages(ctx context.Context, params *ListCuratedEnvironmentImagesInput, optFns ...func(*Options)) (*ListCuratedEnvironmentImagesOutput, error) { + if params == nil { + params = &ListCuratedEnvironmentImagesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListCuratedEnvironmentImages", params, optFns, c.addOperationListCuratedEnvironmentImagesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListCuratedEnvironmentImagesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListCuratedEnvironmentImagesInput struct { + noSmithyDocumentSerde +} + +type ListCuratedEnvironmentImagesOutput struct { + + // Information about supported platforms for Docker images that are managed by + // CodeBuild. + Platforms []types.EnvironmentPlatform + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListCuratedEnvironmentImagesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListCuratedEnvironmentImages{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListCuratedEnvironmentImages{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListCuratedEnvironmentImages"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCuratedEnvironmentImages(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListCuratedEnvironmentImages(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListCuratedEnvironmentImages", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_ListFleets.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_ListFleets.go new file mode 100644 index 00000000000..b0d8bcdce2d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_ListFleets.go @@ -0,0 +1,280 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/codebuild/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets a list of compute fleet names with each compute fleet name representing a +// single compute fleet. +func (c *Client) ListFleets(ctx context.Context, params *ListFleetsInput, optFns ...func(*Options)) (*ListFleetsOutput, error) { + if params == nil { + params = &ListFleetsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListFleets", params, optFns, c.addOperationListFleetsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListFleetsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListFleetsInput struct { + + // The maximum number of paginated compute fleets returned per response. Use + // nextToken to iterate pages in the list of returned compute fleets. + MaxResults *int32 + + // During a previous call, if there are more than 100 items in the list, only the + // first 100 items are returned, along with a unique string called a nextToken. To + // get the next batch of items in the list, call this operation again, adding the + // next token to the call. To get all of the items in the list, keep calling this + // operation with each subsequent next token that is returned, until no more next + // tokens are returned. + NextToken *string + + // The criterion to be used to list compute fleet names. Valid values include: + // + // - CREATED_TIME : List based on when each compute fleet was created. + // + // - LAST_MODIFIED_TIME : List based on when information about each compute fleet + // was last changed. + // + // - NAME : List based on each compute fleet's name. + // + // Use sortOrder to specify in what order to list the compute fleet names based on + // the preceding criteria. + SortBy types.FleetSortByType + + // The order in which to list compute fleets. Valid values include: + // + // - ASCENDING : List in ascending order. + // + // - DESCENDING : List in descending order. + // + // Use sortBy to specify the criterion to be used to list compute fleet names. + SortOrder types.SortOrderType + + noSmithyDocumentSerde +} + +type ListFleetsOutput struct { + + // The list of compute fleet names. + Fleets []string + + // If there are more than 100 items in the list, only the first 100 items are + // returned, along with a unique string called a nextToken. To get the next batch + // of items in the list, call this operation again, adding the next token to the + // call. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListFleetsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListFleets{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListFleets{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListFleets"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListFleets(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// ListFleetsPaginatorOptions is the paginator options for ListFleets +type ListFleetsPaginatorOptions struct { + // The maximum number of paginated compute fleets returned per response. Use + // nextToken to iterate pages in the list of returned compute fleets. + 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 +} + +// ListFleetsPaginator is a paginator for ListFleets +type ListFleetsPaginator struct { + options ListFleetsPaginatorOptions + client ListFleetsAPIClient + params *ListFleetsInput + nextToken *string + firstPage bool +} + +// NewListFleetsPaginator returns a new ListFleetsPaginator +func NewListFleetsPaginator(client ListFleetsAPIClient, params *ListFleetsInput, optFns ...func(*ListFleetsPaginatorOptions)) *ListFleetsPaginator { + if params == nil { + params = &ListFleetsInput{} + } + + options := ListFleetsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListFleetsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListFleetsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListFleets page. +func (p *ListFleetsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListFleetsOutput, 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 + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListFleets(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 +} + +// ListFleetsAPIClient is a client that implements the ListFleets operation. +type ListFleetsAPIClient interface { + ListFleets(context.Context, *ListFleetsInput, ...func(*Options)) (*ListFleetsOutput, error) +} + +var _ ListFleetsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListFleets(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListFleets", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_ListProjects.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_ListProjects.go new file mode 100644 index 00000000000..4f3cc52451c --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_ListProjects.go @@ -0,0 +1,264 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/codebuild/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets a list of build project names, with each build project name representing a +// single build project. +func (c *Client) ListProjects(ctx context.Context, params *ListProjectsInput, optFns ...func(*Options)) (*ListProjectsOutput, error) { + if params == nil { + params = &ListProjectsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListProjects", params, optFns, c.addOperationListProjectsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListProjectsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListProjectsInput struct { + + // During a previous call, if there are more than 100 items in the list, only the + // first 100 items are returned, along with a unique string called a nextToken. To + // get the next batch of items in the list, call this operation again, adding the + // next token to the call. To get all of the items in the list, keep calling this + // operation with each subsequent next token that is returned, until no more next + // tokens are returned. + NextToken *string + + // The criterion to be used to list build project names. Valid values include: + // + // - CREATED_TIME : List based on when each build project was created. + // + // - LAST_MODIFIED_TIME : List based on when information about each build project + // was last changed. + // + // - NAME : List based on each build project's name. + // + // Use sortOrder to specify in what order to list the build project names based on + // the preceding criteria. + SortBy types.ProjectSortByType + + // The order in which to list build projects. Valid values include: + // + // - ASCENDING : List in ascending order. + // + // - DESCENDING : List in descending order. + // + // Use sortBy to specify the criterion to be used to list build project names. + SortOrder types.SortOrderType + + noSmithyDocumentSerde +} + +type ListProjectsOutput struct { + + // If there are more than 100 items in the list, only the first 100 items are + // returned, along with a unique string called a nextToken. To get the next batch + // of items in the list, call this operation again, adding the next token to the + // call. + NextToken *string + + // The list of build project names, with each build project name representing a + // single build project. + Projects []string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListProjectsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListProjects{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListProjects{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListProjects"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListProjects(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// ListProjectsPaginatorOptions is the paginator options for ListProjects +type ListProjectsPaginatorOptions 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 +} + +// ListProjectsPaginator is a paginator for ListProjects +type ListProjectsPaginator struct { + options ListProjectsPaginatorOptions + client ListProjectsAPIClient + params *ListProjectsInput + nextToken *string + firstPage bool +} + +// NewListProjectsPaginator returns a new ListProjectsPaginator +func NewListProjectsPaginator(client ListProjectsAPIClient, params *ListProjectsInput, optFns ...func(*ListProjectsPaginatorOptions)) *ListProjectsPaginator { + if params == nil { + params = &ListProjectsInput{} + } + + options := ListProjectsPaginatorOptions{} + + for _, fn := range optFns { + fn(&options) + } + + return &ListProjectsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListProjectsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListProjects page. +func (p *ListProjectsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListProjectsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListProjects(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 +} + +// ListProjectsAPIClient is a client that implements the ListProjects operation. +type ListProjectsAPIClient interface { + ListProjects(context.Context, *ListProjectsInput, ...func(*Options)) (*ListProjectsOutput, error) +} + +var _ ListProjectsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListProjects(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListProjects", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_ListReportGroups.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_ListReportGroups.go new file mode 100644 index 00000000000..fe8db418516 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_ListReportGroups.go @@ -0,0 +1,278 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/codebuild/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets a list ARNs for the report groups in the current Amazon Web Services +// +// account. +func (c *Client) ListReportGroups(ctx context.Context, params *ListReportGroupsInput, optFns ...func(*Options)) (*ListReportGroupsOutput, error) { + if params == nil { + params = &ListReportGroupsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListReportGroups", params, optFns, c.addOperationListReportGroupsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListReportGroupsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListReportGroupsInput struct { + + // The maximum number of paginated report groups returned per response. Use + // nextToken to iterate pages in the list of returned ReportGroup objects. The + // default value is 100. + MaxResults *int32 + + // During a previous call, the maximum number of items that can be returned is + // the value specified in maxResults . If there more items in the list, then a + // unique string called a nextToken is returned. To get the next batch of items in + // the list, call this operation again, adding the next token to the call. To get + // all of the items in the list, keep calling this operation with each subsequent + // next token that is returned, until no more next tokens are returned. + NextToken *string + + // The criterion to be used to list build report groups. Valid values include: + // + // - CREATED_TIME : List based on when each report group was created. + // + // - LAST_MODIFIED_TIME : List based on when each report group was last changed. + // + // - NAME : List based on each report group's name. + SortBy types.ReportGroupSortByType + + // Used to specify the order to sort the list of returned report groups. Valid + // values are ASCENDING and DESCENDING . + SortOrder types.SortOrderType + + noSmithyDocumentSerde +} + +type ListReportGroupsOutput struct { + + // During a previous call, the maximum number of items that can be returned is + // the value specified in maxResults . If there more items in the list, then a + // unique string called a nextToken is returned. To get the next batch of items in + // the list, call this operation again, adding the next token to the call. To get + // all of the items in the list, keep calling this operation with each subsequent + // next token that is returned, until no more next tokens are returned. + NextToken *string + + // The list of ARNs for the report groups in the current Amazon Web Services + // account. + ReportGroups []string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListReportGroupsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListReportGroups{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListReportGroups{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListReportGroups"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListReportGroups(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// ListReportGroupsPaginatorOptions is the paginator options for ListReportGroups +type ListReportGroupsPaginatorOptions struct { + // The maximum number of paginated report groups returned per response. Use + // nextToken to iterate pages in the list of returned ReportGroup objects. The + // default 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 +} + +// ListReportGroupsPaginator is a paginator for ListReportGroups +type ListReportGroupsPaginator struct { + options ListReportGroupsPaginatorOptions + client ListReportGroupsAPIClient + params *ListReportGroupsInput + nextToken *string + firstPage bool +} + +// NewListReportGroupsPaginator returns a new ListReportGroupsPaginator +func NewListReportGroupsPaginator(client ListReportGroupsAPIClient, params *ListReportGroupsInput, optFns ...func(*ListReportGroupsPaginatorOptions)) *ListReportGroupsPaginator { + if params == nil { + params = &ListReportGroupsInput{} + } + + options := ListReportGroupsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListReportGroupsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListReportGroupsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListReportGroups page. +func (p *ListReportGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListReportGroupsOutput, 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 + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListReportGroups(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 +} + +// ListReportGroupsAPIClient is a client that implements the ListReportGroups +// operation. +type ListReportGroupsAPIClient interface { + ListReportGroups(context.Context, *ListReportGroupsInput, ...func(*Options)) (*ListReportGroupsOutput, error) +} + +var _ ListReportGroupsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListReportGroups(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListReportGroups", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_ListReports.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_ListReports.go new file mode 100644 index 00000000000..f2b1e48feeb --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_ListReports.go @@ -0,0 +1,276 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/codebuild/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a list of ARNs for the reports in the current Amazon Web Services +// +// account. +func (c *Client) ListReports(ctx context.Context, params *ListReportsInput, optFns ...func(*Options)) (*ListReportsOutput, error) { + if params == nil { + params = &ListReportsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListReports", params, optFns, c.addOperationListReportsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListReportsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListReportsInput struct { + + // A ReportFilter object used to filter the returned reports. + Filter *types.ReportFilter + + // The maximum number of paginated reports returned per response. Use nextToken + // to iterate pages in the list of returned Report objects. The default value is + // 100. + MaxResults *int32 + + // During a previous call, the maximum number of items that can be returned is + // the value specified in maxResults . If there more items in the list, then a + // unique string called a nextToken is returned. To get the next batch of items in + // the list, call this operation again, adding the next token to the call. To get + // all of the items in the list, keep calling this operation with each subsequent + // next token that is returned, until no more next tokens are returned. + NextToken *string + + // Specifies the sort order for the list of returned reports. Valid values are: + // + // - ASCENDING : return reports in chronological order based on their creation + // date. + // + // - DESCENDING : return reports in the reverse chronological order based on + // their creation date. + SortOrder types.SortOrderType + + noSmithyDocumentSerde +} + +type ListReportsOutput struct { + + // During a previous call, the maximum number of items that can be returned is + // the value specified in maxResults . If there more items in the list, then a + // unique string called a nextToken is returned. To get the next batch of items in + // the list, call this operation again, adding the next token to the call. To get + // all of the items in the list, keep calling this operation with each subsequent + // next token that is returned, until no more next tokens are returned. + NextToken *string + + // The list of returned ARNs for the reports in the current Amazon Web Services + // account. + Reports []string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListReportsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListReports{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListReports{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListReports"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListReports(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// ListReportsPaginatorOptions is the paginator options for ListReports +type ListReportsPaginatorOptions struct { + // The maximum number of paginated reports returned per response. Use nextToken + // to iterate pages in the list of returned Report objects. The default 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 +} + +// ListReportsPaginator is a paginator for ListReports +type ListReportsPaginator struct { + options ListReportsPaginatorOptions + client ListReportsAPIClient + params *ListReportsInput + nextToken *string + firstPage bool +} + +// NewListReportsPaginator returns a new ListReportsPaginator +func NewListReportsPaginator(client ListReportsAPIClient, params *ListReportsInput, optFns ...func(*ListReportsPaginatorOptions)) *ListReportsPaginator { + if params == nil { + params = &ListReportsInput{} + } + + options := ListReportsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListReportsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListReportsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListReports page. +func (p *ListReportsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListReportsOutput, 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 + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListReports(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 +} + +// ListReportsAPIClient is a client that implements the ListReports operation. +type ListReportsAPIClient interface { + ListReports(context.Context, *ListReportsInput, ...func(*Options)) (*ListReportsOutput, error) +} + +var _ ListReportsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListReports(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListReports", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_ListReportsForReportGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_ListReportsForReportGroup.go new file mode 100644 index 00000000000..22b4708fe42 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_ListReportsForReportGroup.go @@ -0,0 +1,279 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/codebuild/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a list of ARNs for the reports that belong to a ReportGroup . +func (c *Client) ListReportsForReportGroup(ctx context.Context, params *ListReportsForReportGroupInput, optFns ...func(*Options)) (*ListReportsForReportGroupOutput, error) { + if params == nil { + params = &ListReportsForReportGroupInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListReportsForReportGroup", params, optFns, c.addOperationListReportsForReportGroupMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListReportsForReportGroupOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListReportsForReportGroupInput struct { + + // The ARN of the report group for which you want to return report ARNs. + // + // This member is required. + ReportGroupArn *string + + // A ReportFilter object used to filter the returned reports. + Filter *types.ReportFilter + + // The maximum number of paginated reports in this report group returned per + // response. Use nextToken to iterate pages in the list of returned Report + // objects. The default value is 100. + MaxResults *int32 + + // During a previous call, the maximum number of items that can be returned is + // the value specified in maxResults . If there more items in the list, then a + // unique string called a nextToken is returned. To get the next batch of items in + // the list, call this operation again, adding the next token to the call. To get + // all of the items in the list, keep calling this operation with each subsequent + // next token that is returned, until no more next tokens are returned. + NextToken *string + + // Use to specify whether the results are returned in ascending or descending + // order. + SortOrder types.SortOrderType + + noSmithyDocumentSerde +} + +type ListReportsForReportGroupOutput struct { + + // During a previous call, the maximum number of items that can be returned is + // the value specified in maxResults . If there more items in the list, then a + // unique string called a nextToken is returned. To get the next batch of items in + // the list, call this operation again, adding the next token to the call. To get + // all of the items in the list, keep calling this operation with each subsequent + // next token that is returned, until no more next tokens are returned. + NextToken *string + + // The list of report ARNs. + Reports []string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListReportsForReportGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListReportsForReportGroup{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListReportsForReportGroup{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListReportsForReportGroup"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpListReportsForReportGroupValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListReportsForReportGroup(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// ListReportsForReportGroupPaginatorOptions is the paginator options for +// ListReportsForReportGroup +type ListReportsForReportGroupPaginatorOptions struct { + // The maximum number of paginated reports in this report group returned per + // response. Use nextToken to iterate pages in the list of returned Report + // objects. The default 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 +} + +// ListReportsForReportGroupPaginator is a paginator for ListReportsForReportGroup +type ListReportsForReportGroupPaginator struct { + options ListReportsForReportGroupPaginatorOptions + client ListReportsForReportGroupAPIClient + params *ListReportsForReportGroupInput + nextToken *string + firstPage bool +} + +// NewListReportsForReportGroupPaginator returns a new +// ListReportsForReportGroupPaginator +func NewListReportsForReportGroupPaginator(client ListReportsForReportGroupAPIClient, params *ListReportsForReportGroupInput, optFns ...func(*ListReportsForReportGroupPaginatorOptions)) *ListReportsForReportGroupPaginator { + if params == nil { + params = &ListReportsForReportGroupInput{} + } + + options := ListReportsForReportGroupPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListReportsForReportGroupPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListReportsForReportGroupPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListReportsForReportGroup page. +func (p *ListReportsForReportGroupPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListReportsForReportGroupOutput, 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 + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListReportsForReportGroup(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 +} + +// ListReportsForReportGroupAPIClient is a client that implements the +// ListReportsForReportGroup operation. +type ListReportsForReportGroupAPIClient interface { + ListReportsForReportGroup(context.Context, *ListReportsForReportGroupInput, ...func(*Options)) (*ListReportsForReportGroupOutput, error) +} + +var _ ListReportsForReportGroupAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListReportsForReportGroup(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListReportsForReportGroup", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_ListSandboxes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_ListSandboxes.go new file mode 100644 index 00000000000..2760647f2d9 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_ListSandboxes.go @@ -0,0 +1,251 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/codebuild/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets a list of sandboxes. +func (c *Client) ListSandboxes(ctx context.Context, params *ListSandboxesInput, optFns ...func(*Options)) (*ListSandboxesOutput, error) { + if params == nil { + params = &ListSandboxesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListSandboxes", params, optFns, c.addOperationListSandboxesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListSandboxesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListSandboxesInput struct { + + // The maximum number of sandbox records to be retrieved. + MaxResults *int32 + + // The next token, if any, to get paginated results. You will get this value from + // previous execution of list sandboxes. + NextToken *string + + // The order in which sandbox records should be retrieved. + SortOrder types.SortOrderType + + noSmithyDocumentSerde +} + +type ListSandboxesOutput struct { + + // Information about the requested sandbox IDs. + Ids []string + + // Information about the next token to get paginated results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListSandboxesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListSandboxes{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListSandboxes{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListSandboxes"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSandboxes(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// ListSandboxesPaginatorOptions is the paginator options for ListSandboxes +type ListSandboxesPaginatorOptions struct { + // The maximum number of sandbox records to be retrieved. + 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 +} + +// ListSandboxesPaginator is a paginator for ListSandboxes +type ListSandboxesPaginator struct { + options ListSandboxesPaginatorOptions + client ListSandboxesAPIClient + params *ListSandboxesInput + nextToken *string + firstPage bool +} + +// NewListSandboxesPaginator returns a new ListSandboxesPaginator +func NewListSandboxesPaginator(client ListSandboxesAPIClient, params *ListSandboxesInput, optFns ...func(*ListSandboxesPaginatorOptions)) *ListSandboxesPaginator { + if params == nil { + params = &ListSandboxesInput{} + } + + options := ListSandboxesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListSandboxesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListSandboxesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListSandboxes page. +func (p *ListSandboxesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListSandboxesOutput, 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 + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListSandboxes(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 +} + +// ListSandboxesAPIClient is a client that implements the ListSandboxes operation. +type ListSandboxesAPIClient interface { + ListSandboxes(context.Context, *ListSandboxesInput, ...func(*Options)) (*ListSandboxesOutput, error) +} + +var _ ListSandboxesAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListSandboxes(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListSandboxes", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_ListSandboxesForProject.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_ListSandboxesForProject.go new file mode 100644 index 00000000000..3e7a2fcf46b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_ListSandboxesForProject.go @@ -0,0 +1,262 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/codebuild/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets a list of sandboxes for a given project. +func (c *Client) ListSandboxesForProject(ctx context.Context, params *ListSandboxesForProjectInput, optFns ...func(*Options)) (*ListSandboxesForProjectOutput, error) { + if params == nil { + params = &ListSandboxesForProjectInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListSandboxesForProject", params, optFns, c.addOperationListSandboxesForProjectMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListSandboxesForProjectOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListSandboxesForProjectInput struct { + + // The CodeBuild project name. + // + // This member is required. + ProjectName *string + + // The maximum number of sandbox records to be retrieved. + MaxResults *int32 + + // The next token, if any, to get paginated results. You will get this value from + // previous execution of list sandboxes. + NextToken *string + + // The order in which sandbox records should be retrieved. + SortOrder types.SortOrderType + + noSmithyDocumentSerde +} + +type ListSandboxesForProjectOutput struct { + + // Information about the requested sandbox IDs. + Ids []string + + // Information about the next token to get paginated results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListSandboxesForProjectMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListSandboxesForProject{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListSandboxesForProject{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListSandboxesForProject"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpListSandboxesForProjectValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSandboxesForProject(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// ListSandboxesForProjectPaginatorOptions is the paginator options for +// ListSandboxesForProject +type ListSandboxesForProjectPaginatorOptions struct { + // The maximum number of sandbox records to be retrieved. + 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 +} + +// ListSandboxesForProjectPaginator is a paginator for ListSandboxesForProject +type ListSandboxesForProjectPaginator struct { + options ListSandboxesForProjectPaginatorOptions + client ListSandboxesForProjectAPIClient + params *ListSandboxesForProjectInput + nextToken *string + firstPage bool +} + +// NewListSandboxesForProjectPaginator returns a new +// ListSandboxesForProjectPaginator +func NewListSandboxesForProjectPaginator(client ListSandboxesForProjectAPIClient, params *ListSandboxesForProjectInput, optFns ...func(*ListSandboxesForProjectPaginatorOptions)) *ListSandboxesForProjectPaginator { + if params == nil { + params = &ListSandboxesForProjectInput{} + } + + options := ListSandboxesForProjectPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListSandboxesForProjectPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListSandboxesForProjectPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListSandboxesForProject page. +func (p *ListSandboxesForProjectPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListSandboxesForProjectOutput, 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 + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListSandboxesForProject(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 +} + +// ListSandboxesForProjectAPIClient is a client that implements the +// ListSandboxesForProject operation. +type ListSandboxesForProjectAPIClient interface { + ListSandboxesForProject(context.Context, *ListSandboxesForProjectInput, ...func(*Options)) (*ListSandboxesForProjectOutput, error) +} + +var _ ListSandboxesForProjectAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListSandboxesForProject(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListSandboxesForProject", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_ListSharedProjects.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_ListSharedProjects.go new file mode 100644 index 00000000000..62d23508fb5 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_ListSharedProjects.go @@ -0,0 +1,282 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/codebuild/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets a list of projects that are shared with other Amazon Web Services +// +// accounts or users. +func (c *Client) ListSharedProjects(ctx context.Context, params *ListSharedProjectsInput, optFns ...func(*Options)) (*ListSharedProjectsOutput, error) { + if params == nil { + params = &ListSharedProjectsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListSharedProjects", params, optFns, c.addOperationListSharedProjectsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListSharedProjectsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListSharedProjectsInput struct { + + // The maximum number of paginated shared build projects returned per response. + // Use nextToken to iterate pages in the list of returned Project objects. The + // default value is 100. + MaxResults *int32 + + // During a previous call, the maximum number of items that can be returned is + // the value specified in maxResults . If there more items in the list, then a + // unique string called a nextToken is returned. To get the next batch of items in + // the list, call this operation again, adding the next token to the call. To get + // all of the items in the list, keep calling this operation with each subsequent + // next token that is returned, until no more next tokens are returned. + NextToken *string + + // The criterion to be used to list build projects shared with the current Amazon + // Web Services account or user. Valid values include: + // + // - ARN : List based on the ARN. + // + // - MODIFIED_TIME : List based on when information about the shared project was + // last changed. + SortBy types.SharedResourceSortByType + + // The order in which to list shared build projects. Valid values include: + // + // - ASCENDING : List in ascending order. + // + // - DESCENDING : List in descending order. + SortOrder types.SortOrderType + + noSmithyDocumentSerde +} + +type ListSharedProjectsOutput struct { + + // During a previous call, the maximum number of items that can be returned is + // the value specified in maxResults . If there more items in the list, then a + // unique string called a nextToken is returned. To get the next batch of items in + // the list, call this operation again, adding the next token to the call. To get + // all of the items in the list, keep calling this operation with each subsequent + // next token that is returned, until no more next tokens are returned. + NextToken *string + + // The list of ARNs for the build projects shared with the current Amazon Web + // Services account or user. + Projects []string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListSharedProjectsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListSharedProjects{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListSharedProjects{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListSharedProjects"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSharedProjects(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// ListSharedProjectsPaginatorOptions is the paginator options for +// ListSharedProjects +type ListSharedProjectsPaginatorOptions struct { + // The maximum number of paginated shared build projects returned per response. + // Use nextToken to iterate pages in the list of returned Project objects. The + // default 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 +} + +// ListSharedProjectsPaginator is a paginator for ListSharedProjects +type ListSharedProjectsPaginator struct { + options ListSharedProjectsPaginatorOptions + client ListSharedProjectsAPIClient + params *ListSharedProjectsInput + nextToken *string + firstPage bool +} + +// NewListSharedProjectsPaginator returns a new ListSharedProjectsPaginator +func NewListSharedProjectsPaginator(client ListSharedProjectsAPIClient, params *ListSharedProjectsInput, optFns ...func(*ListSharedProjectsPaginatorOptions)) *ListSharedProjectsPaginator { + if params == nil { + params = &ListSharedProjectsInput{} + } + + options := ListSharedProjectsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListSharedProjectsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListSharedProjectsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListSharedProjects page. +func (p *ListSharedProjectsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListSharedProjectsOutput, 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 + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListSharedProjects(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 +} + +// ListSharedProjectsAPIClient is a client that implements the ListSharedProjects +// operation. +type ListSharedProjectsAPIClient interface { + ListSharedProjects(context.Context, *ListSharedProjectsInput, ...func(*Options)) (*ListSharedProjectsOutput, error) +} + +var _ ListSharedProjectsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListSharedProjects(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListSharedProjects", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_ListSharedReportGroups.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_ListSharedReportGroups.go new file mode 100644 index 00000000000..f8d3eb160ca --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_ListSharedReportGroups.go @@ -0,0 +1,282 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/codebuild/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets a list of report groups that are shared with other Amazon Web Services +// +// accounts or users. +func (c *Client) ListSharedReportGroups(ctx context.Context, params *ListSharedReportGroupsInput, optFns ...func(*Options)) (*ListSharedReportGroupsOutput, error) { + if params == nil { + params = &ListSharedReportGroupsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListSharedReportGroups", params, optFns, c.addOperationListSharedReportGroupsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListSharedReportGroupsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListSharedReportGroupsInput struct { + + // The maximum number of paginated shared report groups per response. Use + // nextToken to iterate pages in the list of returned ReportGroup objects. The + // default value is 100. + MaxResults *int32 + + // During a previous call, the maximum number of items that can be returned is + // the value specified in maxResults . If there more items in the list, then a + // unique string called a nextToken is returned. To get the next batch of items in + // the list, call this operation again, adding the next token to the call. To get + // all of the items in the list, keep calling this operation with each subsequent + // next token that is returned, until no more next tokens are returned. + NextToken *string + + // The criterion to be used to list report groups shared with the current Amazon + // Web Services account or user. Valid values include: + // + // - ARN : List based on the ARN. + // + // - MODIFIED_TIME : List based on when information about the shared report group + // was last changed. + SortBy types.SharedResourceSortByType + + // The order in which to list shared report groups. Valid values include: + // + // - ASCENDING : List in ascending order. + // + // - DESCENDING : List in descending order. + SortOrder types.SortOrderType + + noSmithyDocumentSerde +} + +type ListSharedReportGroupsOutput struct { + + // During a previous call, the maximum number of items that can be returned is + // the value specified in maxResults . If there more items in the list, then a + // unique string called a nextToken is returned. To get the next batch of items in + // the list, call this operation again, adding the next token to the call. To get + // all of the items in the list, keep calling this operation with each subsequent + // next token that is returned, until no more next tokens are returned. + NextToken *string + + // The list of ARNs for the report groups shared with the current Amazon Web + // Services account or user. + ReportGroups []string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListSharedReportGroupsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListSharedReportGroups{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListSharedReportGroups{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListSharedReportGroups"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSharedReportGroups(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// ListSharedReportGroupsPaginatorOptions is the paginator options for +// ListSharedReportGroups +type ListSharedReportGroupsPaginatorOptions struct { + // The maximum number of paginated shared report groups per response. Use + // nextToken to iterate pages in the list of returned ReportGroup objects. The + // default 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 +} + +// ListSharedReportGroupsPaginator is a paginator for ListSharedReportGroups +type ListSharedReportGroupsPaginator struct { + options ListSharedReportGroupsPaginatorOptions + client ListSharedReportGroupsAPIClient + params *ListSharedReportGroupsInput + nextToken *string + firstPage bool +} + +// NewListSharedReportGroupsPaginator returns a new ListSharedReportGroupsPaginator +func NewListSharedReportGroupsPaginator(client ListSharedReportGroupsAPIClient, params *ListSharedReportGroupsInput, optFns ...func(*ListSharedReportGroupsPaginatorOptions)) *ListSharedReportGroupsPaginator { + if params == nil { + params = &ListSharedReportGroupsInput{} + } + + options := ListSharedReportGroupsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListSharedReportGroupsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListSharedReportGroupsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListSharedReportGroups page. +func (p *ListSharedReportGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListSharedReportGroupsOutput, 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 + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListSharedReportGroups(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 +} + +// ListSharedReportGroupsAPIClient is a client that implements the +// ListSharedReportGroups operation. +type ListSharedReportGroupsAPIClient interface { + ListSharedReportGroups(context.Context, *ListSharedReportGroupsInput, ...func(*Options)) (*ListSharedReportGroupsOutput, error) +} + +var _ ListSharedReportGroupsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListSharedReportGroups(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListSharedReportGroups", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_ListSourceCredentials.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_ListSourceCredentials.go new file mode 100644 index 00000000000..810e29dadb5 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_ListSourceCredentials.go @@ -0,0 +1,147 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/codebuild/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a list of SourceCredentialsInfo objects. +func (c *Client) ListSourceCredentials(ctx context.Context, params *ListSourceCredentialsInput, optFns ...func(*Options)) (*ListSourceCredentialsOutput, error) { + if params == nil { + params = &ListSourceCredentialsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListSourceCredentials", params, optFns, c.addOperationListSourceCredentialsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListSourceCredentialsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListSourceCredentialsInput struct { + noSmithyDocumentSerde +} + +type ListSourceCredentialsOutput struct { + + // A list of SourceCredentialsInfo objects. Each SourceCredentialsInfo object + // includes the authentication type, token ARN, and type of source provider for one + // set of credentials. + SourceCredentialsInfos []types.SourceCredentialsInfo + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListSourceCredentialsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListSourceCredentials{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListSourceCredentials{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListSourceCredentials"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSourceCredentials(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListSourceCredentials(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListSourceCredentials", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_PutResourcePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_PutResourcePolicy.go new file mode 100644 index 00000000000..eea98a06e23 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_PutResourcePolicy.go @@ -0,0 +1,164 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Stores a resource policy for the ARN of a Project or ReportGroup object. +func (c *Client) PutResourcePolicy(ctx context.Context, params *PutResourcePolicyInput, optFns ...func(*Options)) (*PutResourcePolicyOutput, error) { + if params == nil { + params = &PutResourcePolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutResourcePolicy", params, optFns, c.addOperationPutResourcePolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutResourcePolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutResourcePolicyInput struct { + + // A JSON-formatted resource policy. For more information, see [Sharing a Project] and [Sharing a Report Group] in the + // CodeBuild User Guide. + // + // [Sharing a Report Group]: https://docs.aws.amazon.com/codebuild/latest/userguide/report-groups-sharing.html#report-groups-sharing-share + // [Sharing a Project]: https://docs.aws.amazon.com/codebuild/latest/userguide/project-sharing.html#project-sharing-share + // + // This member is required. + Policy *string + + // The ARN of the Project or ReportGroup resource you want to associate with a + // resource policy. + // + // This member is required. + ResourceArn *string + + noSmithyDocumentSerde +} + +type PutResourcePolicyOutput struct { + + // The ARN of the Project or ReportGroup resource that is associated with a + // resource policy. + ResourceArn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutResourcePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpPutResourcePolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpPutResourcePolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "PutResourcePolicy"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpPutResourcePolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutResourcePolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opPutResourcePolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "PutResourcePolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_RetryBuild.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_RetryBuild.go new file mode 100644 index 00000000000..0ba3de82c6a --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_RetryBuild.go @@ -0,0 +1,155 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/codebuild/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Restarts a build. +func (c *Client) RetryBuild(ctx context.Context, params *RetryBuildInput, optFns ...func(*Options)) (*RetryBuildOutput, error) { + if params == nil { + params = &RetryBuildInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "RetryBuild", params, optFns, c.addOperationRetryBuildMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*RetryBuildOutput) + out.ResultMetadata = metadata + return out, nil +} + +type RetryBuildInput struct { + + // Specifies the identifier of the build to restart. + Id *string + + // A unique, case sensitive identifier you provide to ensure the idempotency of + // the RetryBuild request. The token is included in the RetryBuild request and is + // valid for five minutes. If you repeat the RetryBuild request with the same + // token, but change a parameter, CodeBuild returns a parameter mismatch error. + IdempotencyToken *string + + noSmithyDocumentSerde +} + +type RetryBuildOutput struct { + + // Information about a build. + Build *types.Build + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationRetryBuildMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpRetryBuild{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpRetryBuild{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "RetryBuild"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRetryBuild(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opRetryBuild(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "RetryBuild", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_RetryBuildBatch.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_RetryBuildBatch.go new file mode 100644 index 00000000000..fc807c8f871 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_RetryBuildBatch.go @@ -0,0 +1,160 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/codebuild/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Restarts a failed batch build. Only batch builds that have failed can be +// retried. +func (c *Client) RetryBuildBatch(ctx context.Context, params *RetryBuildBatchInput, optFns ...func(*Options)) (*RetryBuildBatchOutput, error) { + if params == nil { + params = &RetryBuildBatchInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "RetryBuildBatch", params, optFns, c.addOperationRetryBuildBatchMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*RetryBuildBatchOutput) + out.ResultMetadata = metadata + return out, nil +} + +type RetryBuildBatchInput struct { + + // Specifies the identifier of the batch build to restart. + Id *string + + // A unique, case sensitive identifier you provide to ensure the idempotency of + // the RetryBuildBatch request. The token is included in the RetryBuildBatch + // request and is valid for five minutes. If you repeat the RetryBuildBatch + // request with the same token, but change a parameter, CodeBuild returns a + // parameter mismatch error. + IdempotencyToken *string + + // Specifies the type of retry to perform. + RetryType types.RetryBuildBatchType + + noSmithyDocumentSerde +} + +type RetryBuildBatchOutput struct { + + // Contains information about a batch build. + BuildBatch *types.BuildBatch + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationRetryBuildBatchMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpRetryBuildBatch{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpRetryBuildBatch{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "RetryBuildBatch"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRetryBuildBatch(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opRetryBuildBatch(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "RetryBuildBatch", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_StartBuild.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_StartBuild.go new file mode 100644 index 00000000000..638286f5910 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_StartBuild.go @@ -0,0 +1,366 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/codebuild/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Starts running a build with the settings defined in the project. These setting +// include: how to run a build, where to get the source code, which build +// environment to use, which build commands to run, and where to store the build +// output. +// +// You can also start a build run by overriding some of the build settings in the +// project. The overrides only apply for that specific start build request. The +// settings in the project are unaltered. +func (c *Client) StartBuild(ctx context.Context, params *StartBuildInput, optFns ...func(*Options)) (*StartBuildOutput, error) { + if params == nil { + params = &StartBuildInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StartBuild", params, optFns, c.addOperationStartBuildMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StartBuildOutput) + out.ResultMetadata = metadata + return out, nil +} + +type StartBuildInput struct { + + // The name of the CodeBuild build project to start running a build. + // + // This member is required. + ProjectName *string + + // Build output artifact settings that override, for this build only, the latest + // ones already defined in the build project. + ArtifactsOverride *types.ProjectArtifacts + + // The maximum number of additional automatic retries after a failed build. For + // example, if the auto-retry limit is set to 2, CodeBuild will call the RetryBuild + // API to automatically retry your build for up to 2 additional times. + AutoRetryLimitOverride *int32 + + // Contains information that defines how the build project reports the build + // status to the source provider. This option is only used when the source provider + // is GITHUB , GITHUB_ENTERPRISE , or BITBUCKET . + BuildStatusConfigOverride *types.BuildStatusConfig + + // A buildspec file declaration that overrides the latest one defined in the build + // project, for this build only. The buildspec defined on the project is not + // changed. + // + // If this value is set, it can be either an inline buildspec definition, the path + // to an alternate buildspec file relative to the value of the built-in + // CODEBUILD_SRC_DIR environment variable, or the path to an S3 bucket. The bucket + // must be in the same Amazon Web Services Region as the build project. Specify the + // buildspec file using its ARN (for example, + // arn:aws:s3:::my-codebuild-sample2/buildspec.yml ). If this value is not provided + // or is set to an empty string, the source code must contain a buildspec file in + // its root directory. For more information, see [Buildspec File Name and Storage Location]. + // + // Since this property allows you to change the build commands that will run in + // the container, you should note that an IAM principal with the ability to call + // this API and set this parameter can override the default settings. Moreover, we + // encourage that you use a trustworthy buildspec location like a file in your + // source repository or a Amazon S3 bucket. Alternatively, you can restrict + // overrides to the buildspec by using a condition key: [Prevent unauthorized modifications to project buildspec]. + // + // [Buildspec File Name and Storage Location]: https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#build-spec-ref-name-storage + // [Prevent unauthorized modifications to project buildspec]: https://docs.aws.amazon.com/codebuild/latest/userguide/action-context-keys.html#action-context-keys-example-overridebuildspec.html + BuildspecOverride *string + + // A ProjectCache object specified for this build that overrides the one defined + // in the build project. + CacheOverride *types.ProjectCache + + // The name of a certificate for this build that overrides the one specified in + // the build project. + CertificateOverride *string + + // The name of a compute type for this build that overrides the one specified in + // the build project. + ComputeTypeOverride types.ComputeType + + // Specifies if session debugging is enabled for this build. For more information, + // see [Viewing a running build in Session Manager]. + // + // [Viewing a running build in Session Manager]: https://docs.aws.amazon.com/codebuild/latest/userguide/session-manager.html + DebugSessionEnabled *bool + + // The Key Management Service customer master key (CMK) that overrides the one + // specified in the build project. The CMK key encrypts the build output artifacts. + // + // You can use a cross-account KMS key to encrypt the build output artifacts if + // your service role has permission to that key. + // + // You can specify either the Amazon Resource Name (ARN) of the CMK or, if + // available, the CMK's alias (using the format alias/ ). + EncryptionKeyOverride *string + + // A container type for this build that overrides the one specified in the build + // project. + EnvironmentTypeOverride types.EnvironmentType + + // A set of environment variables that overrides, for this build only, the latest + // ones already defined in the build project. + EnvironmentVariablesOverride []types.EnvironmentVariable + + // A ProjectFleet object specified for this build that overrides the one defined + // in the build project. + FleetOverride *types.ProjectFleet + + // The user-defined depth of history, with a minimum value of 0, that overrides, + // for this build only, any previous depth of history defined in the build project. + GitCloneDepthOverride *int32 + + // Information about the Git submodules configuration for this build of an + // CodeBuild build project. + GitSubmodulesConfigOverride *types.GitSubmodulesConfig + + // A unique, case sensitive identifier you provide to ensure the idempotency of + // the StartBuild request. The token is included in the StartBuild request and is + // valid for 5 minutes. If you repeat the StartBuild request with the same token, + // but change a parameter, CodeBuild returns a parameter mismatch error. + IdempotencyToken *string + + // The name of an image for this build that overrides the one specified in the + // build project. + ImageOverride *string + + // The type of credentials CodeBuild uses to pull images in your build. There are + // two valid values: + // + // CODEBUILD Specifies that CodeBuild uses its own credentials. This requires that + // you modify your ECR repository policy to trust CodeBuild's service principal. + // + // SERVICE_ROLE Specifies that CodeBuild uses your build project's service role. + // + // When using a cross-account or private registry image, you must use SERVICE_ROLE + // credentials. When using an CodeBuild curated image, you must use CODEBUILD + // credentials. + ImagePullCredentialsTypeOverride types.ImagePullCredentialsType + + // Enable this flag to override the insecure SSL setting that is specified in the + // build project. The insecure SSL setting determines whether to ignore SSL + // warnings while connecting to the project source code. This override applies only + // if the build's source is GitHub Enterprise. + InsecureSslOverride *bool + + // Log settings for this build that override the log settings defined in the + // build project. + LogsConfigOverride *types.LogsConfig + + // Enable this flag to override privileged mode in the build project. + PrivilegedModeOverride *bool + + // The number of minutes a build is allowed to be queued before it times out. + QueuedTimeoutInMinutesOverride *int32 + + // The credentials for access to a private registry. + RegistryCredentialOverride *types.RegistryCredential + + // Set to true to report to your source provider the status of a build's start + // and completion. If you use this option with a source provider other than GitHub, + // GitHub Enterprise, GitLab, GitLab Self Managed, or Bitbucket, an + // invalidInputException is thrown. + // + // To be able to report the build status to the source provider, the user + // associated with the source provider must have write access to the repo. If the + // user does not have write access, the build status cannot be updated. For more + // information, see [Source provider access]in the CodeBuild User Guide. + // + // The status of a build triggered by a webhook is always reported to your source + // provider. + // + // [Source provider access]: https://docs.aws.amazon.com/codebuild/latest/userguide/access-tokens.html + ReportBuildStatusOverride *bool + + // An array of ProjectArtifacts objects. + SecondaryArtifactsOverride []types.ProjectArtifacts + + // An array of ProjectSource objects. + SecondarySourcesOverride []types.ProjectSource + + // An array of ProjectSourceVersion objects that specify one or more versions of + // the project's secondary sources to be used for this build only. + SecondarySourcesVersionOverride []types.ProjectSourceVersion + + // The name of a service role for this build that overrides the one specified in + // the build project. + ServiceRoleOverride *string + + // An authorization type for this build that overrides the one defined in the + // build project. This override applies only if the build project's source is + // BitBucket, GitHub, GitLab, or GitLab Self Managed. + SourceAuthOverride *types.SourceAuth + + // A location that overrides, for this build, the source location for the one + // defined in the build project. + SourceLocationOverride *string + + // A source input type, for this build, that overrides the source input defined in + // the build project. + SourceTypeOverride types.SourceType + + // The version of the build input to be built, for this build only. If not + // specified, the latest version is used. If specified, the contents depends on the + // source provider: + // + // CodeCommit The commit ID, branch, or Git tag to use. + // + // GitHub The commit ID, pull request ID, branch name, or tag name that + // corresponds to the version of the source code you want to build. If a pull + // request ID is specified, it must use the format pr/pull-request-ID (for example + // pr/25 ). If a branch name is specified, the branch's HEAD commit ID is used. If + // not specified, the default branch's HEAD commit ID is used. + // + // GitLab The commit ID, branch, or Git tag to use. + // + // Bitbucket The commit ID, branch name, or tag name that corresponds to the + // version of the source code you want to build. If a branch name is specified, the + // branch's HEAD commit ID is used. If not specified, the default branch's HEAD + // commit ID is used. + // + // Amazon S3 The version ID of the object that represents the build input ZIP file + // to use. + // + // If sourceVersion is specified at the project level, then this sourceVersion (at + // the build level) takes precedence. + // + // For more information, see [Source Version Sample with CodeBuild] in the CodeBuild User Guide. + // + // [Source Version Sample with CodeBuild]: https://docs.aws.amazon.com/codebuild/latest/userguide/sample-source-version.html + SourceVersion *string + + // The number of build timeout minutes, from 5 to 2160 (36 hours), that overrides, + // for this build only, the latest setting already defined in the build project. + TimeoutInMinutesOverride *int32 + + noSmithyDocumentSerde +} + +type StartBuildOutput struct { + + // Information about the build to be run. + Build *types.Build + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationStartBuildMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpStartBuild{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpStartBuild{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "StartBuild"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpStartBuildValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartBuild(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opStartBuild(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "StartBuild", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_StartBuildBatch.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_StartBuildBatch.go new file mode 100644 index 00000000000..a21c2a161b5 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_StartBuildBatch.go @@ -0,0 +1,334 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/codebuild/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Starts a batch build for a project. +func (c *Client) StartBuildBatch(ctx context.Context, params *StartBuildBatchInput, optFns ...func(*Options)) (*StartBuildBatchOutput, error) { + if params == nil { + params = &StartBuildBatchInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StartBuildBatch", params, optFns, c.addOperationStartBuildBatchMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StartBuildBatchOutput) + out.ResultMetadata = metadata + return out, nil +} + +type StartBuildBatchInput struct { + + // The name of the project. + // + // This member is required. + ProjectName *string + + // An array of ProjectArtifacts objects that contains information about the build + // output artifact overrides for the build project. + ArtifactsOverride *types.ProjectArtifacts + + // A BuildBatchConfigOverride object that contains batch build configuration + // overrides. + BuildBatchConfigOverride *types.ProjectBuildBatchConfig + + // Overrides the build timeout specified in the batch build project. + BuildTimeoutInMinutesOverride *int32 + + // A buildspec file declaration that overrides, for this build only, the latest + // one already defined in the build project. + // + // If this value is set, it can be either an inline buildspec definition, the path + // to an alternate buildspec file relative to the value of the built-in + // CODEBUILD_SRC_DIR environment variable, or the path to an S3 bucket. The bucket + // must be in the same Amazon Web Services Region as the build project. Specify the + // buildspec file using its ARN (for example, + // arn:aws:s3:::my-codebuild-sample2/buildspec.yml ). If this value is not provided + // or is set to an empty string, the source code must contain a buildspec file in + // its root directory. For more information, see [Buildspec File Name and Storage Location]. + // + // [Buildspec File Name and Storage Location]: https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#build-spec-ref-name-storage + BuildspecOverride *string + + // A ProjectCache object that specifies cache overrides. + CacheOverride *types.ProjectCache + + // The name of a certificate for this batch build that overrides the one specified + // in the batch build project. + CertificateOverride *string + + // The name of a compute type for this batch build that overrides the one + // specified in the batch build project. + ComputeTypeOverride types.ComputeType + + // Specifies if session debugging is enabled for this batch build. For more + // information, see [Viewing a running build in Session Manager]. Batch session debugging is not supported for matrix batch + // builds. + // + // [Viewing a running build in Session Manager]: https://docs.aws.amazon.com/codebuild/latest/userguide/session-manager.html + DebugSessionEnabled *bool + + // The Key Management Service customer master key (CMK) that overrides the one + // specified in the batch build project. The CMK key encrypts the build output + // artifacts. + // + // You can use a cross-account KMS key to encrypt the build output artifacts if + // your service role has permission to that key. + // + // You can specify either the Amazon Resource Name (ARN) of the CMK or, if + // available, the CMK's alias (using the format alias/ ). + EncryptionKeyOverride *string + + // A container type for this batch build that overrides the one specified in the + // batch build project. + EnvironmentTypeOverride types.EnvironmentType + + // An array of EnvironmentVariable objects that override, or add to, the + // environment variables defined in the batch build project. + EnvironmentVariablesOverride []types.EnvironmentVariable + + // The user-defined depth of history, with a minimum value of 0, that overrides, + // for this batch build only, any previous depth of history defined in the batch + // build project. + GitCloneDepthOverride *int32 + + // A GitSubmodulesConfig object that overrides the Git submodules configuration + // for this batch build. + GitSubmodulesConfigOverride *types.GitSubmodulesConfig + + // A unique, case sensitive identifier you provide to ensure the idempotency of + // the StartBuildBatch request. The token is included in the StartBuildBatch + // request and is valid for five minutes. If you repeat the StartBuildBatch + // request with the same token, but change a parameter, CodeBuild returns a + // parameter mismatch error. + IdempotencyToken *string + + // The name of an image for this batch build that overrides the one specified in + // the batch build project. + ImageOverride *string + + // The type of credentials CodeBuild uses to pull images in your batch build. + // There are two valid values: + // + // CODEBUILD Specifies that CodeBuild uses its own credentials. This requires that + // you modify your ECR repository policy to trust CodeBuild's service principal. + // + // SERVICE_ROLE Specifies that CodeBuild uses your build project's service role. + // + // When using a cross-account or private registry image, you must use SERVICE_ROLE + // credentials. When using an CodeBuild curated image, you must use CODEBUILD + // credentials. + ImagePullCredentialsTypeOverride types.ImagePullCredentialsType + + // Enable this flag to override the insecure SSL setting that is specified in the + // batch build project. The insecure SSL setting determines whether to ignore SSL + // warnings while connecting to the project source code. This override applies only + // if the build's source is GitHub Enterprise. + InsecureSslOverride *bool + + // A LogsConfig object that override the log settings defined in the batch build + // project. + LogsConfigOverride *types.LogsConfig + + // Enable this flag to override privileged mode in the batch build project. + PrivilegedModeOverride *bool + + // The number of minutes a batch build is allowed to be queued before it times out. + QueuedTimeoutInMinutesOverride *int32 + + // A RegistryCredential object that overrides credentials for access to a private + // registry. + RegistryCredentialOverride *types.RegistryCredential + + // Set to true to report to your source provider the status of a batch build's + // start and completion. If you use this option with a source provider other than + // GitHub, GitHub Enterprise, or Bitbucket, an invalidInputException is thrown. + // + // The status of a build triggered by a webhook is always reported to your source + // provider. + ReportBuildBatchStatusOverride *bool + + // An array of ProjectArtifacts objects that override the secondary artifacts + // defined in the batch build project. + SecondaryArtifactsOverride []types.ProjectArtifacts + + // An array of ProjectSource objects that override the secondary sources defined + // in the batch build project. + SecondarySourcesOverride []types.ProjectSource + + // An array of ProjectSourceVersion objects that override the secondary source + // versions in the batch build project. + SecondarySourcesVersionOverride []types.ProjectSourceVersion + + // The name of a service role for this batch build that overrides the one + // specified in the batch build project. + ServiceRoleOverride *string + + // A SourceAuth object that overrides the one defined in the batch build project. + // This override applies only if the build project's source is BitBucket or GitHub. + SourceAuthOverride *types.SourceAuth + + // A location that overrides, for this batch build, the source location defined in + // the batch build project. + SourceLocationOverride *string + + // The source input type that overrides the source input defined in the batch + // build project. + SourceTypeOverride types.SourceType + + // The version of the batch build input to be built, for this build only. If not + // specified, the latest version is used. If specified, the contents depends on the + // source provider: + // + // CodeCommit The commit ID, branch, or Git tag to use. + // + // GitHub The commit ID, pull request ID, branch name, or tag name that + // corresponds to the version of the source code you want to build. If a pull + // request ID is specified, it must use the format pr/pull-request-ID (for example + // pr/25 ). If a branch name is specified, the branch's HEAD commit ID is used. If + // not specified, the default branch's HEAD commit ID is used. + // + // Bitbucket The commit ID, branch name, or tag name that corresponds to the + // version of the source code you want to build. If a branch name is specified, the + // branch's HEAD commit ID is used. If not specified, the default branch's HEAD + // commit ID is used. + // + // Amazon S3 The version ID of the object that represents the build input ZIP file + // to use. + // + // If sourceVersion is specified at the project level, then this sourceVersion (at + // the build level) takes precedence. + // + // For more information, see [Source Version Sample with CodeBuild] in the CodeBuild User Guide. + // + // [Source Version Sample with CodeBuild]: https://docs.aws.amazon.com/codebuild/latest/userguide/sample-source-version.html + SourceVersion *string + + noSmithyDocumentSerde +} + +type StartBuildBatchOutput struct { + + // A BuildBatch object that contains information about the batch build. + BuildBatch *types.BuildBatch + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationStartBuildBatchMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpStartBuildBatch{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpStartBuildBatch{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "StartBuildBatch"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpStartBuildBatchValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartBuildBatch(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opStartBuildBatch(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "StartBuildBatch", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_StartCommandExecution.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_StartCommandExecution.go new file mode 100644 index 00000000000..abaf059b77b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_StartCommandExecution.go @@ -0,0 +1,162 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/codebuild/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Starts a command execution. +func (c *Client) StartCommandExecution(ctx context.Context, params *StartCommandExecutionInput, optFns ...func(*Options)) (*StartCommandExecutionOutput, error) { + if params == nil { + params = &StartCommandExecutionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StartCommandExecution", params, optFns, c.addOperationStartCommandExecutionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StartCommandExecutionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type StartCommandExecutionInput struct { + + // The command that needs to be executed. + // + // This member is required. + Command *string + + // A sandboxId or sandboxArn . + // + // This member is required. + SandboxId *string + + // The command type. + Type types.CommandType + + noSmithyDocumentSerde +} + +type StartCommandExecutionOutput struct { + + // Information about the requested command executions. + CommandExecution *types.CommandExecution + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationStartCommandExecutionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpStartCommandExecution{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpStartCommandExecution{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "StartCommandExecution"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpStartCommandExecutionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartCommandExecution(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opStartCommandExecution(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "StartCommandExecution", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_StartSandbox.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_StartSandbox.go new file mode 100644 index 00000000000..0bb3010c671 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_StartSandbox.go @@ -0,0 +1,152 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/codebuild/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Starts a sandbox. +func (c *Client) StartSandbox(ctx context.Context, params *StartSandboxInput, optFns ...func(*Options)) (*StartSandboxOutput, error) { + if params == nil { + params = &StartSandboxInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StartSandbox", params, optFns, c.addOperationStartSandboxMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StartSandboxOutput) + out.ResultMetadata = metadata + return out, nil +} + +type StartSandboxInput struct { + + // A unique client token. + IdempotencyToken *string + + // The CodeBuild project name. + ProjectName *string + + noSmithyDocumentSerde +} + +type StartSandboxOutput struct { + + // Information about the requested sandbox. + Sandbox *types.Sandbox + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationStartSandboxMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpStartSandbox{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpStartSandbox{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "StartSandbox"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartSandbox(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opStartSandbox(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "StartSandbox", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_StartSandboxConnection.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_StartSandboxConnection.go new file mode 100644 index 00000000000..b417810c2e5 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_StartSandboxConnection.go @@ -0,0 +1,154 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/codebuild/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Starts a sandbox connection. +func (c *Client) StartSandboxConnection(ctx context.Context, params *StartSandboxConnectionInput, optFns ...func(*Options)) (*StartSandboxConnectionOutput, error) { + if params == nil { + params = &StartSandboxConnectionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StartSandboxConnection", params, optFns, c.addOperationStartSandboxConnectionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StartSandboxConnectionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type StartSandboxConnectionInput struct { + + // A sandboxId or sandboxArn . + // + // This member is required. + SandboxId *string + + noSmithyDocumentSerde +} + +type StartSandboxConnectionOutput struct { + + // Information about the Session Manager session. + SsmSession *types.SSMSession + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationStartSandboxConnectionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpStartSandboxConnection{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpStartSandboxConnection{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "StartSandboxConnection"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpStartSandboxConnectionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartSandboxConnection(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opStartSandboxConnection(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "StartSandboxConnection", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_StopBuild.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_StopBuild.go new file mode 100644 index 00000000000..3f2bc33a42d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_StopBuild.go @@ -0,0 +1,154 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/codebuild/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Attempts to stop running a build. +func (c *Client) StopBuild(ctx context.Context, params *StopBuildInput, optFns ...func(*Options)) (*StopBuildOutput, error) { + if params == nil { + params = &StopBuildInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StopBuild", params, optFns, c.addOperationStopBuildMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StopBuildOutput) + out.ResultMetadata = metadata + return out, nil +} + +type StopBuildInput struct { + + // The ID of the build. + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +type StopBuildOutput struct { + + // Information about the build. + Build *types.Build + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationStopBuildMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpStopBuild{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpStopBuild{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "StopBuild"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpStopBuildValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStopBuild(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opStopBuild(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "StopBuild", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_StopBuildBatch.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_StopBuildBatch.go new file mode 100644 index 00000000000..371f4473c4c --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_StopBuildBatch.go @@ -0,0 +1,154 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/codebuild/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Stops a running batch build. +func (c *Client) StopBuildBatch(ctx context.Context, params *StopBuildBatchInput, optFns ...func(*Options)) (*StopBuildBatchOutput, error) { + if params == nil { + params = &StopBuildBatchInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StopBuildBatch", params, optFns, c.addOperationStopBuildBatchMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StopBuildBatchOutput) + out.ResultMetadata = metadata + return out, nil +} + +type StopBuildBatchInput struct { + + // The identifier of the batch build to stop. + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +type StopBuildBatchOutput struct { + + // Contains information about a batch build. + BuildBatch *types.BuildBatch + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationStopBuildBatchMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpStopBuildBatch{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpStopBuildBatch{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "StopBuildBatch"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpStopBuildBatchValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStopBuildBatch(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opStopBuildBatch(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "StopBuildBatch", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_StopSandbox.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_StopSandbox.go new file mode 100644 index 00000000000..5a8356f889b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_StopSandbox.go @@ -0,0 +1,154 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/codebuild/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Stops a sandbox. +func (c *Client) StopSandbox(ctx context.Context, params *StopSandboxInput, optFns ...func(*Options)) (*StopSandboxOutput, error) { + if params == nil { + params = &StopSandboxInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StopSandbox", params, optFns, c.addOperationStopSandboxMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StopSandboxOutput) + out.ResultMetadata = metadata + return out, nil +} + +type StopSandboxInput struct { + + // Information about the requested sandbox ID. + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +type StopSandboxOutput struct { + + // Information about the requested sandbox. + Sandbox *types.Sandbox + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationStopSandboxMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpStopSandbox{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpStopSandbox{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "StopSandbox"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpStopSandboxValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStopSandbox(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opStopSandbox(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "StopSandbox", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_UpdateFleet.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_UpdateFleet.go new file mode 100644 index 00000000000..2232021cf1b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_UpdateFleet.go @@ -0,0 +1,326 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/codebuild/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates a compute fleet. +func (c *Client) UpdateFleet(ctx context.Context, params *UpdateFleetInput, optFns ...func(*Options)) (*UpdateFleetOutput, error) { + if params == nil { + params = &UpdateFleetInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateFleet", params, optFns, c.addOperationUpdateFleetMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateFleetOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateFleetInput struct { + + // The ARN of the compute fleet. + // + // This member is required. + Arn *string + + // The initial number of machines allocated to the compute fleet, which defines the + // number of builds that can run in parallel. + BaseCapacity *int32 + + // The compute configuration of the compute fleet. This is only required if + // computeType is set to ATTRIBUTE_BASED_COMPUTE or CUSTOM_INSTANCE_TYPE . + ComputeConfiguration *types.ComputeConfiguration + + // Information about the compute resources the compute fleet uses. Available + // values include: + // + // - ATTRIBUTE_BASED_COMPUTE : Specify the amount of vCPUs, memory, disk space, + // and the type of machine. + // + // If you use ATTRIBUTE_BASED_COMPUTE , you must define your attributes by using + // computeConfiguration . CodeBuild will select the cheapest instance that + // satisfies your specified attributes. For more information, see [Reserved capacity environment types]in the + // CodeBuild User Guide. + // + // - CUSTOM_INSTANCE_TYPE : Specify the instance type for your compute fleet. For + // a list of supported instance types, see [Supported instance families]in the CodeBuild User Guide. + // + // - BUILD_GENERAL1_SMALL : Use up to 4 GiB memory and 2 vCPUs for builds. + // + // - BUILD_GENERAL1_MEDIUM : Use up to 8 GiB memory and 4 vCPUs for builds. + // + // - BUILD_GENERAL1_LARGE : Use up to 16 GiB memory and 8 vCPUs for builds, + // depending on your environment type. + // + // - BUILD_GENERAL1_XLARGE : Use up to 72 GiB memory and 36 vCPUs for builds, + // depending on your environment type. + // + // - BUILD_GENERAL1_2XLARGE : Use up to 144 GiB memory, 72 vCPUs, and 824 GB of + // SSD storage for builds. This compute type supports Docker images up to 100 GB + // uncompressed. + // + // - BUILD_LAMBDA_1GB : Use up to 1 GiB memory for builds. Only available for + // environment type LINUX_LAMBDA_CONTAINER and ARM_LAMBDA_CONTAINER . + // + // - BUILD_LAMBDA_2GB : Use up to 2 GiB memory for builds. Only available for + // environment type LINUX_LAMBDA_CONTAINER and ARM_LAMBDA_CONTAINER . + // + // - BUILD_LAMBDA_4GB : Use up to 4 GiB memory for builds. Only available for + // environment type LINUX_LAMBDA_CONTAINER and ARM_LAMBDA_CONTAINER . + // + // - BUILD_LAMBDA_8GB : Use up to 8 GiB memory for builds. Only available for + // environment type LINUX_LAMBDA_CONTAINER and ARM_LAMBDA_CONTAINER . + // + // - BUILD_LAMBDA_10GB : Use up to 10 GiB memory for builds. Only available for + // environment type LINUX_LAMBDA_CONTAINER and ARM_LAMBDA_CONTAINER . + // + // If you use BUILD_GENERAL1_SMALL : + // + // - For environment type LINUX_CONTAINER , you can use up to 4 GiB memory and 2 + // vCPUs for builds. + // + // - For environment type LINUX_GPU_CONTAINER , you can use up to 16 GiB memory, + // 4 vCPUs, and 1 NVIDIA A10G Tensor Core GPU for builds. + // + // - For environment type ARM_CONTAINER , you can use up to 4 GiB memory and 2 + // vCPUs on ARM-based processors for builds. + // + // If you use BUILD_GENERAL1_LARGE : + // + // - For environment type LINUX_CONTAINER , you can use up to 16 GiB memory and 8 + // vCPUs for builds. + // + // - For environment type LINUX_GPU_CONTAINER , you can use up to 255 GiB memory, + // 32 vCPUs, and 4 NVIDIA Tesla V100 GPUs for builds. + // + // - For environment type ARM_CONTAINER , you can use up to 16 GiB memory and 8 + // vCPUs on ARM-based processors for builds. + // + // For more information, see [On-demand environment types] in the CodeBuild User Guide. + // + // [Supported instance families]: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html#environment-reserved-capacity.instance-types + // [Reserved capacity environment types]: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html#environment-reserved-capacity.types + // [On-demand environment types]: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html#environment.types + ComputeType types.ComputeType + + // The environment type of the compute fleet. + // + // - The environment type ARM_CONTAINER is available only in regions US East (N. + // Virginia), US East (Ohio), US West (Oregon), EU (Ireland), Asia Pacific + // (Mumbai), Asia Pacific (Tokyo), Asia Pacific (Singapore), Asia Pacific (Sydney), + // EU (Frankfurt), and South America (São Paulo). + // + // - The environment type ARM_EC2 is available only in regions US East (N. + // Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia + // Pacific (Tokyo), Asia Pacific (Singapore), Asia Pacific (Sydney), South America + // (São Paulo), and Asia Pacific (Mumbai). + // + // - The environment type LINUX_CONTAINER is available only in regions US East + // (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), + // Asia Pacific (Tokyo), Asia Pacific (Singapore), Asia Pacific (Sydney), South + // America (São Paulo), and Asia Pacific (Mumbai). + // + // - The environment type LINUX_EC2 is available only in regions US East (N. + // Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia + // Pacific (Tokyo), Asia Pacific (Singapore), Asia Pacific (Sydney), South America + // (São Paulo), and Asia Pacific (Mumbai). + // + // - The environment type LINUX_GPU_CONTAINER is available only in regions US + // East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU + // (Frankfurt), Asia Pacific (Tokyo), and Asia Pacific (Sydney). + // + // - The environment type MAC_ARM is available for Medium fleets only in regions + // US East (N. Virginia), US East (Ohio), US West (Oregon), Asia Pacific (Sydney), + // and EU (Frankfurt) + // + // - The environment type MAC_ARM is available for Large fleets only in regions + // US East (N. Virginia), US East (Ohio), US West (Oregon), and Asia Pacific + // (Sydney). + // + // - The environment type WINDOWS_EC2 is available only in regions US East (N. + // Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia + // Pacific (Tokyo), Asia Pacific (Singapore), Asia Pacific (Sydney), South America + // (São Paulo), and Asia Pacific (Mumbai). + // + // - The environment type WINDOWS_SERVER_2019_CONTAINER is available only in + // regions US East (N. Virginia), US East (Ohio), US West (Oregon), Asia Pacific + // (Sydney), Asia Pacific (Tokyo), Asia Pacific (Mumbai) and EU (Ireland). + // + // - The environment type WINDOWS_SERVER_2022_CONTAINER is available only in + // regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), + // EU (Frankfurt), Asia Pacific (Sydney), Asia Pacific (Singapore), Asia Pacific + // (Tokyo), South America (São Paulo) and Asia Pacific (Mumbai). + // + // For more information, see [Build environment compute types] in the CodeBuild user guide. + // + // [Build environment compute types]: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html + EnvironmentType types.EnvironmentType + + // The service role associated with the compute fleet. For more information, see [Allow a user to add a permission policy for a fleet service role] + // in the CodeBuild User Guide. + // + // [Allow a user to add a permission policy for a fleet service role]: https://docs.aws.amazon.com/codebuild/latest/userguide/auth-and-access-control-iam-identity-based-access-control.html#customer-managed-policies-example-permission-policy-fleet-service-role.html + FleetServiceRole *string + + // The Amazon Machine Image (AMI) of the compute fleet. + ImageId *string + + // The compute fleet overflow behavior. + // + // - For overflow behavior QUEUE , your overflow builds need to wait on the + // existing fleet instance to become available. + // + // - For overflow behavior ON_DEMAND , your overflow builds run on CodeBuild + // on-demand. + // + // If you choose to set your overflow behavior to on-demand while creating a + // VPC-connected fleet, make sure that you add the required VPC permissions to your + // project service role. For more information, see [Example policy statement to allow CodeBuild access to Amazon Web Services services required to create a VPC network interface]. + // + // [Example policy statement to allow CodeBuild access to Amazon Web Services services required to create a VPC network interface]: https://docs.aws.amazon.com/codebuild/latest/userguide/auth-and-access-control-iam-identity-based-access-control.html#customer-managed-policies-example-create-vpc-network-interface + OverflowBehavior types.FleetOverflowBehavior + + // The proxy configuration of the compute fleet. + ProxyConfiguration *types.ProxyConfiguration + + // The scaling configuration of the compute fleet. + ScalingConfiguration *types.ScalingConfigurationInput + + // A list of tag key and value pairs associated with this compute fleet. + // + // These tags are available for use by Amazon Web Services services that support + // CodeBuild build project tags. + Tags []types.Tag + + // Information about the VPC configuration that CodeBuild accesses. + VpcConfig *types.VpcConfig + + noSmithyDocumentSerde +} + +type UpdateFleetOutput struct { + + // A Fleet object. + Fleet *types.Fleet + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateFleetMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateFleet{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateFleet{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateFleet"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpUpdateFleetValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateFleet(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateFleet(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateFleet", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_UpdateProject.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_UpdateProject.go new file mode 100644 index 00000000000..0ca502efd7a --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_UpdateProject.go @@ -0,0 +1,276 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/codebuild/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Changes the settings of a build project. +func (c *Client) UpdateProject(ctx context.Context, params *UpdateProjectInput, optFns ...func(*Options)) (*UpdateProjectOutput, error) { + if params == nil { + params = &UpdateProjectInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateProject", params, optFns, c.addOperationUpdateProjectMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateProjectOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateProjectInput struct { + + // The name of the build project. + // + // You cannot change a build project's name. + // + // This member is required. + Name *string + + // Information to be changed about the build output artifacts for the build + // project. + Artifacts *types.ProjectArtifacts + + // The maximum number of additional automatic retries after a failed build. For + // example, if the auto-retry limit is set to 2, CodeBuild will call the RetryBuild + // API to automatically retry your build for up to 2 additional times. + AutoRetryLimit *int32 + + // Set this to true to generate a publicly accessible URL for your project's build + // badge. + BadgeEnabled *bool + + // Contains configuration information about a batch build project. + BuildBatchConfig *types.ProjectBuildBatchConfig + + // Stores recently used information so that it can be quickly accessed at a later + // time. + Cache *types.ProjectCache + + // The maximum number of concurrent builds that are allowed for this project. + // + // New builds are only started if the current number of builds is less than or + // equal to this limit. If the current build count meets this limit, new builds are + // throttled and are not run. + // + // To remove this limit, set this value to -1. + ConcurrentBuildLimit *int32 + + // A new or replacement description of the build project. + Description *string + + // The Key Management Service customer master key (CMK) to be used for encrypting + // the build output artifacts. + // + // You can use a cross-account KMS key to encrypt the build output artifacts if + // your service role has permission to that key. + // + // You can specify either the Amazon Resource Name (ARN) of the CMK or, if + // available, the CMK's alias (using the format alias/ ). + EncryptionKey *string + + // Information to be changed about the build environment for the build project. + Environment *types.ProjectEnvironment + + // An array of ProjectFileSystemLocation objects for a CodeBuild build project. A + // ProjectFileSystemLocation object specifies the identifier , location , + // mountOptions , mountPoint , and type of a file system created using Amazon + // Elastic File System. + FileSystemLocations []types.ProjectFileSystemLocation + + // Information about logs for the build project. A project can create logs in + // CloudWatch Logs, logs in an S3 bucket, or both. + LogsConfig *types.LogsConfig + + // The number of minutes a build is allowed to be queued before it times out. + QueuedTimeoutInMinutes *int32 + + // An array of ProjectArtifact objects. + SecondaryArtifacts []types.ProjectArtifacts + + // An array of ProjectSourceVersion objects. If secondarySourceVersions is + // specified at the build level, then they take over these secondarySourceVersions + // (at the project level). + SecondarySourceVersions []types.ProjectSourceVersion + + // An array of ProjectSource objects. + SecondarySources []types.ProjectSource + + // The replacement ARN of the IAM role that enables CodeBuild to interact with + // dependent Amazon Web Services services on behalf of the Amazon Web Services + // account. + ServiceRole *string + + // Information to be changed about the build input source code for the build + // project. + Source *types.ProjectSource + + // A version of the build input to be built for this project. If not specified, + // the latest version is used. If specified, it must be one of: + // + // - For CodeCommit: the commit ID, branch, or Git tag to use. + // + // - For GitHub: the commit ID, pull request ID, branch name, or tag name that + // corresponds to the version of the source code you want to build. If a pull + // request ID is specified, it must use the format pr/pull-request-ID (for + // example pr/25 ). If a branch name is specified, the branch's HEAD commit ID is + // used. If not specified, the default branch's HEAD commit ID is used. + // + // - For GitLab: the commit ID, branch, or Git tag to use. + // + // - For Bitbucket: the commit ID, branch name, or tag name that corresponds to + // the version of the source code you want to build. If a branch name is specified, + // the branch's HEAD commit ID is used. If not specified, the default branch's HEAD + // commit ID is used. + // + // - For Amazon S3: the version ID of the object that represents the build input + // ZIP file to use. + // + // If sourceVersion is specified at the build level, then that version takes + // precedence over this sourceVersion (at the project level). + // + // For more information, see [Source Version Sample with CodeBuild] in the CodeBuild User Guide. + // + // [Source Version Sample with CodeBuild]: https://docs.aws.amazon.com/codebuild/latest/userguide/sample-source-version.html + SourceVersion *string + + // An updated list of tag key and value pairs associated with this build project. + // + // These tags are available for use by Amazon Web Services services that support + // CodeBuild build project tags. + Tags []types.Tag + + // The replacement value in minutes, from 5 to 2160 (36 hours), for CodeBuild to + // wait before timing out any related build that did not get marked as completed. + TimeoutInMinutes *int32 + + // VpcConfig enables CodeBuild to access resources in an Amazon VPC. + VpcConfig *types.VpcConfig + + noSmithyDocumentSerde +} + +type UpdateProjectOutput struct { + + // Information about the build project that was changed. + Project *types.Project + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateProjectMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateProject{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateProject{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateProject"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpUpdateProjectValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateProject(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateProject(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateProject", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_UpdateProjectVisibility.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_UpdateProjectVisibility.go new file mode 100644 index 00000000000..0103c32483e --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_UpdateProjectVisibility.go @@ -0,0 +1,205 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/codebuild/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Changes the public visibility for a project. The project's build results, logs, +// and artifacts are available to the general public. For more information, see [Public build projects]in +// the CodeBuild User Guide. +// +// The following should be kept in mind when making your projects public: +// +// - All of a project's build results, logs, and artifacts, including builds +// that were run when the project was private, are available to the general public. +// +// - All build logs and artifacts are available to the public. Environment +// variables, source code, and other sensitive information may have been output to +// the build logs and artifacts. You must be careful about what information is +// output to the build logs. Some best practice are: +// +// - Do not store sensitive values in environment variables. We recommend that +// you use an Amazon EC2 Systems Manager Parameter Store or Secrets Manager to +// store sensitive values. +// +// - Follow [Best practices for using webhooks]in the CodeBuild User Guide to limit which entities can trigger a +// build, and do not store the buildspec in the project itself, to ensure that your +// webhooks are as secure as possible. +// +// - A malicious user can use public builds to distribute malicious artifacts. +// We recommend that you review all pull requests to verify that the pull request +// is a legitimate change. We also recommend that you validate any artifacts with +// their checksums to make sure that the correct artifacts are being downloaded. +// +// [Public build projects]: https://docs.aws.amazon.com/codebuild/latest/userguide/public-builds.html +// [Best practices for using webhooks]: https://docs.aws.amazon.com/codebuild/latest/userguide/webhooks.html#webhook-best-practices +func (c *Client) UpdateProjectVisibility(ctx context.Context, params *UpdateProjectVisibilityInput, optFns ...func(*Options)) (*UpdateProjectVisibilityOutput, error) { + if params == nil { + params = &UpdateProjectVisibilityInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateProjectVisibility", params, optFns, c.addOperationUpdateProjectVisibilityMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateProjectVisibilityOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateProjectVisibilityInput struct { + + // The Amazon Resource Name (ARN) of the build project. + // + // This member is required. + ProjectArn *string + + // Specifies the visibility of the project's builds. Possible values are: + // + // PUBLIC_READ The project builds are visible to the public. + // + // PRIVATE The project builds are not visible to the public. + // + // This member is required. + ProjectVisibility types.ProjectVisibilityType + + // The ARN of the IAM role that enables CodeBuild to access the CloudWatch Logs + // and Amazon S3 artifacts for the project's builds. + ResourceAccessRole *string + + noSmithyDocumentSerde +} + +type UpdateProjectVisibilityOutput struct { + + // The Amazon Resource Name (ARN) of the build project. + ProjectArn *string + + // Specifies the visibility of the project's builds. Possible values are: + // + // PUBLIC_READ The project builds are visible to the public. + // + // PRIVATE The project builds are not visible to the public. + ProjectVisibility types.ProjectVisibilityType + + // Contains the project identifier used with the public build APIs. + PublicProjectAlias *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateProjectVisibilityMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateProjectVisibility{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateProjectVisibility{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateProjectVisibility"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpUpdateProjectVisibilityValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateProjectVisibility(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateProjectVisibility(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateProjectVisibility", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_UpdateReportGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_UpdateReportGroup.go new file mode 100644 index 00000000000..9d8b3d059d5 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_UpdateReportGroup.go @@ -0,0 +1,167 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/codebuild/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates a report group. +func (c *Client) UpdateReportGroup(ctx context.Context, params *UpdateReportGroupInput, optFns ...func(*Options)) (*UpdateReportGroupOutput, error) { + if params == nil { + params = &UpdateReportGroupInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateReportGroup", params, optFns, c.addOperationUpdateReportGroupMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateReportGroupOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateReportGroupInput struct { + + // The ARN of the report group to update. + // + // This member is required. + Arn *string + + // Used to specify an updated export type. Valid values are: + // + // - S3 : The report results are exported to an S3 bucket. + // + // - NO_EXPORT : The report results are not exported. + ExportConfig *types.ReportExportConfig + + // An updated list of tag key and value pairs associated with this report group. + // + // These tags are available for use by Amazon Web Services services that support + // CodeBuild report group tags. + Tags []types.Tag + + noSmithyDocumentSerde +} + +type UpdateReportGroupOutput struct { + + // Information about the updated report group. + ReportGroup *types.ReportGroup + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateReportGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateReportGroup{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateReportGroup{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateReportGroup"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpUpdateReportGroupValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateReportGroup(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateReportGroup(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateReportGroup", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_UpdateWebhook.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_UpdateWebhook.go new file mode 100644 index 00000000000..7979c693227 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/api_op_UpdateWebhook.go @@ -0,0 +1,189 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/codebuild/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates the webhook associated with an CodeBuild build project. +// +// If you use Bitbucket for your repository, rotateSecret is ignored. +func (c *Client) UpdateWebhook(ctx context.Context, params *UpdateWebhookInput, optFns ...func(*Options)) (*UpdateWebhookOutput, error) { + if params == nil { + params = &UpdateWebhookInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateWebhook", params, optFns, c.addOperationUpdateWebhookMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateWebhookOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateWebhookInput struct { + + // The name of the CodeBuild project. + // + // This member is required. + ProjectName *string + + // A regular expression used to determine which repository branches are built when + // a webhook is triggered. If the name of a branch matches the regular expression, + // then it is built. If branchFilter is empty, then all branches are built. + // + // It is recommended that you use filterGroups instead of branchFilter . + BranchFilter *string + + // Specifies the type of build this webhook will trigger. + // + // RUNNER_BUILDKITE_BUILD is only available for NO_SOURCE source type projects + // configured for Buildkite runner builds. For more information about + // CodeBuild-hosted Buildkite runner builds, see [Tutorial: Configure a CodeBuild-hosted Buildkite runner]in the CodeBuild user guide. + // + // [Tutorial: Configure a CodeBuild-hosted Buildkite runner]: https://docs.aws.amazon.com/codebuild/latest/userguide/sample-runner-buildkite.html + BuildType types.WebhookBuildType + + // An array of arrays of WebhookFilter objects used to determine if a webhook + // event can trigger a build. A filter group must contain at least one EVENT + // WebhookFilter . + FilterGroups [][]types.WebhookFilter + + // A PullRequestBuildPolicy object that defines comment-based approval + // requirements for triggering builds on pull requests. This policy helps control + // when automated builds are executed based on contributor permissions and approval + // workflows. + PullRequestBuildPolicy *types.PullRequestBuildPolicy + + // A boolean value that specifies whether the associated GitHub repository's + // secret token should be updated. If you use Bitbucket for your repository, + // rotateSecret is ignored. + RotateSecret bool + + noSmithyDocumentSerde +} + +type UpdateWebhookOutput struct { + + // Information about a repository's webhook that is associated with a project in + // CodeBuild. + Webhook *types.Webhook + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateWebhookMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateWebhook{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateWebhook{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateWebhook"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options, c); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpUpdateWebhookValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateWebhook(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateWebhook(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateWebhook", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/auth.go new file mode 100644 index 00000000000..57e15f9a5fe --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/auth.go @@ -0,0 +1,345 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + smithy "github.com/aws/smithy-go" + smithyauth "github.com/aws/smithy-go/auth" + "github.com/aws/smithy-go/metrics" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" + smithyhttp "github.com/aws/smithy-go/transport/http" + "slices" + "strings" +) + +func bindAuthParamsRegion(_ interface{}, params *AuthResolverParameters, _ interface{}, options Options) error { + params.Region = options.Region + return nil +} + +type setLegacyContextSigningOptionsMiddleware struct { +} + +func (*setLegacyContextSigningOptionsMiddleware) ID() string { + return "setLegacyContextSigningOptions" +} + +func (m *setLegacyContextSigningOptionsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + rscheme := getResolvedAuthScheme(ctx) + schemeID := rscheme.Scheme.SchemeID() + + if sn := awsmiddleware.GetSigningName(ctx); sn != "" { + if schemeID == "aws.auth#sigv4" { + smithyhttp.SetSigV4SigningName(&rscheme.SignerProperties, sn) + } else if schemeID == "aws.auth#sigv4a" { + smithyhttp.SetSigV4ASigningName(&rscheme.SignerProperties, sn) + } + } + + if sr := awsmiddleware.GetSigningRegion(ctx); sr != "" { + if schemeID == "aws.auth#sigv4" { + smithyhttp.SetSigV4SigningRegion(&rscheme.SignerProperties, sr) + } else if schemeID == "aws.auth#sigv4a" { + smithyhttp.SetSigV4ASigningRegions(&rscheme.SignerProperties, []string{sr}) + } + } + + return next.HandleFinalize(ctx, in) +} + +func addSetLegacyContextSigningOptionsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&setLegacyContextSigningOptionsMiddleware{}, "Signing", middleware.Before) +} + +type withAnonymous struct { + resolver AuthSchemeResolver +} + +var _ AuthSchemeResolver = (*withAnonymous)(nil) + +func (v *withAnonymous) ResolveAuthSchemes(ctx context.Context, params *AuthResolverParameters) ([]*smithyauth.Option, error) { + opts, err := v.resolver.ResolveAuthSchemes(ctx, params) + if err != nil { + return nil, err + } + + opts = append(opts, &smithyauth.Option{ + SchemeID: smithyauth.SchemeIDAnonymous, + }) + return opts, nil +} + +func wrapWithAnonymousAuth(options *Options) { + if _, ok := options.AuthSchemeResolver.(*defaultAuthSchemeResolver); !ok { + return + } + + options.AuthSchemeResolver = &withAnonymous{ + resolver: options.AuthSchemeResolver, + } +} + +// AuthResolverParameters contains the set of inputs necessary for auth scheme +// resolution. +type AuthResolverParameters struct { + // The name of the operation being invoked. + Operation string + + // The region in which the operation is being invoked. + Region string +} + +func bindAuthResolverParams(ctx context.Context, operation string, input interface{}, options Options) (*AuthResolverParameters, error) { + params := &AuthResolverParameters{ + Operation: operation, + } + + if err := bindAuthParamsRegion(ctx, params, input, options); err != nil { + return nil, err + } + + return params, nil +} + +// AuthSchemeResolver returns a set of possible authentication options for an +// operation. +type AuthSchemeResolver interface { + ResolveAuthSchemes(context.Context, *AuthResolverParameters) ([]*smithyauth.Option, error) +} + +type defaultAuthSchemeResolver struct{} + +var _ AuthSchemeResolver = (*defaultAuthSchemeResolver)(nil) + +func (*defaultAuthSchemeResolver) ResolveAuthSchemes(ctx context.Context, params *AuthResolverParameters) ([]*smithyauth.Option, error) { + if overrides, ok := operationAuthOptions[params.Operation]; ok { + return overrides(params), nil + } + return serviceAuthOptions(params), nil +} + +var operationAuthOptions = map[string]func(*AuthResolverParameters) []*smithyauth.Option{} + +func serviceAuthOptions(params *AuthResolverParameters) []*smithyauth.Option { + return []*smithyauth.Option{ + { + SchemeID: smithyauth.SchemeIDSigV4, + SignerProperties: func() smithy.Properties { + var props smithy.Properties + smithyhttp.SetSigV4SigningName(&props, "codebuild") + smithyhttp.SetSigV4SigningRegion(&props, params.Region) + return props + }(), + }, + } +} + +type resolveAuthSchemeMiddleware struct { + operation string + options Options +} + +func (*resolveAuthSchemeMiddleware) ID() string { + return "ResolveAuthScheme" +} + +func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "ResolveAuthScheme") + defer span.End() + + params, err := bindAuthResolverParams(ctx, m.operation, getOperationInput(ctx), m.options) + if err != nil { + return out, metadata, fmt.Errorf("bind auth scheme params: %w", err) + } + options, err := m.options.AuthSchemeResolver.ResolveAuthSchemes(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("resolve auth scheme: %w", err) + } + + scheme, ok := m.selectScheme(options) + if !ok { + return out, metadata, fmt.Errorf("could not select an auth scheme") + } + + ctx = setResolvedAuthScheme(ctx, scheme) + + span.SetProperty("auth.scheme_id", scheme.Scheme.SchemeID()) + span.End() + return next.HandleFinalize(ctx, in) +} + +func (m *resolveAuthSchemeMiddleware) selectScheme(options []*smithyauth.Option) (*resolvedAuthScheme, bool) { + sorted := sortAuthOptions(options, m.options.AuthSchemePreference) + for _, option := range sorted { + if option.SchemeID == smithyauth.SchemeIDAnonymous { + return newResolvedAuthScheme(smithyhttp.NewAnonymousScheme(), option), true + } + + for _, scheme := range m.options.AuthSchemes { + if scheme.SchemeID() != option.SchemeID { + continue + } + + if scheme.IdentityResolver(m.options) != nil { + return newResolvedAuthScheme(scheme, option), true + } + } + } + + return nil, false +} + +func sortAuthOptions(options []*smithyauth.Option, preferred []string) []*smithyauth.Option { + byPriority := make([]*smithyauth.Option, 0, len(options)) + for _, prefName := range preferred { + for _, option := range options { + optName := option.SchemeID + if parts := strings.Split(option.SchemeID, "#"); len(parts) == 2 { + optName = parts[1] + } + if prefName == optName { + byPriority = append(byPriority, option) + } + } + } + for _, option := range options { + if !slices.ContainsFunc(byPriority, func(o *smithyauth.Option) bool { + return o.SchemeID == option.SchemeID + }) { + byPriority = append(byPriority, option) + } + } + return byPriority +} + +type resolvedAuthSchemeKey struct{} + +type resolvedAuthScheme struct { + Scheme smithyhttp.AuthScheme + IdentityProperties smithy.Properties + SignerProperties smithy.Properties +} + +func newResolvedAuthScheme(scheme smithyhttp.AuthScheme, option *smithyauth.Option) *resolvedAuthScheme { + return &resolvedAuthScheme{ + Scheme: scheme, + IdentityProperties: option.IdentityProperties, + SignerProperties: option.SignerProperties, + } +} + +func setResolvedAuthScheme(ctx context.Context, scheme *resolvedAuthScheme) context.Context { + return middleware.WithStackValue(ctx, resolvedAuthSchemeKey{}, scheme) +} + +func getResolvedAuthScheme(ctx context.Context) *resolvedAuthScheme { + v, _ := middleware.GetStackValue(ctx, resolvedAuthSchemeKey{}).(*resolvedAuthScheme) + return v +} + +type getIdentityMiddleware struct { + options Options +} + +func (*getIdentityMiddleware) ID() string { + return "GetIdentity" +} + +func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + innerCtx, span := tracing.StartSpan(ctx, "GetIdentity") + defer span.End() + + rscheme := getResolvedAuthScheme(innerCtx) + if rscheme == nil { + return out, metadata, fmt.Errorf("no resolved auth scheme") + } + + resolver := rscheme.Scheme.IdentityResolver(m.options) + if resolver == nil { + return out, metadata, fmt.Errorf("no identity resolver") + } + + identity, err := timeOperationMetric(ctx, "client.call.resolve_identity_duration", + func() (smithyauth.Identity, error) { + return resolver.GetIdentity(innerCtx, rscheme.IdentityProperties) + }, + func(o *metrics.RecordMetricOptions) { + o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID()) + }) + if err != nil { + return out, metadata, fmt.Errorf("get identity: %w", err) + } + + ctx = setIdentity(ctx, identity) + + span.End() + return next.HandleFinalize(ctx, in) +} + +type identityKey struct{} + +func setIdentity(ctx context.Context, identity smithyauth.Identity) context.Context { + return middleware.WithStackValue(ctx, identityKey{}, identity) +} + +func getIdentity(ctx context.Context) smithyauth.Identity { + v, _ := middleware.GetStackValue(ctx, identityKey{}).(smithyauth.Identity) + return v +} + +type signRequestMiddleware struct { + options Options +} + +func (*signRequestMiddleware) ID() string { + return "Signing" +} + +func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "SignRequest") + defer span.End() + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unexpected transport type %T", in.Request) + } + + rscheme := getResolvedAuthScheme(ctx) + if rscheme == nil { + return out, metadata, fmt.Errorf("no resolved auth scheme") + } + + identity := getIdentity(ctx) + if identity == nil { + return out, metadata, fmt.Errorf("no identity") + } + + signer := rscheme.Scheme.Signer() + if signer == nil { + return out, metadata, fmt.Errorf("no signer") + } + + _, err = timeOperationMetric(ctx, "client.call.signing_duration", func() (any, error) { + return nil, signer.SignRequest(ctx, req, identity, rscheme.SignerProperties) + }, func(o *metrics.RecordMetricOptions) { + o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID()) + }) + if err != nil { + return out, metadata, fmt.Errorf("sign request: %w", err) + } + + span.End() + return next.HandleFinalize(ctx, in) +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/deserializers.go new file mode 100644 index 00000000000..336eda5b36b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/deserializers.go @@ -0,0 +1,17297 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" + "github.com/aws/aws-sdk-go-v2/service/codebuild/types" + smithy "github.com/aws/smithy-go" + 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" + "github.com/aws/smithy-go/tracing" + smithyhttp "github.com/aws/smithy-go/transport/http" + "io" + "math" + "strings" +) + +type awsAwsjson11_deserializeOpBatchDeleteBuilds struct { +} + +func (*awsAwsjson11_deserializeOpBatchDeleteBuilds) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpBatchDeleteBuilds) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorBatchDeleteBuilds(response, &metadata) + } + output := &BatchDeleteBuildsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentBatchDeleteBuildsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorBatchDeleteBuilds(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpBatchGetBuildBatches struct { +} + +func (*awsAwsjson11_deserializeOpBatchGetBuildBatches) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpBatchGetBuildBatches) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorBatchGetBuildBatches(response, &metadata) + } + output := &BatchGetBuildBatchesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentBatchGetBuildBatchesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorBatchGetBuildBatches(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpBatchGetBuilds struct { +} + +func (*awsAwsjson11_deserializeOpBatchGetBuilds) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpBatchGetBuilds) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorBatchGetBuilds(response, &metadata) + } + output := &BatchGetBuildsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentBatchGetBuildsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorBatchGetBuilds(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpBatchGetCommandExecutions struct { +} + +func (*awsAwsjson11_deserializeOpBatchGetCommandExecutions) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpBatchGetCommandExecutions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorBatchGetCommandExecutions(response, &metadata) + } + output := &BatchGetCommandExecutionsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentBatchGetCommandExecutionsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorBatchGetCommandExecutions(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpBatchGetFleets struct { +} + +func (*awsAwsjson11_deserializeOpBatchGetFleets) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpBatchGetFleets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorBatchGetFleets(response, &metadata) + } + output := &BatchGetFleetsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentBatchGetFleetsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorBatchGetFleets(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpBatchGetProjects struct { +} + +func (*awsAwsjson11_deserializeOpBatchGetProjects) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpBatchGetProjects) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorBatchGetProjects(response, &metadata) + } + output := &BatchGetProjectsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentBatchGetProjectsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorBatchGetProjects(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpBatchGetReportGroups struct { +} + +func (*awsAwsjson11_deserializeOpBatchGetReportGroups) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpBatchGetReportGroups) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorBatchGetReportGroups(response, &metadata) + } + output := &BatchGetReportGroupsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentBatchGetReportGroupsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorBatchGetReportGroups(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpBatchGetReports struct { +} + +func (*awsAwsjson11_deserializeOpBatchGetReports) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpBatchGetReports) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorBatchGetReports(response, &metadata) + } + output := &BatchGetReportsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentBatchGetReportsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorBatchGetReports(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpBatchGetSandboxes struct { +} + +func (*awsAwsjson11_deserializeOpBatchGetSandboxes) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpBatchGetSandboxes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorBatchGetSandboxes(response, &metadata) + } + output := &BatchGetSandboxesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentBatchGetSandboxesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorBatchGetSandboxes(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpCreateFleet struct { +} + +func (*awsAwsjson11_deserializeOpCreateFleet) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorCreateFleet(response, &metadata) + } + output := &CreateFleetOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentCreateFleetOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_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 + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccountLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorAccountLimitExceededException(response, errorBody) + + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("ResourceAlreadyExistsException", errorCode): + return awsAwsjson11_deserializeErrorResourceAlreadyExistsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpCreateProject struct { +} + +func (*awsAwsjson11_deserializeOpCreateProject) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpCreateProject) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorCreateProject(response, &metadata) + } + output := &CreateProjectOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentCreateProjectOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorCreateProject(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccountLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorAccountLimitExceededException(response, errorBody) + + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("ResourceAlreadyExistsException", errorCode): + return awsAwsjson11_deserializeErrorResourceAlreadyExistsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpCreateReportGroup struct { +} + +func (*awsAwsjson11_deserializeOpCreateReportGroup) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpCreateReportGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorCreateReportGroup(response, &metadata) + } + output := &CreateReportGroupOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentCreateReportGroupOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorCreateReportGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccountLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorAccountLimitExceededException(response, errorBody) + + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("ResourceAlreadyExistsException", errorCode): + return awsAwsjson11_deserializeErrorResourceAlreadyExistsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpCreateWebhook struct { +} + +func (*awsAwsjson11_deserializeOpCreateWebhook) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpCreateWebhook) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorCreateWebhook(response, &metadata) + } + output := &CreateWebhookOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentCreateWebhookOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorCreateWebhook(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("OAuthProviderException", errorCode): + return awsAwsjson11_deserializeErrorOAuthProviderException(response, errorBody) + + case strings.EqualFold("ResourceAlreadyExistsException", errorCode): + return awsAwsjson11_deserializeErrorResourceAlreadyExistsException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDeleteBuildBatch struct { +} + +func (*awsAwsjson11_deserializeOpDeleteBuildBatch) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeleteBuildBatch) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteBuildBatch(response, &metadata) + } + output := &DeleteBuildBatchOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDeleteBuildBatchOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDeleteBuildBatch(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDeleteFleet struct { +} + +func (*awsAwsjson11_deserializeOpDeleteFleet) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeleteFleet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteFleet(response, &metadata) + } + output := &DeleteFleetOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDeleteFleetOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDeleteFleet(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDeleteProject struct { +} + +func (*awsAwsjson11_deserializeOpDeleteProject) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeleteProject) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteProject(response, &metadata) + } + output := &DeleteProjectOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDeleteProjectOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDeleteProject(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDeleteReport struct { +} + +func (*awsAwsjson11_deserializeOpDeleteReport) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeleteReport) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteReport(response, &metadata) + } + output := &DeleteReportOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDeleteReportOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDeleteReport(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDeleteReportGroup struct { +} + +func (*awsAwsjson11_deserializeOpDeleteReportGroup) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeleteReportGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteReportGroup(response, &metadata) + } + output := &DeleteReportGroupOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDeleteReportGroupOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDeleteReportGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDeleteResourcePolicy struct { +} + +func (*awsAwsjson11_deserializeOpDeleteResourcePolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeleteResourcePolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteResourcePolicy(response, &metadata) + } + output := &DeleteResourcePolicyOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDeleteResourcePolicyOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDeleteResourcePolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDeleteSourceCredentials struct { +} + +func (*awsAwsjson11_deserializeOpDeleteSourceCredentials) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeleteSourceCredentials) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteSourceCredentials(response, &metadata) + } + output := &DeleteSourceCredentialsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDeleteSourceCredentialsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDeleteSourceCredentials(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDeleteWebhook struct { +} + +func (*awsAwsjson11_deserializeOpDeleteWebhook) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeleteWebhook) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteWebhook(response, &metadata) + } + output := &DeleteWebhookOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDeleteWebhookOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDeleteWebhook(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("OAuthProviderException", errorCode): + return awsAwsjson11_deserializeErrorOAuthProviderException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeCodeCoverages struct { +} + +func (*awsAwsjson11_deserializeOpDescribeCodeCoverages) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeCodeCoverages) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeCodeCoverages(response, &metadata) + } + output := &DescribeCodeCoveragesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeCodeCoveragesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribeCodeCoverages(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeTestCases struct { +} + +func (*awsAwsjson11_deserializeOpDescribeTestCases) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeTestCases) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeTestCases(response, &metadata) + } + output := &DescribeTestCasesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDescribeTestCasesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDescribeTestCases(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetReportGroupTrend struct { +} + +func (*awsAwsjson11_deserializeOpGetReportGroupTrend) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetReportGroupTrend) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetReportGroupTrend(response, &metadata) + } + output := &GetReportGroupTrendOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetReportGroupTrendOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetReportGroupTrend(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetResourcePolicy struct { +} + +func (*awsAwsjson11_deserializeOpGetResourcePolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetResourcePolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetResourcePolicy(response, &metadata) + } + output := &GetResourcePolicyOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetResourcePolicyOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetResourcePolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpImportSourceCredentials struct { +} + +func (*awsAwsjson11_deserializeOpImportSourceCredentials) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpImportSourceCredentials) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorImportSourceCredentials(response, &metadata) + } + output := &ImportSourceCredentialsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentImportSourceCredentialsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorImportSourceCredentials(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccountLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorAccountLimitExceededException(response, errorBody) + + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("ResourceAlreadyExistsException", errorCode): + return awsAwsjson11_deserializeErrorResourceAlreadyExistsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpInvalidateProjectCache struct { +} + +func (*awsAwsjson11_deserializeOpInvalidateProjectCache) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpInvalidateProjectCache) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorInvalidateProjectCache(response, &metadata) + } + output := &InvalidateProjectCacheOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentInvalidateProjectCacheOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorInvalidateProjectCache(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListBuildBatches struct { +} + +func (*awsAwsjson11_deserializeOpListBuildBatches) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListBuildBatches) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorListBuildBatches(response, &metadata) + } + output := &ListBuildBatchesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentListBuildBatchesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorListBuildBatches(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListBuildBatchesForProject struct { +} + +func (*awsAwsjson11_deserializeOpListBuildBatchesForProject) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListBuildBatchesForProject) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorListBuildBatchesForProject(response, &metadata) + } + output := &ListBuildBatchesForProjectOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentListBuildBatchesForProjectOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorListBuildBatchesForProject(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListBuilds struct { +} + +func (*awsAwsjson11_deserializeOpListBuilds) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListBuilds) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorListBuilds(response, &metadata) + } + output := &ListBuildsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentListBuildsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorListBuilds(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListBuildsForProject struct { +} + +func (*awsAwsjson11_deserializeOpListBuildsForProject) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListBuildsForProject) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorListBuildsForProject(response, &metadata) + } + output := &ListBuildsForProjectOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentListBuildsForProjectOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorListBuildsForProject(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListCommandExecutionsForSandbox struct { +} + +func (*awsAwsjson11_deserializeOpListCommandExecutionsForSandbox) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListCommandExecutionsForSandbox) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorListCommandExecutionsForSandbox(response, &metadata) + } + output := &ListCommandExecutionsForSandboxOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentListCommandExecutionsForSandboxOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorListCommandExecutionsForSandbox(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListCuratedEnvironmentImages struct { +} + +func (*awsAwsjson11_deserializeOpListCuratedEnvironmentImages) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListCuratedEnvironmentImages) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorListCuratedEnvironmentImages(response, &metadata) + } + output := &ListCuratedEnvironmentImagesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentListCuratedEnvironmentImagesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorListCuratedEnvironmentImages(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListFleets struct { +} + +func (*awsAwsjson11_deserializeOpListFleets) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListFleets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorListFleets(response, &metadata) + } + output := &ListFleetsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentListFleetsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorListFleets(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListProjects struct { +} + +func (*awsAwsjson11_deserializeOpListProjects) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListProjects) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorListProjects(response, &metadata) + } + output := &ListProjectsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentListProjectsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorListProjects(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListReportGroups struct { +} + +func (*awsAwsjson11_deserializeOpListReportGroups) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListReportGroups) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorListReportGroups(response, &metadata) + } + output := &ListReportGroupsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentListReportGroupsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorListReportGroups(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListReports struct { +} + +func (*awsAwsjson11_deserializeOpListReports) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListReports) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorListReports(response, &metadata) + } + output := &ListReportsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentListReportsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorListReports(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListReportsForReportGroup struct { +} + +func (*awsAwsjson11_deserializeOpListReportsForReportGroup) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListReportsForReportGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorListReportsForReportGroup(response, &metadata) + } + output := &ListReportsForReportGroupOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentListReportsForReportGroupOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorListReportsForReportGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListSandboxes struct { +} + +func (*awsAwsjson11_deserializeOpListSandboxes) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListSandboxes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorListSandboxes(response, &metadata) + } + output := &ListSandboxesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentListSandboxesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorListSandboxes(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListSandboxesForProject struct { +} + +func (*awsAwsjson11_deserializeOpListSandboxesForProject) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListSandboxesForProject) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorListSandboxesForProject(response, &metadata) + } + output := &ListSandboxesForProjectOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentListSandboxesForProjectOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorListSandboxesForProject(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListSharedProjects struct { +} + +func (*awsAwsjson11_deserializeOpListSharedProjects) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListSharedProjects) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorListSharedProjects(response, &metadata) + } + output := &ListSharedProjectsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentListSharedProjectsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorListSharedProjects(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListSharedReportGroups struct { +} + +func (*awsAwsjson11_deserializeOpListSharedReportGroups) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListSharedReportGroups) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorListSharedReportGroups(response, &metadata) + } + output := &ListSharedReportGroupsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentListSharedReportGroupsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorListSharedReportGroups(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpListSourceCredentials struct { +} + +func (*awsAwsjson11_deserializeOpListSourceCredentials) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListSourceCredentials) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorListSourceCredentials(response, &metadata) + } + output := &ListSourceCredentialsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentListSourceCredentialsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorListSourceCredentials(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpPutResourcePolicy struct { +} + +func (*awsAwsjson11_deserializeOpPutResourcePolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpPutResourcePolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorPutResourcePolicy(response, &metadata) + } + output := &PutResourcePolicyOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentPutResourcePolicyOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorPutResourcePolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpRetryBuild struct { +} + +func (*awsAwsjson11_deserializeOpRetryBuild) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpRetryBuild) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorRetryBuild(response, &metadata) + } + output := &RetryBuildOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentRetryBuildOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorRetryBuild(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccountLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorAccountLimitExceededException(response, errorBody) + + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpRetryBuildBatch struct { +} + +func (*awsAwsjson11_deserializeOpRetryBuildBatch) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpRetryBuildBatch) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorRetryBuildBatch(response, &metadata) + } + output := &RetryBuildBatchOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentRetryBuildBatchOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorRetryBuildBatch(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpStartBuild struct { +} + +func (*awsAwsjson11_deserializeOpStartBuild) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpStartBuild) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorStartBuild(response, &metadata) + } + output := &StartBuildOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentStartBuildOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorStartBuild(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccountLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorAccountLimitExceededException(response, errorBody) + + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpStartBuildBatch struct { +} + +func (*awsAwsjson11_deserializeOpStartBuildBatch) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpStartBuildBatch) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorStartBuildBatch(response, &metadata) + } + output := &StartBuildBatchOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentStartBuildBatchOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorStartBuildBatch(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpStartCommandExecution struct { +} + +func (*awsAwsjson11_deserializeOpStartCommandExecution) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpStartCommandExecution) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorStartCommandExecution(response, &metadata) + } + output := &StartCommandExecutionOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentStartCommandExecutionOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorStartCommandExecution(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpStartSandbox struct { +} + +func (*awsAwsjson11_deserializeOpStartSandbox) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpStartSandbox) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorStartSandbox(response, &metadata) + } + output := &StartSandboxOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentStartSandboxOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorStartSandbox(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccountSuspendedException", errorCode): + return awsAwsjson11_deserializeErrorAccountSuspendedException(response, errorBody) + + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpStartSandboxConnection struct { +} + +func (*awsAwsjson11_deserializeOpStartSandboxConnection) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpStartSandboxConnection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorStartSandboxConnection(response, &metadata) + } + output := &StartSandboxConnectionOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentStartSandboxConnectionOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorStartSandboxConnection(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpStopBuild struct { +} + +func (*awsAwsjson11_deserializeOpStopBuild) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpStopBuild) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorStopBuild(response, &metadata) + } + output := &StopBuildOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentStopBuildOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorStopBuild(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpStopBuildBatch struct { +} + +func (*awsAwsjson11_deserializeOpStopBuildBatch) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpStopBuildBatch) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorStopBuildBatch(response, &metadata) + } + output := &StopBuildBatchOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentStopBuildBatchOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorStopBuildBatch(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpStopSandbox struct { +} + +func (*awsAwsjson11_deserializeOpStopSandbox) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpStopSandbox) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorStopSandbox(response, &metadata) + } + output := &StopSandboxOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentStopSandboxOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorStopSandbox(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateFleet struct { +} + +func (*awsAwsjson11_deserializeOpUpdateFleet) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateFleet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateFleet(response, &metadata) + } + output := &UpdateFleetOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentUpdateFleetOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorUpdateFleet(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccountLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorAccountLimitExceededException(response, errorBody) + + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateProject struct { +} + +func (*awsAwsjson11_deserializeOpUpdateProject) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateProject) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateProject(response, &metadata) + } + output := &UpdateProjectOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentUpdateProjectOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorUpdateProject(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateProjectVisibility struct { +} + +func (*awsAwsjson11_deserializeOpUpdateProjectVisibility) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateProjectVisibility) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateProjectVisibility(response, &metadata) + } + output := &UpdateProjectVisibilityOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentUpdateProjectVisibilityOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorUpdateProjectVisibility(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateReportGroup struct { +} + +func (*awsAwsjson11_deserializeOpUpdateReportGroup) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateReportGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateReportGroup(response, &metadata) + } + output := &UpdateReportGroupOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentUpdateReportGroupOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorUpdateReportGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateWebhook struct { +} + +func (*awsAwsjson11_deserializeOpUpdateWebhook) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateWebhook) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateWebhook(response, &metadata) + } + output := &UpdateWebhookOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentUpdateWebhookOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorUpdateWebhook(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("OAuthProviderException", errorCode): + return awsAwsjson11_deserializeErrorOAuthProviderException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsAwsjson11_deserializeErrorAccountLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.AccountLimitExceededException{} + err := awsAwsjson11_deserializeDocumentAccountLimitExceededException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorAccountSuspendedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.AccountSuspendedException{} + err := awsAwsjson11_deserializeDocumentAccountSuspendedException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorInvalidInputException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InvalidInputException{} + err := awsAwsjson11_deserializeDocumentInvalidInputException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorOAuthProviderException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.OAuthProviderException{} + err := awsAwsjson11_deserializeDocumentOAuthProviderException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorResourceAlreadyExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ResourceAlreadyExistsException{} + err := awsAwsjson11_deserializeDocumentResourceAlreadyExistsException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ResourceNotFoundException{} + err := awsAwsjson11_deserializeDocumentResourceNotFoundException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeDocumentAccountLimitExceededException(v **types.AccountLimitExceededException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AccountLimitExceededException + if *v == nil { + sv = &types.AccountLimitExceededException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentAccountSuspendedException(v **types.AccountSuspendedException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AccountSuspendedException + if *v == nil { + sv = &types.AccountSuspendedException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentAutoRetryConfig(v **types.AutoRetryConfig, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AutoRetryConfig + if *v == nil { + sv = &types.AutoRetryConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "autoRetryLimit": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected WrapperInt to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.AutoRetryLimit = ptr.Int32(int32(i64)) + } + + case "autoRetryNumber": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected WrapperInt to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.AutoRetryNumber = ptr.Int32(int32(i64)) + } + + case "nextAutoRetry": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextAutoRetry = ptr.String(jtv) + } + + case "previousAutoRetry": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.PreviousAutoRetry = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentBatchRestrictions(v **types.BatchRestrictions, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.BatchRestrictions + if *v == nil { + sv = &types.BatchRestrictions{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "computeTypesAllowed": + if err := awsAwsjson11_deserializeDocumentComputeTypesAllowed(&sv.ComputeTypesAllowed, value); err != nil { + return err + } + + case "fleetsAllowed": + if err := awsAwsjson11_deserializeDocumentFleetsAllowed(&sv.FleetsAllowed, value); err != nil { + return err + } + + case "maximumBuildsAllowed": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected WrapperInt to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaximumBuildsAllowed = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentBuild(v **types.Build, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Build + if *v == nil { + sv = &types.Build{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "artifacts": + if err := awsAwsjson11_deserializeDocumentBuildArtifacts(&sv.Artifacts, value); err != nil { + return err + } + + case "autoRetryConfig": + if err := awsAwsjson11_deserializeDocumentAutoRetryConfig(&sv.AutoRetryConfig, value); err != nil { + return err + } + + case "buildBatchArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.BuildBatchArn = ptr.String(jtv) + } + + case "buildComplete": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.BuildComplete = jtv + } + + case "buildNumber": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected WrapperLong to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.BuildNumber = ptr.Int64(i64) + } + + case "buildStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StatusType to be of type string, got %T instead", value) + } + sv.BuildStatus = types.StatusType(jtv) + } + + case "cache": + if err := awsAwsjson11_deserializeDocumentProjectCache(&sv.Cache, value); err != nil { + return err + } + + case "currentPhase": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.CurrentPhase = ptr.String(jtv) + } + + case "debugSession": + if err := awsAwsjson11_deserializeDocumentDebugSession(&sv.DebugSession, value); err != nil { + return err + } + + case "encryptionKey": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.EncryptionKey = ptr.String(jtv) + } + + case "endTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.EndTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "environment": + if err := awsAwsjson11_deserializeDocumentProjectEnvironment(&sv.Environment, value); err != nil { + return err + } + + case "exportedEnvironmentVariables": + if err := awsAwsjson11_deserializeDocumentExportedEnvironmentVariables(&sv.ExportedEnvironmentVariables, value); err != nil { + return err + } + + case "fileSystemLocations": + if err := awsAwsjson11_deserializeDocumentProjectFileSystemLocations(&sv.FileSystemLocations, value); err != nil { + return err + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "initiator": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Initiator = ptr.String(jtv) + } + + case "logs": + if err := awsAwsjson11_deserializeDocumentLogsLocation(&sv.Logs, value); err != nil { + return err + } + + case "networkInterface": + if err := awsAwsjson11_deserializeDocumentNetworkInterface(&sv.NetworkInterface, value); err != nil { + return err + } + + case "phases": + if err := awsAwsjson11_deserializeDocumentBuildPhases(&sv.Phases, value); err != nil { + return err + } + + case "projectName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.ProjectName = ptr.String(jtv) + } + + case "queuedTimeoutInMinutes": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected WrapperInt to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.QueuedTimeoutInMinutes = ptr.Int32(int32(i64)) + } + + case "reportArns": + if err := awsAwsjson11_deserializeDocumentBuildReportArns(&sv.ReportArns, value); err != nil { + return err + } + + case "resolvedSourceVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.ResolvedSourceVersion = ptr.String(jtv) + } + + case "secondaryArtifacts": + if err := awsAwsjson11_deserializeDocumentBuildArtifactsList(&sv.SecondaryArtifacts, value); err != nil { + return err + } + + case "secondarySources": + if err := awsAwsjson11_deserializeDocumentProjectSources(&sv.SecondarySources, value); err != nil { + return err + } + + case "secondarySourceVersions": + if err := awsAwsjson11_deserializeDocumentProjectSecondarySourceVersions(&sv.SecondarySourceVersions, value); err != nil { + return err + } + + case "serviceRole": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.ServiceRole = ptr.String(jtv) + } + + case "source": + if err := awsAwsjson11_deserializeDocumentProjectSource(&sv.Source, value); err != nil { + return err + } + + case "sourceVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.SourceVersion = ptr.String(jtv) + } + + case "startTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "timeoutInMinutes": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected WrapperInt to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TimeoutInMinutes = ptr.Int32(int32(i64)) + } + + case "vpcConfig": + if err := awsAwsjson11_deserializeDocumentVpcConfig(&sv.VpcConfig, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentBuildArtifacts(v **types.BuildArtifacts, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.BuildArtifacts + if *v == nil { + sv = &types.BuildArtifacts{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "artifactIdentifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ArtifactIdentifier = ptr.String(jtv) + } + + case "bucketOwnerAccess": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BucketOwnerAccess to be of type string, got %T instead", value) + } + sv.BucketOwnerAccess = types.BucketOwnerAccess(jtv) + } + + case "encryptionDisabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected WrapperBoolean to be of type *bool, got %T instead", value) + } + sv.EncryptionDisabled = ptr.Bool(jtv) + } + + case "location": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Location = ptr.String(jtv) + } + + case "md5sum": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Md5sum = ptr.String(jtv) + } + + case "overrideArtifactName": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected WrapperBoolean to be of type *bool, got %T instead", value) + } + sv.OverrideArtifactName = ptr.Bool(jtv) + } + + case "sha256sum": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Sha256sum = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentBuildArtifactsList(v *[]types.BuildArtifacts, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.BuildArtifacts + if *v == nil { + cv = []types.BuildArtifacts{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.BuildArtifacts + destAddr := &col + if err := awsAwsjson11_deserializeDocumentBuildArtifacts(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentBuildBatch(v **types.BuildBatch, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.BuildBatch + if *v == nil { + sv = &types.BuildBatch{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "artifacts": + if err := awsAwsjson11_deserializeDocumentBuildArtifacts(&sv.Artifacts, value); err != nil { + return err + } + + case "buildBatchConfig": + if err := awsAwsjson11_deserializeDocumentProjectBuildBatchConfig(&sv.BuildBatchConfig, value); err != nil { + return err + } + + case "buildBatchNumber": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected WrapperLong to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.BuildBatchNumber = ptr.Int64(i64) + } + + case "buildBatchStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StatusType to be of type string, got %T instead", value) + } + sv.BuildBatchStatus = types.StatusType(jtv) + } + + case "buildGroups": + if err := awsAwsjson11_deserializeDocumentBuildGroups(&sv.BuildGroups, value); err != nil { + return err + } + + case "buildTimeoutInMinutes": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected WrapperInt to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.BuildTimeoutInMinutes = ptr.Int32(int32(i64)) + } + + case "cache": + if err := awsAwsjson11_deserializeDocumentProjectCache(&sv.Cache, value); err != nil { + return err + } + + case "complete": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.Complete = jtv + } + + case "currentPhase": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.CurrentPhase = ptr.String(jtv) + } + + case "debugSessionEnabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected WrapperBoolean to be of type *bool, got %T instead", value) + } + sv.DebugSessionEnabled = ptr.Bool(jtv) + } + + case "encryptionKey": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.EncryptionKey = ptr.String(jtv) + } + + case "endTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.EndTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "environment": + if err := awsAwsjson11_deserializeDocumentProjectEnvironment(&sv.Environment, value); err != nil { + return err + } + + case "fileSystemLocations": + if err := awsAwsjson11_deserializeDocumentProjectFileSystemLocations(&sv.FileSystemLocations, value); err != nil { + return err + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "initiator": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Initiator = ptr.String(jtv) + } + + case "logConfig": + if err := awsAwsjson11_deserializeDocumentLogsConfig(&sv.LogConfig, value); err != nil { + return err + } + + case "phases": + if err := awsAwsjson11_deserializeDocumentBuildBatchPhases(&sv.Phases, value); err != nil { + return err + } + + case "projectName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.ProjectName = ptr.String(jtv) + } + + case "queuedTimeoutInMinutes": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected WrapperInt to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.QueuedTimeoutInMinutes = ptr.Int32(int32(i64)) + } + + case "reportArns": + if err := awsAwsjson11_deserializeDocumentBuildReportArns(&sv.ReportArns, value); err != nil { + return err + } + + case "resolvedSourceVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.ResolvedSourceVersion = ptr.String(jtv) + } + + case "secondaryArtifacts": + if err := awsAwsjson11_deserializeDocumentBuildArtifactsList(&sv.SecondaryArtifacts, value); err != nil { + return err + } + + case "secondarySources": + if err := awsAwsjson11_deserializeDocumentProjectSources(&sv.SecondarySources, value); err != nil { + return err + } + + case "secondarySourceVersions": + if err := awsAwsjson11_deserializeDocumentProjectSecondarySourceVersions(&sv.SecondarySourceVersions, value); err != nil { + return err + } + + case "serviceRole": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.ServiceRole = ptr.String(jtv) + } + + case "source": + if err := awsAwsjson11_deserializeDocumentProjectSource(&sv.Source, value); err != nil { + return err + } + + case "sourceVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.SourceVersion = ptr.String(jtv) + } + + case "startTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "vpcConfig": + if err := awsAwsjson11_deserializeDocumentVpcConfig(&sv.VpcConfig, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentBuildBatches(v *[]types.BuildBatch, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.BuildBatch + if *v == nil { + cv = []types.BuildBatch{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.BuildBatch + destAddr := &col + if err := awsAwsjson11_deserializeDocumentBuildBatch(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentBuildBatchIds(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentBuildBatchPhase(v **types.BuildBatchPhase, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.BuildBatchPhase + if *v == nil { + sv = &types.BuildBatchPhase{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "contexts": + if err := awsAwsjson11_deserializeDocumentPhaseContexts(&sv.Contexts, value); err != nil { + return err + } + + case "durationInSeconds": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected WrapperLong to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.DurationInSeconds = ptr.Int64(i64) + } + + case "endTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.EndTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "phaseStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StatusType to be of type string, got %T instead", value) + } + sv.PhaseStatus = types.StatusType(jtv) + } + + case "phaseType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BuildBatchPhaseType to be of type string, got %T instead", value) + } + sv.PhaseType = types.BuildBatchPhaseType(jtv) + } + + case "startTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentBuildBatchPhases(v *[]types.BuildBatchPhase, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.BuildBatchPhase + if *v == nil { + cv = []types.BuildBatchPhase{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.BuildBatchPhase + destAddr := &col + if err := awsAwsjson11_deserializeDocumentBuildBatchPhase(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentBuildGroup(v **types.BuildGroup, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.BuildGroup + if *v == nil { + sv = &types.BuildGroup{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "currentBuildSummary": + if err := awsAwsjson11_deserializeDocumentBuildSummary(&sv.CurrentBuildSummary, value); err != nil { + return err + } + + case "dependsOn": + if err := awsAwsjson11_deserializeDocumentIdentifiers(&sv.DependsOn, value); err != nil { + return err + } + + case "identifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Identifier = ptr.String(jtv) + } + + case "ignoreFailure": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.IgnoreFailure = jtv + } + + case "priorBuildSummaryList": + if err := awsAwsjson11_deserializeDocumentBuildSummaries(&sv.PriorBuildSummaryList, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentBuildGroups(v *[]types.BuildGroup, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.BuildGroup + if *v == nil { + cv = []types.BuildGroup{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.BuildGroup + destAddr := &col + if err := awsAwsjson11_deserializeDocumentBuildGroup(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentBuildIds(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentBuildNotDeleted(v **types.BuildNotDeleted, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.BuildNotDeleted + if *v == nil { + sv = &types.BuildNotDeleted{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "statusCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.StatusCode = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentBuildPhase(v **types.BuildPhase, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.BuildPhase + if *v == nil { + sv = &types.BuildPhase{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "contexts": + if err := awsAwsjson11_deserializeDocumentPhaseContexts(&sv.Contexts, value); err != nil { + return err + } + + case "durationInSeconds": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected WrapperLong to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.DurationInSeconds = ptr.Int64(i64) + } + + case "endTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.EndTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "phaseStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StatusType to be of type string, got %T instead", value) + } + sv.PhaseStatus = types.StatusType(jtv) + } + + case "phaseType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BuildPhaseType to be of type string, got %T instead", value) + } + sv.PhaseType = types.BuildPhaseType(jtv) + } + + case "startTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentBuildPhases(v *[]types.BuildPhase, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.BuildPhase + if *v == nil { + cv = []types.BuildPhase{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.BuildPhase + destAddr := &col + if err := awsAwsjson11_deserializeDocumentBuildPhase(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentBuildReportArns(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentBuilds(v *[]types.Build, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Build + if *v == nil { + cv = []types.Build{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Build + destAddr := &col + if err := awsAwsjson11_deserializeDocumentBuild(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentBuildsNotDeleted(v *[]types.BuildNotDeleted, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.BuildNotDeleted + if *v == nil { + cv = []types.BuildNotDeleted{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.BuildNotDeleted + destAddr := &col + if err := awsAwsjson11_deserializeDocumentBuildNotDeleted(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentBuildStatusConfig(v **types.BuildStatusConfig, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.BuildStatusConfig + if *v == nil { + sv = &types.BuildStatusConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "context": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Context = ptr.String(jtv) + } + + case "targetUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.TargetUrl = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentBuildSummaries(v *[]types.BuildSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.BuildSummary + if *v == nil { + cv = []types.BuildSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.BuildSummary + destAddr := &col + if err := awsAwsjson11_deserializeDocumentBuildSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentBuildSummary(v **types.BuildSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.BuildSummary + if *v == nil { + sv = &types.BuildSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "buildStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StatusType to be of type string, got %T instead", value) + } + sv.BuildStatus = types.StatusType(jtv) + } + + case "primaryArtifact": + if err := awsAwsjson11_deserializeDocumentResolvedArtifact(&sv.PrimaryArtifact, value); err != nil { + return err + } + + case "requestedOn": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.RequestedOn = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "secondaryArtifacts": + if err := awsAwsjson11_deserializeDocumentResolvedSecondaryArtifacts(&sv.SecondaryArtifacts, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentCloudWatchLogsConfig(v **types.CloudWatchLogsConfig, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.CloudWatchLogsConfig + if *v == nil { + sv = &types.CloudWatchLogsConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "groupName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.GroupName = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LogsConfigStatusType to be of type string, got %T instead", value) + } + sv.Status = types.LogsConfigStatusType(jtv) + } + + case "streamName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.StreamName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentCodeCoverage(v **types.CodeCoverage, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.CodeCoverage + if *v == nil { + sv = &types.CodeCoverage{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "branchCoveragePercentage": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.BranchCoveragePercentage = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.BranchCoveragePercentage = ptr.Float64(f64) + + default: + return fmt.Errorf("expected Percentage to be a JSON Number, got %T instead", value) + + } + } + + case "branchesCovered": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected NonNegativeInt to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.BranchesCovered = ptr.Int32(int32(i64)) + } + + case "branchesMissed": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected NonNegativeInt to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.BranchesMissed = ptr.Int32(int32(i64)) + } + + case "expired": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Expired = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "filePath": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.FilePath = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "lineCoveragePercentage": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LineCoveragePercentage = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.LineCoveragePercentage = ptr.Float64(f64) + + default: + return fmt.Errorf("expected Percentage to be a JSON Number, got %T instead", value) + + } + } + + case "linesCovered": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected NonNegativeInt to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.LinesCovered = ptr.Int32(int32(i64)) + } + + case "linesMissed": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected NonNegativeInt to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.LinesMissed = ptr.Int32(int32(i64)) + } + + case "reportARN": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.ReportARN = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentCodeCoverageReportSummary(v **types.CodeCoverageReportSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.CodeCoverageReportSummary + if *v == nil { + sv = &types.CodeCoverageReportSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "branchCoveragePercentage": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.BranchCoveragePercentage = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.BranchCoveragePercentage = ptr.Float64(f64) + + default: + return fmt.Errorf("expected Percentage to be a JSON Number, got %T instead", value) + + } + } + + case "branchesCovered": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected NonNegativeInt to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.BranchesCovered = ptr.Int32(int32(i64)) + } + + case "branchesMissed": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected NonNegativeInt to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.BranchesMissed = ptr.Int32(int32(i64)) + } + + case "lineCoveragePercentage": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LineCoveragePercentage = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.LineCoveragePercentage = ptr.Float64(f64) + + default: + return fmt.Errorf("expected Percentage to be a JSON Number, got %T instead", value) + + } + } + + case "linesCovered": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected NonNegativeInt to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.LinesCovered = ptr.Int32(int32(i64)) + } + + case "linesMissed": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected NonNegativeInt to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.LinesMissed = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentCodeCoverages(v *[]types.CodeCoverage, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.CodeCoverage + if *v == nil { + cv = []types.CodeCoverage{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.CodeCoverage + destAddr := &col + if err := awsAwsjson11_deserializeDocumentCodeCoverage(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentCommandExecution(v **types.CommandExecution, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.CommandExecution + if *v == nil { + sv = &types.CommandExecution{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "command": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SensitiveNonEmptyString to be of type string, got %T instead", value) + } + sv.Command = ptr.String(jtv) + } + + case "endTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.EndTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "exitCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.ExitCode = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "logs": + if err := awsAwsjson11_deserializeDocumentLogsLocation(&sv.Logs, value); err != nil { + return err + } + + case "sandboxArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.SandboxArn = ptr.String(jtv) + } + + case "sandboxId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.SandboxId = ptr.String(jtv) + } + + case "standardErrContent": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SensitiveNonEmptyString to be of type string, got %T instead", value) + } + sv.StandardErrContent = ptr.String(jtv) + } + + case "standardOutputContent": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SensitiveNonEmptyString to be of type string, got %T instead", value) + } + sv.StandardOutputContent = ptr.String(jtv) + } + + case "startTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.Status = ptr.String(jtv) + } + + case "submitTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.SubmitTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CommandType to be of type string, got %T instead", value) + } + sv.Type = types.CommandType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentCommandExecutionIds(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentCommandExecutions(v *[]types.CommandExecution, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.CommandExecution + if *v == nil { + cv = []types.CommandExecution{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.CommandExecution + destAddr := &col + if err := awsAwsjson11_deserializeDocumentCommandExecution(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentComputeConfiguration(v **types.ComputeConfiguration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ComputeConfiguration + if *v == nil { + sv = &types.ComputeConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "disk": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected WrapperLong to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Disk = ptr.Int64(i64) + } + + case "instanceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.InstanceType = ptr.String(jtv) + } + + case "machineType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MachineType to be of type string, got %T instead", value) + } + sv.MachineType = types.MachineType(jtv) + } + + case "memory": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected WrapperLong to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Memory = ptr.Int64(i64) + } + + case "vCpu": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected WrapperLong to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.VCpu = ptr.Int64(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentComputeTypesAllowed(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentDebugSession(v **types.DebugSession, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DebugSession + if *v == nil { + sv = &types.DebugSession{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "sessionEnabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected WrapperBoolean to be of type *bool, got %T instead", value) + } + sv.SessionEnabled = ptr.Bool(jtv) + } + + case "sessionTarget": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.SessionTarget = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentDockerServer(v **types.DockerServer, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DockerServer + if *v == nil { + sv = &types.DockerServer{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "computeType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ComputeType to be of type string, got %T instead", value) + } + sv.ComputeType = types.ComputeType(jtv) + } + + case "securityGroupIds": + if err := awsAwsjson11_deserializeDocumentSecurityGroupIds(&sv.SecurityGroupIds, value); err != nil { + return err + } + + case "status": + if err := awsAwsjson11_deserializeDocumentDockerServerStatus(&sv.Status, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentDockerServerStatus(v **types.DockerServerStatus, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DockerServerStatus + if *v == nil { + sv = &types.DockerServerStatus{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Status = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentEnvironmentImage(v **types.EnvironmentImage, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.EnvironmentImage + if *v == nil { + sv = &types.EnvironmentImage{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "versions": + if err := awsAwsjson11_deserializeDocumentImageVersions(&sv.Versions, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentEnvironmentImages(v *[]types.EnvironmentImage, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.EnvironmentImage + if *v == nil { + cv = []types.EnvironmentImage{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.EnvironmentImage + destAddr := &col + if err := awsAwsjson11_deserializeDocumentEnvironmentImage(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentEnvironmentLanguage(v **types.EnvironmentLanguage, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.EnvironmentLanguage + if *v == nil { + sv = &types.EnvironmentLanguage{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "images": + if err := awsAwsjson11_deserializeDocumentEnvironmentImages(&sv.Images, value); err != nil { + return err + } + + case "language": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LanguageType to be of type string, got %T instead", value) + } + sv.Language = types.LanguageType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentEnvironmentLanguages(v *[]types.EnvironmentLanguage, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.EnvironmentLanguage + if *v == nil { + cv = []types.EnvironmentLanguage{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.EnvironmentLanguage + destAddr := &col + if err := awsAwsjson11_deserializeDocumentEnvironmentLanguage(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentEnvironmentPlatform(v **types.EnvironmentPlatform, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.EnvironmentPlatform + if *v == nil { + sv = &types.EnvironmentPlatform{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "languages": + if err := awsAwsjson11_deserializeDocumentEnvironmentLanguages(&sv.Languages, value); err != nil { + return err + } + + case "platform": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PlatformType to be of type string, got %T instead", value) + } + sv.Platform = types.PlatformType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentEnvironmentPlatforms(v *[]types.EnvironmentPlatform, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.EnvironmentPlatform + if *v == nil { + cv = []types.EnvironmentPlatform{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.EnvironmentPlatform + destAddr := &col + if err := awsAwsjson11_deserializeDocumentEnvironmentPlatform(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentEnvironmentVariable(v **types.EnvironmentVariable, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.EnvironmentVariable + if *v == nil { + sv = &types.EnvironmentVariable{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnvironmentVariableType to be of type string, got %T instead", value) + } + sv.Type = types.EnvironmentVariableType(jtv) + } + + case "value": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Value = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentEnvironmentVariables(v *[]types.EnvironmentVariable, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.EnvironmentVariable + if *v == nil { + cv = []types.EnvironmentVariable{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.EnvironmentVariable + destAddr := &col + if err := awsAwsjson11_deserializeDocumentEnvironmentVariable(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentExportedEnvironmentVariable(v **types.ExportedEnvironmentVariable, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ExportedEnvironmentVariable + if *v == nil { + sv = &types.ExportedEnvironmentVariable{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "value": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Value = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentExportedEnvironmentVariables(v *[]types.ExportedEnvironmentVariable, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ExportedEnvironmentVariable + if *v == nil { + cv = []types.ExportedEnvironmentVariable{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ExportedEnvironmentVariable + destAddr := &col + if err := awsAwsjson11_deserializeDocumentExportedEnvironmentVariable(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentFilterGroup(v *[]types.WebhookFilter, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.WebhookFilter + if *v == nil { + cv = []types.WebhookFilter{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.WebhookFilter + destAddr := &col + if err := awsAwsjson11_deserializeDocumentWebhookFilter(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentFilterGroups(v *[][]types.WebhookFilter, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv [][]types.WebhookFilter + if *v == nil { + cv = [][]types.WebhookFilter{} + } else { + cv = *v + } + + for _, value := range shape { + var col []types.WebhookFilter + if err := awsAwsjson11_deserializeDocumentFilterGroup(&col, value); err != nil { + return err + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentFleet(v **types.Fleet, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Fleet + if *v == nil { + sv = &types.Fleet{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "baseCapacity": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected FleetCapacity to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.BaseCapacity = ptr.Int32(int32(i64)) + } + + case "computeConfiguration": + if err := awsAwsjson11_deserializeDocumentComputeConfiguration(&sv.ComputeConfiguration, value); err != nil { + return err + } + + case "computeType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ComputeType to be of type string, got %T instead", value) + } + sv.ComputeType = types.ComputeType(jtv) + } + + case "created": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Created = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "environmentType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnvironmentType to be of type string, got %T instead", value) + } + sv.EnvironmentType = types.EnvironmentType(jtv) + } + + case "fleetServiceRole": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.FleetServiceRole = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "imageId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.ImageId = ptr.String(jtv) + } + + case "lastModified": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastModified = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FleetName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "overflowBehavior": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FleetOverflowBehavior to be of type string, got %T instead", value) + } + sv.OverflowBehavior = types.FleetOverflowBehavior(jtv) + } + + case "proxyConfiguration": + if err := awsAwsjson11_deserializeDocumentProxyConfiguration(&sv.ProxyConfiguration, value); err != nil { + return err + } + + case "scalingConfiguration": + if err := awsAwsjson11_deserializeDocumentScalingConfigurationOutput(&sv.ScalingConfiguration, value); err != nil { + return err + } + + case "status": + if err := awsAwsjson11_deserializeDocumentFleetStatus(&sv.Status, value); err != nil { + return err + } + + case "tags": + if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil { + return err + } + + case "vpcConfig": + if err := awsAwsjson11_deserializeDocumentVpcConfig(&sv.VpcConfig, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentFleetArns(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentFleetNames(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentFleetProxyRule(v **types.FleetProxyRule, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.FleetProxyRule + if *v == nil { + sv = &types.FleetProxyRule{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "effect": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FleetProxyRuleEffectType to be of type string, got %T instead", value) + } + sv.Effect = types.FleetProxyRuleEffectType(jtv) + } + + case "entities": + if err := awsAwsjson11_deserializeDocumentFleetProxyRuleEntities(&sv.Entities, value); err != nil { + return err + } + + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FleetProxyRuleType to be of type string, got %T instead", value) + } + sv.Type = types.FleetProxyRuleType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentFleetProxyRuleEntities(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentFleetProxyRules(v *[]types.FleetProxyRule, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.FleetProxyRule + if *v == nil { + cv = []types.FleetProxyRule{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.FleetProxyRule + destAddr := &col + if err := awsAwsjson11_deserializeDocumentFleetProxyRule(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentFleets(v *[]types.Fleet, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Fleet + if *v == nil { + cv = []types.Fleet{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Fleet + destAddr := &col + if err := awsAwsjson11_deserializeDocumentFleet(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentFleetsAllowed(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentFleetStatus(v **types.FleetStatus, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.FleetStatus + if *v == nil { + sv = &types.FleetStatus{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "context": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FleetContextCode to be of type string, got %T instead", value) + } + sv.Context = types.FleetContextCode(jtv) + } + + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "statusCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FleetStatusCode to be of type string, got %T instead", value) + } + sv.StatusCode = types.FleetStatusCode(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentGitSubmodulesConfig(v **types.GitSubmodulesConfig, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.GitSubmodulesConfig + if *v == nil { + sv = &types.GitSubmodulesConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "fetchSubmodules": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected WrapperBoolean to be of type *bool, got %T instead", value) + } + sv.FetchSubmodules = ptr.Bool(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentIdentifiers(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentImageVersions(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentInvalidInputException(v **types.InvalidInputException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidInputException + if *v == nil { + sv = &types.InvalidInputException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentLogsConfig(v **types.LogsConfig, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.LogsConfig + if *v == nil { + sv = &types.LogsConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "cloudWatchLogs": + if err := awsAwsjson11_deserializeDocumentCloudWatchLogsConfig(&sv.CloudWatchLogs, value); err != nil { + return err + } + + case "s3Logs": + if err := awsAwsjson11_deserializeDocumentS3LogsConfig(&sv.S3Logs, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentLogsLocation(v **types.LogsLocation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.LogsLocation + if *v == nil { + sv = &types.LogsLocation{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "cloudWatchLogs": + if err := awsAwsjson11_deserializeDocumentCloudWatchLogsConfig(&sv.CloudWatchLogs, value); err != nil { + return err + } + + case "cloudWatchLogsArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.CloudWatchLogsArn = ptr.String(jtv) + } + + case "deepLink": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.DeepLink = ptr.String(jtv) + } + + case "groupName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.GroupName = ptr.String(jtv) + } + + case "s3DeepLink": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.S3DeepLink = ptr.String(jtv) + } + + case "s3Logs": + if err := awsAwsjson11_deserializeDocumentS3LogsConfig(&sv.S3Logs, value); err != nil { + return err + } + + case "s3LogsArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.S3LogsArn = ptr.String(jtv) + } + + case "streamName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.StreamName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentNetworkInterface(v **types.NetworkInterface, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.NetworkInterface + if *v == nil { + sv = &types.NetworkInterface{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "networkInterfaceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.NetworkInterfaceId = ptr.String(jtv) + } + + case "subnetId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.SubnetId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentOAuthProviderException(v **types.OAuthProviderException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.OAuthProviderException + if *v == nil { + sv = &types.OAuthProviderException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentPhaseContext(v **types.PhaseContext, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.PhaseContext + if *v == nil { + sv = &types.PhaseContext{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "statusCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.StatusCode = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentPhaseContexts(v *[]types.PhaseContext, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.PhaseContext + if *v == nil { + cv = []types.PhaseContext{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.PhaseContext + destAddr := &col + if err := awsAwsjson11_deserializeDocumentPhaseContext(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentProject(v **types.Project, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Project + if *v == nil { + sv = &types.Project{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "artifacts": + if err := awsAwsjson11_deserializeDocumentProjectArtifacts(&sv.Artifacts, value); err != nil { + return err + } + + case "autoRetryLimit": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected WrapperInt to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.AutoRetryLimit = ptr.Int32(int32(i64)) + } + + case "badge": + if err := awsAwsjson11_deserializeDocumentProjectBadge(&sv.Badge, value); err != nil { + return err + } + + case "buildBatchConfig": + if err := awsAwsjson11_deserializeDocumentProjectBuildBatchConfig(&sv.BuildBatchConfig, value); err != nil { + return err + } + + case "cache": + if err := awsAwsjson11_deserializeDocumentProjectCache(&sv.Cache, value); err != nil { + return err + } + + case "concurrentBuildLimit": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected WrapperInt to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ConcurrentBuildLimit = ptr.Int32(int32(i64)) + } + + case "created": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Created = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProjectDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "encryptionKey": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.EncryptionKey = ptr.String(jtv) + } + + case "environment": + if err := awsAwsjson11_deserializeDocumentProjectEnvironment(&sv.Environment, value); err != nil { + return err + } + + case "fileSystemLocations": + if err := awsAwsjson11_deserializeDocumentProjectFileSystemLocations(&sv.FileSystemLocations, value); err != nil { + return err + } + + case "lastModified": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastModified = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "logsConfig": + if err := awsAwsjson11_deserializeDocumentLogsConfig(&sv.LogsConfig, value); err != nil { + return err + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProjectName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "projectVisibility": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProjectVisibilityType to be of type string, got %T instead", value) + } + sv.ProjectVisibility = types.ProjectVisibilityType(jtv) + } + + case "publicProjectAlias": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.PublicProjectAlias = ptr.String(jtv) + } + + case "queuedTimeoutInMinutes": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected TimeOut to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.QueuedTimeoutInMinutes = ptr.Int32(int32(i64)) + } + + case "resourceAccessRole": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.ResourceAccessRole = ptr.String(jtv) + } + + case "secondaryArtifacts": + if err := awsAwsjson11_deserializeDocumentProjectArtifactsList(&sv.SecondaryArtifacts, value); err != nil { + return err + } + + case "secondarySources": + if err := awsAwsjson11_deserializeDocumentProjectSources(&sv.SecondarySources, value); err != nil { + return err + } + + case "secondarySourceVersions": + if err := awsAwsjson11_deserializeDocumentProjectSecondarySourceVersions(&sv.SecondarySourceVersions, value); err != nil { + return err + } + + case "serviceRole": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.ServiceRole = ptr.String(jtv) + } + + case "source": + if err := awsAwsjson11_deserializeDocumentProjectSource(&sv.Source, value); err != nil { + return err + } + + case "sourceVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.SourceVersion = ptr.String(jtv) + } + + case "tags": + if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil { + return err + } + + case "timeoutInMinutes": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected BuildTimeOut to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TimeoutInMinutes = ptr.Int32(int32(i64)) + } + + case "vpcConfig": + if err := awsAwsjson11_deserializeDocumentVpcConfig(&sv.VpcConfig, value); err != nil { + return err + } + + case "webhook": + if err := awsAwsjson11_deserializeDocumentWebhook(&sv.Webhook, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentProjectArns(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentProjectArtifacts(v **types.ProjectArtifacts, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ProjectArtifacts + if *v == nil { + sv = &types.ProjectArtifacts{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "artifactIdentifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ArtifactIdentifier = ptr.String(jtv) + } + + case "bucketOwnerAccess": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BucketOwnerAccess to be of type string, got %T instead", value) + } + sv.BucketOwnerAccess = types.BucketOwnerAccess(jtv) + } + + case "encryptionDisabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected WrapperBoolean to be of type *bool, got %T instead", value) + } + sv.EncryptionDisabled = ptr.Bool(jtv) + } + + case "location": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Location = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "namespaceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ArtifactNamespace to be of type string, got %T instead", value) + } + sv.NamespaceType = types.ArtifactNamespace(jtv) + } + + case "overrideArtifactName": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected WrapperBoolean to be of type *bool, got %T instead", value) + } + sv.OverrideArtifactName = ptr.Bool(jtv) + } + + case "packaging": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ArtifactPackaging to be of type string, got %T instead", value) + } + sv.Packaging = types.ArtifactPackaging(jtv) + } + + case "path": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Path = ptr.String(jtv) + } + + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ArtifactsType to be of type string, got %T instead", value) + } + sv.Type = types.ArtifactsType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentProjectArtifactsList(v *[]types.ProjectArtifacts, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ProjectArtifacts + if *v == nil { + cv = []types.ProjectArtifacts{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ProjectArtifacts + destAddr := &col + if err := awsAwsjson11_deserializeDocumentProjectArtifacts(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentProjectBadge(v **types.ProjectBadge, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ProjectBadge + if *v == nil { + sv = &types.ProjectBadge{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "badgeEnabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.BadgeEnabled = jtv + } + + case "badgeRequestUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.BadgeRequestUrl = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentProjectBuildBatchConfig(v **types.ProjectBuildBatchConfig, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ProjectBuildBatchConfig + if *v == nil { + sv = &types.ProjectBuildBatchConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "batchReportMode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BatchReportModeType to be of type string, got %T instead", value) + } + sv.BatchReportMode = types.BatchReportModeType(jtv) + } + + case "combineArtifacts": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected WrapperBoolean to be of type *bool, got %T instead", value) + } + sv.CombineArtifacts = ptr.Bool(jtv) + } + + case "restrictions": + if err := awsAwsjson11_deserializeDocumentBatchRestrictions(&sv.Restrictions, value); err != nil { + return err + } + + case "serviceRole": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.ServiceRole = ptr.String(jtv) + } + + case "timeoutInMins": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected WrapperInt to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TimeoutInMins = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentProjectCache(v **types.ProjectCache, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ProjectCache + if *v == nil { + sv = &types.ProjectCache{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "cacheNamespace": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.CacheNamespace = ptr.String(jtv) + } + + case "location": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Location = ptr.String(jtv) + } + + case "modes": + if err := awsAwsjson11_deserializeDocumentProjectCacheModes(&sv.Modes, value); err != nil { + return err + } + + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CacheType to be of type string, got %T instead", value) + } + sv.Type = types.CacheType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentProjectCacheModes(v *[]types.CacheMode, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.CacheMode + if *v == nil { + cv = []types.CacheMode{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.CacheMode + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CacheMode to be of type string, got %T instead", value) + } + col = types.CacheMode(jtv) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentProjectEnvironment(v **types.ProjectEnvironment, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ProjectEnvironment + if *v == nil { + sv = &types.ProjectEnvironment{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "certificate": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Certificate = ptr.String(jtv) + } + + case "computeConfiguration": + if err := awsAwsjson11_deserializeDocumentComputeConfiguration(&sv.ComputeConfiguration, value); err != nil { + return err + } + + case "computeType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ComputeType to be of type string, got %T instead", value) + } + sv.ComputeType = types.ComputeType(jtv) + } + + case "dockerServer": + if err := awsAwsjson11_deserializeDocumentDockerServer(&sv.DockerServer, value); err != nil { + return err + } + + case "environmentVariables": + if err := awsAwsjson11_deserializeDocumentEnvironmentVariables(&sv.EnvironmentVariables, value); err != nil { + return err + } + + case "fleet": + if err := awsAwsjson11_deserializeDocumentProjectFleet(&sv.Fleet, value); err != nil { + return err + } + + case "image": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.Image = ptr.String(jtv) + } + + case "imagePullCredentialsType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ImagePullCredentialsType to be of type string, got %T instead", value) + } + sv.ImagePullCredentialsType = types.ImagePullCredentialsType(jtv) + } + + case "privilegedMode": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected WrapperBoolean to be of type *bool, got %T instead", value) + } + sv.PrivilegedMode = ptr.Bool(jtv) + } + + case "registryCredential": + if err := awsAwsjson11_deserializeDocumentRegistryCredential(&sv.RegistryCredential, value); err != nil { + return err + } + + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnvironmentType to be of type string, got %T instead", value) + } + sv.Type = types.EnvironmentType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentProjectFileSystemLocation(v **types.ProjectFileSystemLocation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ProjectFileSystemLocation + if *v == nil { + sv = &types.ProjectFileSystemLocation{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "identifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Identifier = ptr.String(jtv) + } + + case "location": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Location = ptr.String(jtv) + } + + case "mountOptions": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.MountOptions = ptr.String(jtv) + } + + case "mountPoint": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.MountPoint = ptr.String(jtv) + } + + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FileSystemType to be of type string, got %T instead", value) + } + sv.Type = types.FileSystemType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentProjectFileSystemLocations(v *[]types.ProjectFileSystemLocation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ProjectFileSystemLocation + if *v == nil { + cv = []types.ProjectFileSystemLocation{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ProjectFileSystemLocation + destAddr := &col + if err := awsAwsjson11_deserializeDocumentProjectFileSystemLocation(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentProjectFleet(v **types.ProjectFleet, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ProjectFleet + if *v == nil { + sv = &types.ProjectFleet{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "fleetArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.FleetArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentProjectNames(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentProjects(v *[]types.Project, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Project + if *v == nil { + cv = []types.Project{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Project + destAddr := &col + if err := awsAwsjson11_deserializeDocumentProject(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentProjectSecondarySourceVersions(v *[]types.ProjectSourceVersion, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ProjectSourceVersion + if *v == nil { + cv = []types.ProjectSourceVersion{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ProjectSourceVersion + destAddr := &col + if err := awsAwsjson11_deserializeDocumentProjectSourceVersion(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentProjectSource(v **types.ProjectSource, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ProjectSource + if *v == nil { + sv = &types.ProjectSource{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "auth": + if err := awsAwsjson11_deserializeDocumentSourceAuth(&sv.Auth, value); err != nil { + return err + } + + case "buildspec": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Buildspec = ptr.String(jtv) + } + + case "buildStatusConfig": + if err := awsAwsjson11_deserializeDocumentBuildStatusConfig(&sv.BuildStatusConfig, value); err != nil { + return err + } + + case "gitCloneDepth": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected GitCloneDepth to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.GitCloneDepth = ptr.Int32(int32(i64)) + } + + case "gitSubmodulesConfig": + if err := awsAwsjson11_deserializeDocumentGitSubmodulesConfig(&sv.GitSubmodulesConfig, value); err != nil { + return err + } + + case "insecureSsl": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected WrapperBoolean to be of type *bool, got %T instead", value) + } + sv.InsecureSsl = ptr.Bool(jtv) + } + + case "location": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Location = ptr.String(jtv) + } + + case "reportBuildStatus": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected WrapperBoolean to be of type *bool, got %T instead", value) + } + sv.ReportBuildStatus = ptr.Bool(jtv) + } + + case "sourceIdentifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.SourceIdentifier = ptr.String(jtv) + } + + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SourceType to be of type string, got %T instead", value) + } + sv.Type = types.SourceType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentProjectSources(v *[]types.ProjectSource, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ProjectSource + if *v == nil { + cv = []types.ProjectSource{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ProjectSource + destAddr := &col + if err := awsAwsjson11_deserializeDocumentProjectSource(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentProjectSourceVersion(v **types.ProjectSourceVersion, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ProjectSourceVersion + if *v == nil { + sv = &types.ProjectSourceVersion{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "sourceIdentifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.SourceIdentifier = ptr.String(jtv) + } + + case "sourceVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.SourceVersion = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentProxyConfiguration(v **types.ProxyConfiguration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ProxyConfiguration + if *v == nil { + sv = &types.ProxyConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "defaultBehavior": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FleetProxyRuleBehavior to be of type string, got %T instead", value) + } + sv.DefaultBehavior = types.FleetProxyRuleBehavior(jtv) + } + + case "orderedProxyRules": + if err := awsAwsjson11_deserializeDocumentFleetProxyRules(&sv.OrderedProxyRules, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentPullRequestBuildApproverRoles(v *[]types.PullRequestBuildApproverRole, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.PullRequestBuildApproverRole + if *v == nil { + cv = []types.PullRequestBuildApproverRole{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.PullRequestBuildApproverRole + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PullRequestBuildApproverRole to be of type string, got %T instead", value) + } + col = types.PullRequestBuildApproverRole(jtv) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentPullRequestBuildPolicy(v **types.PullRequestBuildPolicy, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.PullRequestBuildPolicy + if *v == nil { + sv = &types.PullRequestBuildPolicy{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "approverRoles": + if err := awsAwsjson11_deserializeDocumentPullRequestBuildApproverRoles(&sv.ApproverRoles, value); err != nil { + return err + } + + case "requiresCommentApproval": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PullRequestBuildCommentApproval to be of type string, got %T instead", value) + } + sv.RequiresCommentApproval = types.PullRequestBuildCommentApproval(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentRegistryCredential(v **types.RegistryCredential, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.RegistryCredential + if *v == nil { + sv = &types.RegistryCredential{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "credential": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.Credential = ptr.String(jtv) + } + + case "credentialProvider": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CredentialProviderType to be of type string, got %T instead", value) + } + sv.CredentialProvider = types.CredentialProviderType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentReport(v **types.Report, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Report + if *v == nil { + sv = &types.Report{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "codeCoverageSummary": + if err := awsAwsjson11_deserializeDocumentCodeCoverageReportSummary(&sv.CodeCoverageSummary, value); err != nil { + return err + } + + case "created": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Created = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "executionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ExecutionId = ptr.String(jtv) + } + + case "expired": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Expired = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "exportConfig": + if err := awsAwsjson11_deserializeDocumentReportExportConfig(&sv.ExportConfig, value); err != nil { + return err + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "reportGroupArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.ReportGroupArn = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReportStatusType to be of type string, got %T instead", value) + } + sv.Status = types.ReportStatusType(jtv) + } + + case "testSummary": + if err := awsAwsjson11_deserializeDocumentTestReportSummary(&sv.TestSummary, value); err != nil { + return err + } + + case "truncated": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected WrapperBoolean to be of type *bool, got %T instead", value) + } + sv.Truncated = ptr.Bool(jtv) + } + + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReportType to be of type string, got %T instead", value) + } + sv.Type = types.ReportType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentReportArns(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentReportExportConfig(v **types.ReportExportConfig, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ReportExportConfig + if *v == nil { + sv = &types.ReportExportConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "exportConfigType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReportExportConfigType to be of type string, got %T instead", value) + } + sv.ExportConfigType = types.ReportExportConfigType(jtv) + } + + case "s3Destination": + if err := awsAwsjson11_deserializeDocumentS3ReportExportConfig(&sv.S3Destination, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentReportGroup(v **types.ReportGroup, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ReportGroup + if *v == nil { + sv = &types.ReportGroup{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "created": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Created = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "exportConfig": + if err := awsAwsjson11_deserializeDocumentReportExportConfig(&sv.ExportConfig, value); err != nil { + return err + } + + case "lastModified": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastModified = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReportGroupName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReportGroupStatusType to be of type string, got %T instead", value) + } + sv.Status = types.ReportGroupStatusType(jtv) + } + + case "tags": + if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil { + return err + } + + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReportType to be of type string, got %T instead", value) + } + sv.Type = types.ReportType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentReportGroupArns(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentReportGroups(v *[]types.ReportGroup, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ReportGroup + if *v == nil { + cv = []types.ReportGroup{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ReportGroup + destAddr := &col + if err := awsAwsjson11_deserializeDocumentReportGroup(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentReportGroupTrendRawDataList(v *[]types.ReportWithRawData, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ReportWithRawData + if *v == nil { + cv = []types.ReportWithRawData{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ReportWithRawData + destAddr := &col + if err := awsAwsjson11_deserializeDocumentReportWithRawData(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentReportGroupTrendStats(v **types.ReportGroupTrendStats, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ReportGroupTrendStats + if *v == nil { + sv = &types.ReportGroupTrendStats{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "average": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Average = ptr.String(jtv) + } + + case "max": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Max = ptr.String(jtv) + } + + case "min": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Min = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentReports(v *[]types.Report, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Report + if *v == nil { + cv = []types.Report{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Report + destAddr := &col + if err := awsAwsjson11_deserializeDocumentReport(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentReportStatusCounts(v *map[string]int32, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]int32 + if *v == nil { + mv = map[string]int32{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal int32 + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected WrapperInt to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + parsedVal = int32(i64) + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsAwsjson11_deserializeDocumentReportWithRawData(v **types.ReportWithRawData, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ReportWithRawData + if *v == nil { + sv = &types.ReportWithRawData{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "data": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Data = ptr.String(jtv) + } + + case "reportArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.ReportArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentResolvedArtifact(v **types.ResolvedArtifact, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ResolvedArtifact + if *v == nil { + sv = &types.ResolvedArtifact{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "identifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Identifier = ptr.String(jtv) + } + + case "location": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Location = ptr.String(jtv) + } + + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ArtifactsType to be of type string, got %T instead", value) + } + sv.Type = types.ArtifactsType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentResolvedSecondaryArtifacts(v *[]types.ResolvedArtifact, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ResolvedArtifact + if *v == nil { + cv = []types.ResolvedArtifact{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ResolvedArtifact + destAddr := &col + if err := awsAwsjson11_deserializeDocumentResolvedArtifact(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentResourceAlreadyExistsException(v **types.ResourceAlreadyExistsException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ResourceAlreadyExistsException + if *v == nil { + sv = &types.ResourceAlreadyExistsException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ResourceNotFoundException + if *v == nil { + sv = &types.ResourceNotFoundException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentS3LogsConfig(v **types.S3LogsConfig, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.S3LogsConfig + if *v == nil { + sv = &types.S3LogsConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "bucketOwnerAccess": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BucketOwnerAccess to be of type string, got %T instead", value) + } + sv.BucketOwnerAccess = types.BucketOwnerAccess(jtv) + } + + case "encryptionDisabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected WrapperBoolean to be of type *bool, got %T instead", value) + } + sv.EncryptionDisabled = ptr.Bool(jtv) + } + + case "location": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Location = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LogsConfigStatusType to be of type string, got %T instead", value) + } + sv.Status = types.LogsConfigStatusType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentS3ReportExportConfig(v **types.S3ReportExportConfig, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.S3ReportExportConfig + if *v == nil { + sv = &types.S3ReportExportConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "bucket": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.Bucket = ptr.String(jtv) + } + + case "bucketOwner": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.BucketOwner = ptr.String(jtv) + } + + case "encryptionDisabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected WrapperBoolean to be of type *bool, got %T instead", value) + } + sv.EncryptionDisabled = ptr.Bool(jtv) + } + + case "encryptionKey": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.EncryptionKey = ptr.String(jtv) + } + + case "packaging": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReportPackagingType to be of type string, got %T instead", value) + } + sv.Packaging = types.ReportPackagingType(jtv) + } + + case "path": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Path = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentSandbox(v **types.Sandbox, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Sandbox + if *v == nil { + sv = &types.Sandbox{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "currentSession": + if err := awsAwsjson11_deserializeDocumentSandboxSession(&sv.CurrentSession, value); err != nil { + return err + } + + case "encryptionKey": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.EncryptionKey = ptr.String(jtv) + } + + case "endTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.EndTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "environment": + if err := awsAwsjson11_deserializeDocumentProjectEnvironment(&sv.Environment, value); err != nil { + return err + } + + case "fileSystemLocations": + if err := awsAwsjson11_deserializeDocumentProjectFileSystemLocations(&sv.FileSystemLocations, value); err != nil { + return err + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "logConfig": + if err := awsAwsjson11_deserializeDocumentLogsConfig(&sv.LogConfig, value); err != nil { + return err + } + + case "projectName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.ProjectName = ptr.String(jtv) + } + + case "queuedTimeoutInMinutes": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected WrapperInt to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.QueuedTimeoutInMinutes = ptr.Int32(int32(i64)) + } + + case "requestTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.RequestTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "secondarySources": + if err := awsAwsjson11_deserializeDocumentProjectSources(&sv.SecondarySources, value); err != nil { + return err + } + + case "secondarySourceVersions": + if err := awsAwsjson11_deserializeDocumentProjectSecondarySourceVersions(&sv.SecondarySourceVersions, value); err != nil { + return err + } + + case "serviceRole": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.ServiceRole = ptr.String(jtv) + } + + case "source": + if err := awsAwsjson11_deserializeDocumentProjectSource(&sv.Source, value); err != nil { + return err + } + + case "sourceVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.SourceVersion = ptr.String(jtv) + } + + case "startTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Status = ptr.String(jtv) + } + + case "timeoutInMinutes": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected WrapperInt to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TimeoutInMinutes = ptr.Int32(int32(i64)) + } + + case "vpcConfig": + if err := awsAwsjson11_deserializeDocumentVpcConfig(&sv.VpcConfig, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentSandboxes(v *[]types.Sandbox, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Sandbox + if *v == nil { + cv = []types.Sandbox{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Sandbox + destAddr := &col + if err := awsAwsjson11_deserializeDocumentSandbox(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentSandboxIds(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentSandboxSession(v **types.SandboxSession, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.SandboxSession + if *v == nil { + sv = &types.SandboxSession{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "currentPhase": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.CurrentPhase = ptr.String(jtv) + } + + case "endTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.EndTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "logs": + if err := awsAwsjson11_deserializeDocumentLogsLocation(&sv.Logs, value); err != nil { + return err + } + + case "networkInterface": + if err := awsAwsjson11_deserializeDocumentNetworkInterface(&sv.NetworkInterface, value); err != nil { + return err + } + + case "phases": + if err := awsAwsjson11_deserializeDocumentSandboxSessionPhases(&sv.Phases, value); err != nil { + return err + } + + case "resolvedSourceVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.ResolvedSourceVersion = ptr.String(jtv) + } + + case "startTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Status = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentSandboxSessionPhase(v **types.SandboxSessionPhase, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.SandboxSessionPhase + if *v == nil { + sv = &types.SandboxSessionPhase{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "contexts": + if err := awsAwsjson11_deserializeDocumentPhaseContexts(&sv.Contexts, value); err != nil { + return err + } + + case "durationInSeconds": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected WrapperLong to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.DurationInSeconds = ptr.Int64(i64) + } + + case "endTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.EndTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "phaseStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StatusType to be of type string, got %T instead", value) + } + sv.PhaseStatus = types.StatusType(jtv) + } + + case "phaseType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.PhaseType = ptr.String(jtv) + } + + case "startTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentSandboxSessionPhases(v *[]types.SandboxSessionPhase, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.SandboxSessionPhase + if *v == nil { + cv = []types.SandboxSessionPhase{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.SandboxSessionPhase + destAddr := &col + if err := awsAwsjson11_deserializeDocumentSandboxSessionPhase(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentScalingConfigurationOutput(v **types.ScalingConfigurationOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ScalingConfigurationOutput + if *v == nil { + sv = &types.ScalingConfigurationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "desiredCapacity": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected FleetCapacity to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.DesiredCapacity = ptr.Int32(int32(i64)) + } + + case "maxCapacity": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected FleetCapacity to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaxCapacity = ptr.Int32(int32(i64)) + } + + case "scalingType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FleetScalingType to be of type string, got %T instead", value) + } + sv.ScalingType = types.FleetScalingType(jtv) + } + + case "targetTrackingScalingConfigs": + if err := awsAwsjson11_deserializeDocumentTargetTrackingScalingConfigurations(&sv.TargetTrackingScalingConfigs, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentScopeConfiguration(v **types.ScopeConfiguration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ScopeConfiguration + if *v == nil { + sv = &types.ScopeConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "domain": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Domain = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "scope": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WebhookScopeType to be of type string, got %T instead", value) + } + sv.Scope = types.WebhookScopeType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentSecurityGroupIds(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentSourceAuth(v **types.SourceAuth, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.SourceAuth + if *v == nil { + sv = &types.SourceAuth{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "resource": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Resource = ptr.String(jtv) + } + + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SourceAuthType to be of type string, got %T instead", value) + } + sv.Type = types.SourceAuthType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentSourceCredentialsInfo(v **types.SourceCredentialsInfo, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.SourceCredentialsInfo + if *v == nil { + sv = &types.SourceCredentialsInfo{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "authType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AuthType to be of type string, got %T instead", value) + } + sv.AuthType = types.AuthType(jtv) + } + + case "resource": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Resource = ptr.String(jtv) + } + + case "serverType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServerType to be of type string, got %T instead", value) + } + sv.ServerType = types.ServerType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentSourceCredentialsInfos(v *[]types.SourceCredentialsInfo, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.SourceCredentialsInfo + if *v == nil { + cv = []types.SourceCredentialsInfo{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.SourceCredentialsInfo + destAddr := &col + if err := awsAwsjson11_deserializeDocumentSourceCredentialsInfo(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentSSMSession(v **types.SSMSession, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.SSMSession + if *v == nil { + sv = &types.SSMSession{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "sessionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.SessionId = ptr.String(jtv) + } + + case "streamUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.StreamUrl = ptr.String(jtv) + } + + case "tokenValue": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.TokenValue = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentSubnets(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentTag(v **types.Tag, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Tag + if *v == nil { + sv = &types.Tag{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "key": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected KeyInput to be of type string, got %T instead", value) + } + sv.Key = ptr.String(jtv) + } + + case "value": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ValueInput to be of type string, got %T instead", value) + } + sv.Value = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentTagList(v *[]types.Tag, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Tag + if *v == nil { + cv = []types.Tag{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Tag + destAddr := &col + if err := awsAwsjson11_deserializeDocumentTag(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentTargetTrackingScalingConfiguration(v **types.TargetTrackingScalingConfiguration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.TargetTrackingScalingConfiguration + if *v == nil { + sv = &types.TargetTrackingScalingConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "metricType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FleetScalingMetricType to be of type string, got %T instead", value) + } + sv.MetricType = types.FleetScalingMetricType(jtv) + } + + case "targetValue": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.TargetValue = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.TargetValue = ptr.Float64(f64) + + default: + return fmt.Errorf("expected WrapperDouble to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentTargetTrackingScalingConfigurations(v *[]types.TargetTrackingScalingConfiguration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.TargetTrackingScalingConfiguration + if *v == nil { + cv = []types.TargetTrackingScalingConfiguration{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.TargetTrackingScalingConfiguration + destAddr := &col + if err := awsAwsjson11_deserializeDocumentTargetTrackingScalingConfiguration(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentTestCase(v **types.TestCase, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.TestCase + if *v == nil { + sv = &types.TestCase{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "durationInNanoSeconds": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected WrapperLong to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.DurationInNanoSeconds = ptr.Int64(i64) + } + + case "expired": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Expired = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "prefix": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Prefix = ptr.String(jtv) + } + + case "reportArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.ReportArn = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Status = ptr.String(jtv) + } + + case "testRawDataPath": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.TestRawDataPath = ptr.String(jtv) + } + + case "testSuiteName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.TestSuiteName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentTestCases(v *[]types.TestCase, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.TestCase + if *v == nil { + cv = []types.TestCase{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.TestCase + destAddr := &col + if err := awsAwsjson11_deserializeDocumentTestCase(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentTestReportSummary(v **types.TestReportSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.TestReportSummary + if *v == nil { + sv = &types.TestReportSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "durationInNanoSeconds": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected WrapperLong to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.DurationInNanoSeconds = ptr.Int64(i64) + } + + case "statusCounts": + if err := awsAwsjson11_deserializeDocumentReportStatusCounts(&sv.StatusCounts, value); err != nil { + return err + } + + case "total": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected WrapperInt to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Total = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentVpcConfig(v **types.VpcConfig, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.VpcConfig + if *v == nil { + sv = &types.VpcConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "securityGroupIds": + if err := awsAwsjson11_deserializeDocumentSecurityGroupIds(&sv.SecurityGroupIds, value); err != nil { + return err + } + + case "subnets": + if err := awsAwsjson11_deserializeDocumentSubnets(&sv.Subnets, value); err != nil { + return err + } + + case "vpcId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.VpcId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentWebhook(v **types.Webhook, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Webhook + if *v == nil { + sv = &types.Webhook{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "branchFilter": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.BranchFilter = ptr.String(jtv) + } + + case "buildType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WebhookBuildType to be of type string, got %T instead", value) + } + sv.BuildType = types.WebhookBuildType(jtv) + } + + case "filterGroups": + if err := awsAwsjson11_deserializeDocumentFilterGroups(&sv.FilterGroups, value); err != nil { + return err + } + + case "lastModifiedSecret": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastModifiedSecret = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "manualCreation": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected WrapperBoolean to be of type *bool, got %T instead", value) + } + sv.ManualCreation = ptr.Bool(jtv) + } + + case "payloadUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.PayloadUrl = ptr.String(jtv) + } + + case "pullRequestBuildPolicy": + if err := awsAwsjson11_deserializeDocumentPullRequestBuildPolicy(&sv.PullRequestBuildPolicy, value); err != nil { + return err + } + + case "scopeConfiguration": + if err := awsAwsjson11_deserializeDocumentScopeConfiguration(&sv.ScopeConfiguration, value); err != nil { + return err + } + + case "secret": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.Secret = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WebhookStatus to be of type string, got %T instead", value) + } + sv.Status = types.WebhookStatus(jtv) + } + + case "statusMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.StatusMessage = ptr.String(jtv) + } + + case "url": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.Url = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentWebhookFilter(v **types.WebhookFilter, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.WebhookFilter + if *v == nil { + sv = &types.WebhookFilter{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "excludeMatchedPattern": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected WrapperBoolean to be of type *bool, got %T instead", value) + } + sv.ExcludeMatchedPattern = ptr.Bool(jtv) + } + + case "pattern": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Pattern = ptr.String(jtv) + } + + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WebhookFilterType to be of type string, got %T instead", value) + } + sv.Type = types.WebhookFilterType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentBatchDeleteBuildsOutput(v **BatchDeleteBuildsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *BatchDeleteBuildsOutput + if *v == nil { + sv = &BatchDeleteBuildsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "buildsDeleted": + if err := awsAwsjson11_deserializeDocumentBuildIds(&sv.BuildsDeleted, value); err != nil { + return err + } + + case "buildsNotDeleted": + if err := awsAwsjson11_deserializeDocumentBuildsNotDeleted(&sv.BuildsNotDeleted, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentBatchGetBuildBatchesOutput(v **BatchGetBuildBatchesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *BatchGetBuildBatchesOutput + if *v == nil { + sv = &BatchGetBuildBatchesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "buildBatches": + if err := awsAwsjson11_deserializeDocumentBuildBatches(&sv.BuildBatches, value); err != nil { + return err + } + + case "buildBatchesNotFound": + if err := awsAwsjson11_deserializeDocumentBuildBatchIds(&sv.BuildBatchesNotFound, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentBatchGetBuildsOutput(v **BatchGetBuildsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *BatchGetBuildsOutput + if *v == nil { + sv = &BatchGetBuildsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "builds": + if err := awsAwsjson11_deserializeDocumentBuilds(&sv.Builds, value); err != nil { + return err + } + + case "buildsNotFound": + if err := awsAwsjson11_deserializeDocumentBuildIds(&sv.BuildsNotFound, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentBatchGetCommandExecutionsOutput(v **BatchGetCommandExecutionsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *BatchGetCommandExecutionsOutput + if *v == nil { + sv = &BatchGetCommandExecutionsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "commandExecutions": + if err := awsAwsjson11_deserializeDocumentCommandExecutions(&sv.CommandExecutions, value); err != nil { + return err + } + + case "commandExecutionsNotFound": + if err := awsAwsjson11_deserializeDocumentCommandExecutionIds(&sv.CommandExecutionsNotFound, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentBatchGetFleetsOutput(v **BatchGetFleetsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *BatchGetFleetsOutput + if *v == nil { + sv = &BatchGetFleetsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "fleets": + if err := awsAwsjson11_deserializeDocumentFleets(&sv.Fleets, value); err != nil { + return err + } + + case "fleetsNotFound": + if err := awsAwsjson11_deserializeDocumentFleetNames(&sv.FleetsNotFound, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentBatchGetProjectsOutput(v **BatchGetProjectsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *BatchGetProjectsOutput + if *v == nil { + sv = &BatchGetProjectsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "projects": + if err := awsAwsjson11_deserializeDocumentProjects(&sv.Projects, value); err != nil { + return err + } + + case "projectsNotFound": + if err := awsAwsjson11_deserializeDocumentProjectNames(&sv.ProjectsNotFound, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentBatchGetReportGroupsOutput(v **BatchGetReportGroupsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *BatchGetReportGroupsOutput + if *v == nil { + sv = &BatchGetReportGroupsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "reportGroups": + if err := awsAwsjson11_deserializeDocumentReportGroups(&sv.ReportGroups, value); err != nil { + return err + } + + case "reportGroupsNotFound": + if err := awsAwsjson11_deserializeDocumentReportGroupArns(&sv.ReportGroupsNotFound, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentBatchGetReportsOutput(v **BatchGetReportsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *BatchGetReportsOutput + if *v == nil { + sv = &BatchGetReportsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "reports": + if err := awsAwsjson11_deserializeDocumentReports(&sv.Reports, value); err != nil { + return err + } + + case "reportsNotFound": + if err := awsAwsjson11_deserializeDocumentReportArns(&sv.ReportsNotFound, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentBatchGetSandboxesOutput(v **BatchGetSandboxesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *BatchGetSandboxesOutput + if *v == nil { + sv = &BatchGetSandboxesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "sandboxes": + if err := awsAwsjson11_deserializeDocumentSandboxes(&sv.Sandboxes, value); err != nil { + return err + } + + case "sandboxesNotFound": + if err := awsAwsjson11_deserializeDocumentSandboxIds(&sv.SandboxesNotFound, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentCreateFleetOutput(v **CreateFleetOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateFleetOutput + if *v == nil { + sv = &CreateFleetOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "fleet": + if err := awsAwsjson11_deserializeDocumentFleet(&sv.Fleet, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentCreateProjectOutput(v **CreateProjectOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateProjectOutput + if *v == nil { + sv = &CreateProjectOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "project": + if err := awsAwsjson11_deserializeDocumentProject(&sv.Project, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentCreateReportGroupOutput(v **CreateReportGroupOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateReportGroupOutput + if *v == nil { + sv = &CreateReportGroupOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "reportGroup": + if err := awsAwsjson11_deserializeDocumentReportGroup(&sv.ReportGroup, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentCreateWebhookOutput(v **CreateWebhookOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateWebhookOutput + if *v == nil { + sv = &CreateWebhookOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "webhook": + if err := awsAwsjson11_deserializeDocumentWebhook(&sv.Webhook, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDeleteBuildBatchOutput(v **DeleteBuildBatchOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeleteBuildBatchOutput + if *v == nil { + sv = &DeleteBuildBatchOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "buildsDeleted": + if err := awsAwsjson11_deserializeDocumentBuildIds(&sv.BuildsDeleted, value); err != nil { + return err + } + + case "buildsNotDeleted": + if err := awsAwsjson11_deserializeDocumentBuildsNotDeleted(&sv.BuildsNotDeleted, value); err != nil { + return err + } + + case "statusCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.StatusCode = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDeleteFleetOutput(v **DeleteFleetOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeleteFleetOutput + if *v == nil { + sv = &DeleteFleetOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDeleteProjectOutput(v **DeleteProjectOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeleteProjectOutput + if *v == nil { + sv = &DeleteProjectOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDeleteReportGroupOutput(v **DeleteReportGroupOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeleteReportGroupOutput + if *v == nil { + sv = &DeleteReportGroupOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDeleteReportOutput(v **DeleteReportOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeleteReportOutput + if *v == nil { + sv = &DeleteReportOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDeleteResourcePolicyOutput(v **DeleteResourcePolicyOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeleteResourcePolicyOutput + if *v == nil { + sv = &DeleteResourcePolicyOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDeleteSourceCredentialsOutput(v **DeleteSourceCredentialsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeleteSourceCredentialsOutput + if *v == nil { + sv = &DeleteSourceCredentialsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDeleteWebhookOutput(v **DeleteWebhookOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeleteWebhookOutput + if *v == nil { + sv = &DeleteWebhookOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeCodeCoveragesOutput(v **DescribeCodeCoveragesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeCodeCoveragesOutput + if *v == nil { + sv = &DescribeCodeCoveragesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "codeCoverages": + if err := awsAwsjson11_deserializeDocumentCodeCoverages(&sv.CodeCoverages, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentDescribeTestCasesOutput(v **DescribeTestCasesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeTestCasesOutput + if *v == nil { + sv = &DescribeTestCasesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "testCases": + if err := awsAwsjson11_deserializeDocumentTestCases(&sv.TestCases, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentGetReportGroupTrendOutput(v **GetReportGroupTrendOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetReportGroupTrendOutput + if *v == nil { + sv = &GetReportGroupTrendOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "rawData": + if err := awsAwsjson11_deserializeDocumentReportGroupTrendRawDataList(&sv.RawData, value); err != nil { + return err + } + + case "stats": + if err := awsAwsjson11_deserializeDocumentReportGroupTrendStats(&sv.Stats, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentGetResourcePolicyOutput(v **GetResourcePolicyOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetResourcePolicyOutput + if *v == nil { + sv = &GetResourcePolicyOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "policy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.Policy = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentImportSourceCredentialsOutput(v **ImportSourceCredentialsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ImportSourceCredentialsOutput + if *v == nil { + sv = &ImportSourceCredentialsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentInvalidateProjectCacheOutput(v **InvalidateProjectCacheOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *InvalidateProjectCacheOutput + if *v == nil { + sv = &InvalidateProjectCacheOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentListBuildBatchesForProjectOutput(v **ListBuildBatchesForProjectOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListBuildBatchesForProjectOutput + if *v == nil { + sv = &ListBuildBatchesForProjectOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ids": + if err := awsAwsjson11_deserializeDocumentBuildBatchIds(&sv.Ids, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentListBuildBatchesOutput(v **ListBuildBatchesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListBuildBatchesOutput + if *v == nil { + sv = &ListBuildBatchesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ids": + if err := awsAwsjson11_deserializeDocumentBuildBatchIds(&sv.Ids, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentListBuildsForProjectOutput(v **ListBuildsForProjectOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListBuildsForProjectOutput + if *v == nil { + sv = &ListBuildsForProjectOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ids": + if err := awsAwsjson11_deserializeDocumentBuildIds(&sv.Ids, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentListBuildsOutput(v **ListBuildsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListBuildsOutput + if *v == nil { + sv = &ListBuildsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ids": + if err := awsAwsjson11_deserializeDocumentBuildIds(&sv.Ids, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentListCommandExecutionsForSandboxOutput(v **ListCommandExecutionsForSandboxOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListCommandExecutionsForSandboxOutput + if *v == nil { + sv = &ListCommandExecutionsForSandboxOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "commandExecutions": + if err := awsAwsjson11_deserializeDocumentCommandExecutions(&sv.CommandExecutions, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentListCuratedEnvironmentImagesOutput(v **ListCuratedEnvironmentImagesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListCuratedEnvironmentImagesOutput + if *v == nil { + sv = &ListCuratedEnvironmentImagesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "platforms": + if err := awsAwsjson11_deserializeDocumentEnvironmentPlatforms(&sv.Platforms, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentListFleetsOutput(v **ListFleetsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListFleetsOutput + if *v == nil { + sv = &ListFleetsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "fleets": + if err := awsAwsjson11_deserializeDocumentFleetArns(&sv.Fleets, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentListProjectsOutput(v **ListProjectsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListProjectsOutput + if *v == nil { + sv = &ListProjectsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "projects": + if err := awsAwsjson11_deserializeDocumentProjectNames(&sv.Projects, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentListReportGroupsOutput(v **ListReportGroupsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListReportGroupsOutput + if *v == nil { + sv = &ListReportGroupsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "reportGroups": + if err := awsAwsjson11_deserializeDocumentReportGroupArns(&sv.ReportGroups, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentListReportsForReportGroupOutput(v **ListReportsForReportGroupOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListReportsForReportGroupOutput + if *v == nil { + sv = &ListReportsForReportGroupOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "reports": + if err := awsAwsjson11_deserializeDocumentReportArns(&sv.Reports, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentListReportsOutput(v **ListReportsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListReportsOutput + if *v == nil { + sv = &ListReportsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "reports": + if err := awsAwsjson11_deserializeDocumentReportArns(&sv.Reports, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentListSandboxesForProjectOutput(v **ListSandboxesForProjectOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListSandboxesForProjectOutput + if *v == nil { + sv = &ListSandboxesForProjectOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ids": + if err := awsAwsjson11_deserializeDocumentSandboxIds(&sv.Ids, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentListSandboxesOutput(v **ListSandboxesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListSandboxesOutput + if *v == nil { + sv = &ListSandboxesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ids": + if err := awsAwsjson11_deserializeDocumentSandboxIds(&sv.Ids, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentListSharedProjectsOutput(v **ListSharedProjectsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListSharedProjectsOutput + if *v == nil { + sv = &ListSharedProjectsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "projects": + if err := awsAwsjson11_deserializeDocumentProjectArns(&sv.Projects, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentListSharedReportGroupsOutput(v **ListSharedReportGroupsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListSharedReportGroupsOutput + if *v == nil { + sv = &ListSharedReportGroupsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "reportGroups": + if err := awsAwsjson11_deserializeDocumentReportGroupArns(&sv.ReportGroups, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentListSourceCredentialsOutput(v **ListSourceCredentialsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListSourceCredentialsOutput + if *v == nil { + sv = &ListSourceCredentialsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "sourceCredentialsInfos": + if err := awsAwsjson11_deserializeDocumentSourceCredentialsInfos(&sv.SourceCredentialsInfos, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentPutResourcePolicyOutput(v **PutResourcePolicyOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *PutResourcePolicyOutput + if *v == nil { + sv = &PutResourcePolicyOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "resourceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.ResourceArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentRetryBuildBatchOutput(v **RetryBuildBatchOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *RetryBuildBatchOutput + if *v == nil { + sv = &RetryBuildBatchOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "buildBatch": + if err := awsAwsjson11_deserializeDocumentBuildBatch(&sv.BuildBatch, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentRetryBuildOutput(v **RetryBuildOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *RetryBuildOutput + if *v == nil { + sv = &RetryBuildOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "build": + if err := awsAwsjson11_deserializeDocumentBuild(&sv.Build, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentStartBuildBatchOutput(v **StartBuildBatchOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *StartBuildBatchOutput + if *v == nil { + sv = &StartBuildBatchOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "buildBatch": + if err := awsAwsjson11_deserializeDocumentBuildBatch(&sv.BuildBatch, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentStartBuildOutput(v **StartBuildOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *StartBuildOutput + if *v == nil { + sv = &StartBuildOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "build": + if err := awsAwsjson11_deserializeDocumentBuild(&sv.Build, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentStartCommandExecutionOutput(v **StartCommandExecutionOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *StartCommandExecutionOutput + if *v == nil { + sv = &StartCommandExecutionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "commandExecution": + if err := awsAwsjson11_deserializeDocumentCommandExecution(&sv.CommandExecution, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentStartSandboxConnectionOutput(v **StartSandboxConnectionOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *StartSandboxConnectionOutput + if *v == nil { + sv = &StartSandboxConnectionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ssmSession": + if err := awsAwsjson11_deserializeDocumentSSMSession(&sv.SsmSession, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentStartSandboxOutput(v **StartSandboxOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *StartSandboxOutput + if *v == nil { + sv = &StartSandboxOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "sandbox": + if err := awsAwsjson11_deserializeDocumentSandbox(&sv.Sandbox, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentStopBuildBatchOutput(v **StopBuildBatchOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *StopBuildBatchOutput + if *v == nil { + sv = &StopBuildBatchOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "buildBatch": + if err := awsAwsjson11_deserializeDocumentBuildBatch(&sv.BuildBatch, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentStopBuildOutput(v **StopBuildOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *StopBuildOutput + if *v == nil { + sv = &StopBuildOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "build": + if err := awsAwsjson11_deserializeDocumentBuild(&sv.Build, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentStopSandboxOutput(v **StopSandboxOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *StopSandboxOutput + if *v == nil { + sv = &StopSandboxOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "sandbox": + if err := awsAwsjson11_deserializeDocumentSandbox(&sv.Sandbox, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentUpdateFleetOutput(v **UpdateFleetOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateFleetOutput + if *v == nil { + sv = &UpdateFleetOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "fleet": + if err := awsAwsjson11_deserializeDocumentFleet(&sv.Fleet, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentUpdateProjectOutput(v **UpdateProjectOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateProjectOutput + if *v == nil { + sv = &UpdateProjectOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "project": + if err := awsAwsjson11_deserializeDocumentProject(&sv.Project, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentUpdateProjectVisibilityOutput(v **UpdateProjectVisibilityOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateProjectVisibilityOutput + if *v == nil { + sv = &UpdateProjectVisibilityOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "projectArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.ProjectArn = ptr.String(jtv) + } + + case "projectVisibility": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProjectVisibilityType to be of type string, got %T instead", value) + } + sv.ProjectVisibility = types.ProjectVisibilityType(jtv) + } + + case "publicProjectAlias": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.PublicProjectAlias = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentUpdateReportGroupOutput(v **UpdateReportGroupOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateReportGroupOutput + if *v == nil { + sv = &UpdateReportGroupOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "reportGroup": + if err := awsAwsjson11_deserializeDocumentReportGroup(&sv.ReportGroup, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentUpdateWebhookOutput(v **UpdateWebhookOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateWebhookOutput + if *v == nil { + sv = &UpdateWebhookOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "webhook": + if err := awsAwsjson11_deserializeDocumentWebhook(&sv.Webhook, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type protocolErrorInfo struct { + Type string `json:"__type"` + Message string + Code any // nonstandard for awsjson but some services do present the type here +} + +func getProtocolErrorInfo(decoder *json.Decoder) (protocolErrorInfo, error) { + var errInfo protocolErrorInfo + if err := decoder.Decode(&errInfo); err != nil { + if err == io.EOF { + return errInfo, nil + } + return errInfo, err + } + + return errInfo, nil +} + +func resolveProtocolErrorType(headerType string, bodyInfo protocolErrorInfo) (string, bool) { + if len(headerType) != 0 { + return headerType, true + } else if len(bodyInfo.Type) != 0 { + return bodyInfo.Type, true + } else if code, ok := bodyInfo.Code.(string); ok && len(code) != 0 { + return code, true + } + return "", false +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/doc.go new file mode 100644 index 00000000000..e1fda93d875 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/doc.go @@ -0,0 +1,19 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +// Package codebuild provides the API client, operations, and parameter types for +// AWS CodeBuild. +// +// # CodeBuild +// +// CodeBuild is a fully managed build service in the cloud. CodeBuild compiles +// your source code, runs unit tests, and produces artifacts that are ready to +// deploy. CodeBuild eliminates the need to provision, manage, and scale your own +// build servers. It provides prepackaged build environments for the most popular +// programming languages and build tools, such as Apache Maven, Gradle, and more. +// You can also fully customize build environments in CodeBuild to use your own +// build tools. CodeBuild scales automatically to meet peak build requests. You pay +// only for the build time you consume. For more information about CodeBuild, see +// the [CodeBuild User Guide]. +// +// [CodeBuild User Guide]: https://docs.aws.amazon.com/codebuild/latest/userguide/welcome.html +package codebuild diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/endpoints.go new file mode 100644 index 00000000000..a133219068d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/endpoints.go @@ -0,0 +1,552 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" + "github.com/aws/aws-sdk-go-v2/internal/endpoints" + "github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn" + internalendpoints "github.com/aws/aws-sdk-go-v2/service/codebuild/internal/endpoints" + smithyauth "github.com/aws/smithy-go/auth" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/endpoints/private/rulesfn" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/ptr" + "github.com/aws/smithy-go/tracing" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net/http" + "net/url" + "os" + "strings" +) + +// EndpointResolverOptions is the service endpoint resolver options +type EndpointResolverOptions = internalendpoints.Options + +// EndpointResolver interface for resolving service endpoints. +type EndpointResolver interface { + ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error) +} + +var _ EndpointResolver = &internalendpoints.Resolver{} + +// NewDefaultEndpointResolver constructs a new service endpoint resolver +func NewDefaultEndpointResolver() *internalendpoints.Resolver { + return internalendpoints.New() +} + +// EndpointResolverFunc is a helper utility that wraps a function so it satisfies +// the EndpointResolver interface. This is useful when you want to add additional +// endpoint resolving logic, or stub out specific endpoints with custom values. +type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error) + +func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { + return fn(region, options) +} + +// 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, +) { + if !awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.Resolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + eo := m.Options + eo.Logger = middleware.GetLogger(ctx) + + var endpoint aws.Endpoint + endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo) + if err != nil { + nf := (&aws.EndpointNotFoundError{}) + if errors.As(err, &nf) { + ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, false) + return next.HandleSerialize(ctx, in) + } + 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 = "codebuild" + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + } + ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source) + ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable) + ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion) + ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID) + return next.HandleSerialize(ctx, in) +} +func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error { + return stack.Serialize.Insert(&ResolveEndpoint{ + Resolver: o.EndpointResolver, + Options: o.EndpointOptions, + }, "OperationSerializer", middleware.Before) +} + +func removeResolveEndpointMiddleware(stack *middleware.Stack) error { + _, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID()) + return err +} + +type wrappedEndpointResolver struct { + awsResolver aws.EndpointResolverWithOptions +} + +func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { + return w.awsResolver.ResolveEndpoint(ServiceID, region, options) +} + +type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error) + +func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, options ...interface{}) (aws.Endpoint, error) { + return a(service, region) +} + +var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil) + +// withEndpointResolver returns an aws.EndpointResolverWithOptions that first delegates endpoint resolution to the awsResolver. +// If awsResolver returns aws.EndpointNotFoundError error, the v1 resolver middleware will swallow the error, +// and set an appropriate context flag such that fallback will occur when EndpointResolverV2 is invoked +// via its middleware. +// +// If another error (besides aws.EndpointNotFoundError) is returned, then that error will be propagated. +func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions) EndpointResolver { + var resolver aws.EndpointResolverWithOptions + + if awsResolverWithOptions != nil { + resolver = awsResolverWithOptions + } else if awsResolver != nil { + resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint) + } + + return &wrappedEndpointResolver{ + awsResolver: resolver, + } +} + +func finalizeClientEndpointResolverOptions(options *Options) { + options.EndpointOptions.LogDeprecated = options.ClientLogMode.IsDeprecatedUsage() + + if len(options.EndpointOptions.ResolvedRegion) == 0 { + const fipsInfix = "-fips-" + const fipsPrefix = "fips-" + const fipsSuffix = "-fips" + + if strings.Contains(options.Region, fipsInfix) || + strings.Contains(options.Region, fipsPrefix) || + strings.Contains(options.Region, fipsSuffix) { + options.EndpointOptions.ResolvedRegion = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll( + options.Region, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "") + options.EndpointOptions.UseFIPSEndpoint = aws.FIPSEndpointStateEnabled + } + } + +} + +func resolveEndpointResolverV2(options *Options) { + if options.EndpointResolverV2 == nil { + options.EndpointResolverV2 = NewDefaultEndpointResolverV2() + } +} + +func resolveBaseEndpoint(cfg aws.Config, o *Options) { + if cfg.BaseEndpoint != nil { + o.BaseEndpoint = cfg.BaseEndpoint + } + + _, g := os.LookupEnv("AWS_ENDPOINT_URL") + _, s := os.LookupEnv("AWS_ENDPOINT_URL_CODEBUILD") + + if g && !s { + return + } + + value, found, err := internalConfig.ResolveServiceBaseEndpoint(context.Background(), "CodeBuild", cfg.ConfigSources) + if found && err == nil { + o.BaseEndpoint = &value + } +} + +func bindRegion(region string) (*string, error) { + if region == "" { + return nil, nil + } + if !rulesfn.IsValidHostLabel(region, true) { + return nil, fmt.Errorf("invalid input region %s", region) + } + + return aws.String(endpoints.MapFIPSRegion(region)), nil +} + +// EndpointParameters provides the parameters that influence how endpoints are +// resolved. +type EndpointParameters struct { + // The AWS region used to dispatch the request. + // + // Parameter is + // required. + // + // AWS::Region + Region *string + + // When true, use the dual-stack endpoint. If the configured endpoint does not + // support dual-stack, dispatching the request MAY return an error. + // + // Defaults to + // false if no value is provided. + // + // AWS::UseDualStack + UseDualStack *bool + + // When true, send this request to the FIPS-compliant regional endpoint. If the + // configured endpoint does not have a FIPS compliant endpoint, dispatching the + // request will return an error. + // + // Defaults to false if no value is + // provided. + // + // AWS::UseFIPS + UseFIPS *bool + + // Override the endpoint used to send this request + // + // Parameter is + // required. + // + // SDK::Endpoint + Endpoint *string +} + +// ValidateRequired validates required parameters are set. +func (p EndpointParameters) ValidateRequired() error { + if p.UseDualStack == nil { + return fmt.Errorf("parameter UseDualStack is required") + } + + if p.UseFIPS == nil { + return fmt.Errorf("parameter UseFIPS is required") + } + + return nil +} + +// WithDefaults returns a shallow copy of EndpointParameterswith default values +// applied to members where applicable. +func (p EndpointParameters) WithDefaults() EndpointParameters { + if p.UseDualStack == nil { + p.UseDualStack = ptr.Bool(false) + } + + if p.UseFIPS == nil { + p.UseFIPS = ptr.Bool(false) + } + return p +} + +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + +// EndpointResolverV2 provides the interface for resolving service endpoints. +type EndpointResolverV2 interface { + // ResolveEndpoint attempts to resolve the endpoint with the provided options, + // returning the endpoint if found. Otherwise an error is returned. + ResolveEndpoint(ctx context.Context, params EndpointParameters) ( + smithyendpoints.Endpoint, error, + ) +} + +// resolver provides the implementation for resolving endpoints. +type resolver struct{} + +func NewDefaultEndpointResolverV2() EndpointResolverV2 { + return &resolver{} +} + +// ResolveEndpoint attempts to resolve the endpoint with the provided options, +// returning the endpoint if found. Otherwise an error is returned. +func (r *resolver) ResolveEndpoint( + ctx context.Context, params EndpointParameters, +) ( + endpoint smithyendpoints.Endpoint, err error, +) { + params = params.WithDefaults() + if err = params.ValidateRequired(); err != nil { + return endpoint, fmt.Errorf("endpoint parameters are not valid, %w", err) + } + _UseDualStack := *params.UseDualStack + _ = _UseDualStack + _UseFIPS := *params.UseFIPS + _ = _UseFIPS + + if exprVal := params.Endpoint; exprVal != nil { + _Endpoint := *exprVal + _ = _Endpoint + if _UseFIPS == true { + return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: FIPS and custom endpoint are not supported") + } + if _UseDualStack == true { + return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Dualstack and custom endpoint are not supported") + } + uriString := _Endpoint + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + } + if exprVal := params.Region; exprVal != nil { + _Region := *exprVal + _ = _Region + if exprVal := awsrulesfn.GetPartition(_Region); exprVal != nil { + _PartitionResult := *exprVal + _ = _PartitionResult + if _UseFIPS == true { + if _UseDualStack == true { + if true == _PartitionResult.SupportsFIPS { + if true == _PartitionResult.SupportsDualStack { + uriString := func() string { + var out strings.Builder + out.WriteString("https://codebuild-fips.") + out.WriteString(_Region) + out.WriteString(".") + out.WriteString(_PartitionResult.DualStackDnsSuffix) + return out.String() + }() + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + } + } + return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS and DualStack are enabled, but this partition does not support one or both") + } + } + if _UseFIPS == true { + if _PartitionResult.SupportsFIPS == true { + uriString := func() string { + var out strings.Builder + out.WriteString("https://codebuild-fips.") + out.WriteString(_Region) + out.WriteString(".") + out.WriteString(_PartitionResult.DnsSuffix) + return out.String() + }() + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + } + return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS is enabled but this partition does not support FIPS") + } + if _UseDualStack == true { + if true == _PartitionResult.SupportsDualStack { + uriString := func() string { + var out strings.Builder + out.WriteString("https://codebuild.") + out.WriteString(_Region) + out.WriteString(".") + out.WriteString(_PartitionResult.DualStackDnsSuffix) + return out.String() + }() + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + } + return endpoint, fmt.Errorf("endpoint rule error, %s", "DualStack is enabled but this partition does not support DualStack") + } + uriString := func() string { + var out strings.Builder + out.WriteString("https://codebuild.") + out.WriteString(_Region) + out.WriteString(".") + out.WriteString(_PartitionResult.DnsSuffix) + return out.String() + }() + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + } + return endpoint, fmt.Errorf("Endpoint resolution failed. Invalid operation or environment input.") + } + return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Missing Region") +} + +type endpointParamsBinder interface { + bindEndpointParams(*EndpointParameters) +} + +func bindEndpointParams(ctx context.Context, input interface{}, options Options) (*EndpointParameters, error) { + params := &EndpointParameters{} + + region, err := bindRegion(options.Region) + if err != nil { + return nil, err + } + params.Region = region + + params.UseDualStack = aws.Bool(options.EndpointOptions.UseDualStackEndpoint == aws.DualStackEndpointStateEnabled) + params.UseFIPS = aws.Bool(options.EndpointOptions.UseFIPSEndpoint == aws.FIPSEndpointStateEnabled) + params.Endpoint = options.BaseEndpoint + + if b, ok := input.(endpointParamsBinder); ok { + b.bindEndpointParams(params) + } + + return params, nil +} + +type resolveEndpointV2Middleware struct { + options Options +} + +func (*resolveEndpointV2Middleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "ResolveEndpoint") + defer span.End() + + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.options.EndpointResolverV2 == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params, err := bindEndpointParams(ctx, getOperationInput(ctx), m.options) + if err != nil { + return out, metadata, fmt.Errorf("failed to bind endpoint params, %w", err) + } + endpt, err := timeOperationMetric(ctx, "client.call.resolve_endpoint_duration", + func() (smithyendpoints.Endpoint, error) { + return m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params) + }) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + span.SetProperty("client.call.resolved_endpoint", endpt.URI.String()) + + if endpt.URI.RawPath == "" && req.URL.RawPath != "" { + endpt.URI.RawPath = endpt.URI.Path + } + req.URL.Scheme = endpt.URI.Scheme + req.URL.Host = endpt.URI.Host + req.URL.Path = smithyhttp.JoinPath(endpt.URI.Path, req.URL.Path) + req.URL.RawPath = smithyhttp.JoinPath(endpt.URI.RawPath, req.URL.RawPath) + for k := range endpt.Headers { + req.Header.Set(k, endpt.Headers.Get(k)) + } + + rscheme := getResolvedAuthScheme(ctx) + if rscheme == nil { + return out, metadata, fmt.Errorf("no resolved auth scheme") + } + + opts, _ := smithyauth.GetAuthOptions(&endpt.Properties) + for _, o := range opts { + rscheme.SignerProperties.SetAll(&o.SignerProperties) + } + + span.End() + return next.HandleFinalize(ctx, in) +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/generated.json new file mode 100644 index 00000000000..2638f7da706 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/generated.json @@ -0,0 +1,91 @@ +{ + "dependencies": { + "github.com/aws/aws-sdk-go-v2": "v1.4.0", + "github.com/aws/aws-sdk-go-v2/internal/configsources": "v0.0.0-00010101000000-000000000000", + "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2": "v2.0.0-00010101000000-000000000000", + "github.com/aws/smithy-go": "v1.4.0" + }, + "files": [ + "api_client.go", + "api_client_test.go", + "api_op_BatchDeleteBuilds.go", + "api_op_BatchGetBuildBatches.go", + "api_op_BatchGetBuilds.go", + "api_op_BatchGetCommandExecutions.go", + "api_op_BatchGetFleets.go", + "api_op_BatchGetProjects.go", + "api_op_BatchGetReportGroups.go", + "api_op_BatchGetReports.go", + "api_op_BatchGetSandboxes.go", + "api_op_CreateFleet.go", + "api_op_CreateProject.go", + "api_op_CreateReportGroup.go", + "api_op_CreateWebhook.go", + "api_op_DeleteBuildBatch.go", + "api_op_DeleteFleet.go", + "api_op_DeleteProject.go", + "api_op_DeleteReport.go", + "api_op_DeleteReportGroup.go", + "api_op_DeleteResourcePolicy.go", + "api_op_DeleteSourceCredentials.go", + "api_op_DeleteWebhook.go", + "api_op_DescribeCodeCoverages.go", + "api_op_DescribeTestCases.go", + "api_op_GetReportGroupTrend.go", + "api_op_GetResourcePolicy.go", + "api_op_ImportSourceCredentials.go", + "api_op_InvalidateProjectCache.go", + "api_op_ListBuildBatches.go", + "api_op_ListBuildBatchesForProject.go", + "api_op_ListBuilds.go", + "api_op_ListBuildsForProject.go", + "api_op_ListCommandExecutionsForSandbox.go", + "api_op_ListCuratedEnvironmentImages.go", + "api_op_ListFleets.go", + "api_op_ListProjects.go", + "api_op_ListReportGroups.go", + "api_op_ListReports.go", + "api_op_ListReportsForReportGroup.go", + "api_op_ListSandboxes.go", + "api_op_ListSandboxesForProject.go", + "api_op_ListSharedProjects.go", + "api_op_ListSharedReportGroups.go", + "api_op_ListSourceCredentials.go", + "api_op_PutResourcePolicy.go", + "api_op_RetryBuild.go", + "api_op_RetryBuildBatch.go", + "api_op_StartBuild.go", + "api_op_StartBuildBatch.go", + "api_op_StartCommandExecution.go", + "api_op_StartSandbox.go", + "api_op_StartSandboxConnection.go", + "api_op_StopBuild.go", + "api_op_StopBuildBatch.go", + "api_op_StopSandbox.go", + "api_op_UpdateFleet.go", + "api_op_UpdateProject.go", + "api_op_UpdateProjectVisibility.go", + "api_op_UpdateReportGroup.go", + "api_op_UpdateWebhook.go", + "auth.go", + "deserializers.go", + "doc.go", + "endpoints.go", + "endpoints_config_test.go", + "endpoints_test.go", + "generated.json", + "internal/endpoints/endpoints.go", + "internal/endpoints/endpoints_test.go", + "options.go", + "serializers.go", + "snapshot_test.go", + "sra_operation_order_test.go", + "types/enums.go", + "types/errors.go", + "types/types.go", + "validators.go" + ], + "go": "1.24", + "module": "github.com/aws/aws-sdk-go-v2/service/codebuild", + "unstable": false +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/go_module_metadata.go new file mode 100644 index 00000000000..bd74a0f71c8 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/go_module_metadata.go @@ -0,0 +1,6 @@ +// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. + +package codebuild + +// goModuleVersion is the tagged release for this module +const goModuleVersion = "1.68.13" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/internal/endpoints/endpoints.go new file mode 100644 index 00000000000..86ef0d77624 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/internal/endpoints/endpoints.go @@ -0,0 +1,546 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package endpoints + +import ( + "github.com/aws/aws-sdk-go-v2/aws" + endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2" + "github.com/aws/smithy-go/logging" + "regexp" +) + +// Options is the endpoint resolver configuration options +type Options struct { + // Logger is a logging implementation that log events should be sent to. + Logger logging.Logger + + // LogDeprecated indicates that deprecated endpoints should be logged to the + // provided logger. + LogDeprecated bool + + // ResolvedRegion is used to override the region to be resolved, rather then the + // using the value passed to the ResolveEndpoint method. This value is used by the + // SDK to translate regions like fips-us-east-1 or us-east-1-fips to an alternative + // name. You must not set this value directly in your application. + ResolvedRegion string + + // DisableHTTPS informs the resolver to return an endpoint that does not use the + // HTTPS scheme. + DisableHTTPS bool + + // UseDualStackEndpoint specifies the resolver must resolve a dual-stack endpoint. + UseDualStackEndpoint aws.DualStackEndpointState + + // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint. + UseFIPSEndpoint aws.FIPSEndpointState +} + +func (o Options) GetResolvedRegion() string { + return o.ResolvedRegion +} + +func (o Options) GetDisableHTTPS() bool { + return o.DisableHTTPS +} + +func (o Options) GetUseDualStackEndpoint() aws.DualStackEndpointState { + return o.UseDualStackEndpoint +} + +func (o Options) GetUseFIPSEndpoint() aws.FIPSEndpointState { + return o.UseFIPSEndpoint +} + +func transformToSharedOptions(options Options) endpoints.Options { + return endpoints.Options{ + Logger: options.Logger, + LogDeprecated: options.LogDeprecated, + ResolvedRegion: options.ResolvedRegion, + DisableHTTPS: options.DisableHTTPS, + UseDualStackEndpoint: options.UseDualStackEndpoint, + UseFIPSEndpoint: options.UseFIPSEndpoint, + } +} + +// Resolver CodeBuild endpoint resolver +type Resolver struct { + partitions endpoints.Partitions +} + +// ResolveEndpoint resolves the service endpoint for the given region and options +func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) { + if len(region) == 0 { + return endpoint, &aws.MissingRegionError{} + } + + opt := transformToSharedOptions(options) + return r.partitions.ResolveEndpoint(region, opt) +} + +// New returns a new Resolver +func New() *Resolver { + return &Resolver{ + partitions: defaultPartitions, + } +} + +var partitionRegexp = struct { + Aws *regexp.Regexp + AwsCn *regexp.Regexp + AwsEusc *regexp.Regexp + AwsIso *regexp.Regexp + AwsIsoB *regexp.Regexp + AwsIsoE *regexp.Regexp + AwsIsoF *regexp.Regexp + AwsUsGov *regexp.Regexp +}{ + + Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$"), + AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), + AwsEusc: regexp.MustCompile("^eusc\\-(de)\\-\\w+\\-\\d+$"), + AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), + AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), + AwsIsoE: regexp.MustCompile("^eu\\-isoe\\-\\w+\\-\\d+$"), + AwsIsoF: regexp.MustCompile("^us\\-isof\\-\\w+\\-\\d+$"), + AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"), +} + +var defaultPartitions = endpoints.Partitions{ + { + ID: "aws", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "codebuild.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "codebuild-fips.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "codebuild-fips.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "codebuild.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.Aws, + IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "af-south-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-east-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-northeast-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-northeast-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-northeast-3", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-south-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-south-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-3", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-4", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ca-central-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-central-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-central-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-north-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-west-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-west-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-west-3", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "il-central-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "me-central-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "me-south-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "sa-east-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-east-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-east-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "codebuild-fips.us-east-1.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "us-east-1-fips", + }: endpoints.Endpoint{ + Hostname: "codebuild-fips.us-east-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-east-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "us-east-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-east-2", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "codebuild-fips.us-east-2.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "us-east-2-fips", + }: endpoints.Endpoint{ + Hostname: "codebuild-fips.us-east-2.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-east-2", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "us-west-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-west-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "codebuild-fips.us-west-1.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "us-west-1-fips", + }: endpoints.Endpoint{ + Hostname: "codebuild-fips.us-west-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-west-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "us-west-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-west-2", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "codebuild-fips.us-west-2.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "us-west-2-fips", + }: endpoints.Endpoint{ + Hostname: "codebuild-fips.us-west-2.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-west-2", + }, + Deprecated: aws.TrueTernary, + }, + }, + }, + { + ID: "aws-cn", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "codebuild.{region}.api.amazonwebservices.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "codebuild-fips.{region}.amazonaws.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "codebuild-fips.{region}.api.amazonwebservices.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "codebuild.{region}.amazonaws.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsCn, + IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "cn-north-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "cn-northwest-1", + }: endpoints.Endpoint{}, + }, + }, + { + ID: "aws-eusc", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "codebuild.{region}.api.amazonwebservices.eu", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "codebuild-fips.{region}.amazonaws.eu", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "codebuild-fips.{region}.api.amazonwebservices.eu", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "codebuild.{region}.amazonaws.eu", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsEusc, + IsRegionalized: true, + }, + { + ID: "aws-iso", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "codebuild-fips.{region}.c2s.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "codebuild.{region}.c2s.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIso, + IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "us-iso-east-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-iso-west-1", + }: endpoints.Endpoint{}, + }, + }, + { + ID: "aws-iso-b", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "codebuild-fips.{region}.sc2s.sgov.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "codebuild.{region}.sc2s.sgov.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIsoB, + IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "us-isob-east-1", + }: endpoints.Endpoint{}, + }, + }, + { + ID: "aws-iso-e", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "codebuild-fips.{region}.cloud.adc-e.uk", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "codebuild.{region}.cloud.adc-e.uk", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIsoE, + IsRegionalized: true, + }, + { + ID: "aws-iso-f", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "codebuild-fips.{region}.csp.hci.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "codebuild.{region}.csp.hci.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIsoF, + IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "us-isof-east-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-isof-south-1", + }: endpoints.Endpoint{}, + }, + }, + { + ID: "aws-us-gov", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "codebuild.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "codebuild-fips.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "codebuild-fips.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "codebuild.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsUsGov, + IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "us-gov-east-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-gov-east-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "codebuild-fips.us-gov-east-1.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "us-gov-east-1-fips", + }: endpoints.Endpoint{ + Hostname: "codebuild-fips.us-gov-east-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-gov-east-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "us-gov-west-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-gov-west-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "codebuild-fips.us-gov-west-1.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "us-gov-west-1-fips", + }: endpoints.Endpoint{ + Hostname: "codebuild-fips.us-gov-west-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-gov-west-1", + }, + Deprecated: aws.TrueTernary, + }, + }, + }, +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/options.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/options.go new file mode 100644 index 00000000000..9a93ca9c7df --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/options.go @@ -0,0 +1,238 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy" + smithyauth "github.com/aws/smithy-go/auth" + "github.com/aws/smithy-go/logging" + "github.com/aws/smithy-go/metrics" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net/http" +) + +type HTTPClient interface { + Do(*http.Request) (*http.Response, error) +} + +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 optional application specific identifier appended to the User-Agent header. + AppID string + + // This endpoint will be given as input to an EndpointResolverV2. It is used for + // providing a custom base endpoint that is subject to modifications by the + // processing EndpointResolverV2. + BaseEndpoint *string + + // Configures the events that will be sent to the configured logger. + ClientLogMode aws.ClientLogMode + + // The credentials object to use when signing requests. + Credentials aws.CredentialsProvider + + // The configuration DefaultsMode that the SDK should use when constructing the + // clients initial default settings. + DefaultsMode aws.DefaultsMode + + // The endpoint options to be used when attempting to resolve an endpoint. + EndpointOptions EndpointResolverOptions + + // The service endpoint resolver. + // + // Deprecated: Deprecated: EndpointResolver and WithEndpointResolver. Providing a + // value for this field will likely prevent you from using any endpoint-related + // service features released after the introduction of EndpointResolverV2 and + // BaseEndpoint. + // + // To migrate an EndpointResolver implementation that uses a custom endpoint, set + // the client option BaseEndpoint instead. + EndpointResolver EndpointResolver + + // Resolves the endpoint used for a particular service operation. + EndpointResolverV2 EndpointResolverV2 + + // Signature Version 4 (SigV4) Signer + HTTPSignerV4 HTTPSignerV4 + + // The logger writer interface to write logging messages to. + Logger logging.Logger + + // The client meter provider. + MeterProvider metrics.MeterProvider + + // The region to send requests to. (Required) + Region string + + // RetryMaxAttempts specifies the maximum number attempts an API client will call + // an operation that fails with a retryable error. A value of 0 is ignored, and + // will not be used to configure the API client created default retryer, or modify + // per operation call's retry max attempts. + // + // If specified in an operation call's functional options with a value that is + // different than the constructed client's Options, the Client's Retryer will be + // wrapped to use the operation's specific RetryMaxAttempts value. + RetryMaxAttempts int + + // RetryMode specifies the retry mode the API client will be created with, if + // Retryer option is not also specified. + // + // When creating a new API Clients this member will only be used if the Retryer + // Options member is nil. This value will be ignored if Retryer is not nil. + // + // Currently does not support per operation call overrides, may in the future. + RetryMode aws.RetryMode + + // Retryer guides how HTTP requests should be retried in case of recoverable + // failures. When nil the API client will use a default retryer. The kind of + // default retry created by the API client can be changed with the RetryMode + // option. + Retryer aws.Retryer + + // The RuntimeEnvironment configuration, only populated if the DefaultsMode is set + // to DefaultsModeAuto and is initialized using config.LoadDefaultConfig . You + // should not populate this structure programmatically, or rely on the values here + // within your applications. + RuntimeEnvironment aws.RuntimeEnvironment + + // The client tracer provider. + TracerProvider tracing.TracerProvider + + // The initial DefaultsMode used when the client options were constructed. If the + // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved + // value was at that point in time. + // + // Currently does not support per operation call overrides, may in the future. + resolvedDefaultsMode aws.DefaultsMode + + // The HTTP client to invoke API calls with. Defaults to client's default HTTP + // implementation if nil. + HTTPClient HTTPClient + + // Client registry of operation interceptors. + Interceptors smithyhttp.InterceptorRegistry + + // The auth scheme resolver which determines how to authenticate for each + // operation. + AuthSchemeResolver AuthSchemeResolver + + // The list of auth schemes supported by the client. + AuthSchemes []smithyhttp.AuthScheme + + // Priority list of preferred auth scheme names (e.g. sigv4a). + AuthSchemePreference []string +} + +// 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) + to.Interceptors = o.Interceptors.Copy() + + return to +} + +func (o Options) GetIdentityResolver(schemeID string) smithyauth.IdentityResolver { + if schemeID == "aws.auth#sigv4" { + return getSigV4IdentityResolver(o) + } + if schemeID == "smithy.api#noAuth" { + return &smithyauth.AnonymousIdentityResolver{} + } + return nil +} + +// 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...) + } +} + +// Deprecated: EndpointResolver and WithEndpointResolver. Providing a value for +// this field will likely prevent you from using any endpoint-related service +// features released after the introduction of EndpointResolverV2 and BaseEndpoint. +// +// To migrate an EndpointResolver implementation that uses a custom endpoint, set +// the client option BaseEndpoint instead. +func WithEndpointResolver(v EndpointResolver) func(*Options) { + return func(o *Options) { + o.EndpointResolver = v + } +} + +// WithEndpointResolverV2 returns a functional option for setting the Client's +// EndpointResolverV2 option. +func WithEndpointResolverV2(v EndpointResolverV2) func(*Options) { + return func(o *Options) { + o.EndpointResolverV2 = v + } +} + +func getSigV4IdentityResolver(o Options) smithyauth.IdentityResolver { + if o.Credentials != nil { + return &internalauthsmithy.CredentialsProviderAdapter{Provider: o.Credentials} + } + return nil +} + +// WithSigV4SigningName applies an override to the authentication workflow to +// use the given signing name for SigV4-authenticated operations. +// +// This is an advanced setting. The value here is FINAL, taking precedence over +// the resolved signing name from both auth scheme resolution and endpoint +// resolution. +func WithSigV4SigningName(name string) func(*Options) { + fn := func(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, + ) { + return next.HandleInitialize(awsmiddleware.SetSigningName(ctx, name), in) + } + return func(o *Options) { + o.APIOptions = append(o.APIOptions, func(s *middleware.Stack) error { + return s.Initialize.Add( + middleware.InitializeMiddlewareFunc("withSigV4SigningName", fn), + middleware.Before, + ) + }) + } +} + +// WithSigV4SigningRegion applies an override to the authentication workflow to +// use the given signing region for SigV4-authenticated operations. +// +// This is an advanced setting. The value here is FINAL, taking precedence over +// the resolved signing region from both auth scheme resolution and endpoint +// resolution. +func WithSigV4SigningRegion(region string) func(*Options) { + fn := func(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, + ) { + return next.HandleInitialize(awsmiddleware.SetSigningRegion(ctx, region), in) + } + return func(o *Options) { + o.APIOptions = append(o.APIOptions, func(s *middleware.Stack) error { + return s.Initialize.Add( + middleware.InitializeMiddlewareFunc("withSigV4SigningRegion", fn), + middleware.Before, + ) + }) + } +} + +func ignoreAnonymousAuth(options *Options) { + if aws.IsCredentialsProvider(options.Credentials, (*aws.AnonymousCredentials)(nil)) { + options.Credentials = nil + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/serializers.go new file mode 100644 index 00000000000..14cdd8fff09 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/serializers.go @@ -0,0 +1,6705 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "bytes" + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/codebuild/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/encoding/httpbinding" + smithyjson "github.com/aws/smithy-go/encoding/json" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" + smithyhttp "github.com/aws/smithy-go/transport/http" + "math" + "path" +) + +type awsAwsjson11_serializeOpBatchDeleteBuilds struct { +} + +func (*awsAwsjson11_serializeOpBatchDeleteBuilds) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpBatchDeleteBuilds) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*BatchDeleteBuildsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.BatchDeleteBuilds") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentBatchDeleteBuildsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpBatchGetBuildBatches struct { +} + +func (*awsAwsjson11_serializeOpBatchGetBuildBatches) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpBatchGetBuildBatches) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*BatchGetBuildBatchesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.BatchGetBuildBatches") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentBatchGetBuildBatchesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpBatchGetBuilds struct { +} + +func (*awsAwsjson11_serializeOpBatchGetBuilds) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpBatchGetBuilds) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*BatchGetBuildsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.BatchGetBuilds") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentBatchGetBuildsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpBatchGetCommandExecutions struct { +} + +func (*awsAwsjson11_serializeOpBatchGetCommandExecutions) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpBatchGetCommandExecutions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*BatchGetCommandExecutionsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.BatchGetCommandExecutions") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentBatchGetCommandExecutionsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpBatchGetFleets struct { +} + +func (*awsAwsjson11_serializeOpBatchGetFleets) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpBatchGetFleets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*BatchGetFleetsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.BatchGetFleets") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentBatchGetFleetsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpBatchGetProjects struct { +} + +func (*awsAwsjson11_serializeOpBatchGetProjects) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpBatchGetProjects) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*BatchGetProjectsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.BatchGetProjects") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentBatchGetProjectsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpBatchGetReportGroups struct { +} + +func (*awsAwsjson11_serializeOpBatchGetReportGroups) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpBatchGetReportGroups) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*BatchGetReportGroupsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.BatchGetReportGroups") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentBatchGetReportGroupsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpBatchGetReports struct { +} + +func (*awsAwsjson11_serializeOpBatchGetReports) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpBatchGetReports) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*BatchGetReportsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.BatchGetReports") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentBatchGetReportsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpBatchGetSandboxes struct { +} + +func (*awsAwsjson11_serializeOpBatchGetSandboxes) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpBatchGetSandboxes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*BatchGetSandboxesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.BatchGetSandboxes") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentBatchGetSandboxesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpCreateFleet struct { +} + +func (*awsAwsjson11_serializeOpCreateFleet) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpCreateFleet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := 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)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.CreateFleet") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentCreateFleetInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpCreateProject struct { +} + +func (*awsAwsjson11_serializeOpCreateProject) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpCreateProject) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateProjectInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.CreateProject") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentCreateProjectInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpCreateReportGroup struct { +} + +func (*awsAwsjson11_serializeOpCreateReportGroup) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpCreateReportGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateReportGroupInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.CreateReportGroup") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentCreateReportGroupInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpCreateWebhook struct { +} + +func (*awsAwsjson11_serializeOpCreateWebhook) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpCreateWebhook) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateWebhookInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.CreateWebhook") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentCreateWebhookInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDeleteBuildBatch struct { +} + +func (*awsAwsjson11_serializeOpDeleteBuildBatch) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteBuildBatch) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteBuildBatchInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.DeleteBuildBatch") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteBuildBatchInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDeleteFleet struct { +} + +func (*awsAwsjson11_serializeOpDeleteFleet) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteFleet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteFleetInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.DeleteFleet") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteFleetInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDeleteProject struct { +} + +func (*awsAwsjson11_serializeOpDeleteProject) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteProject) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteProjectInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.DeleteProject") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteProjectInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDeleteReport struct { +} + +func (*awsAwsjson11_serializeOpDeleteReport) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteReport) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteReportInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.DeleteReport") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteReportInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDeleteReportGroup struct { +} + +func (*awsAwsjson11_serializeOpDeleteReportGroup) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteReportGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteReportGroupInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.DeleteReportGroup") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteReportGroupInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDeleteResourcePolicy struct { +} + +func (*awsAwsjson11_serializeOpDeleteResourcePolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteResourcePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteResourcePolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.DeleteResourcePolicy") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteResourcePolicyInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDeleteSourceCredentials struct { +} + +func (*awsAwsjson11_serializeOpDeleteSourceCredentials) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteSourceCredentials) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteSourceCredentialsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.DeleteSourceCredentials") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteSourceCredentialsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDeleteWebhook struct { +} + +func (*awsAwsjson11_serializeOpDeleteWebhook) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteWebhook) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteWebhookInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.DeleteWebhook") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteWebhookInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribeCodeCoverages struct { +} + +func (*awsAwsjson11_serializeOpDescribeCodeCoverages) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeCodeCoverages) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeCodeCoveragesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.DescribeCodeCoverages") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeCodeCoveragesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpDescribeTestCases struct { +} + +func (*awsAwsjson11_serializeOpDescribeTestCases) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeTestCases) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeTestCasesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.DescribeTestCases") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeTestCasesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpGetReportGroupTrend struct { +} + +func (*awsAwsjson11_serializeOpGetReportGroupTrend) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetReportGroupTrend) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetReportGroupTrendInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.GetReportGroupTrend") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetReportGroupTrendInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpGetResourcePolicy struct { +} + +func (*awsAwsjson11_serializeOpGetResourcePolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetResourcePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetResourcePolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.GetResourcePolicy") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetResourcePolicyInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpImportSourceCredentials struct { +} + +func (*awsAwsjson11_serializeOpImportSourceCredentials) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpImportSourceCredentials) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ImportSourceCredentialsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.ImportSourceCredentials") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentImportSourceCredentialsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpInvalidateProjectCache struct { +} + +func (*awsAwsjson11_serializeOpInvalidateProjectCache) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpInvalidateProjectCache) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*InvalidateProjectCacheInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.InvalidateProjectCache") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentInvalidateProjectCacheInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpListBuildBatches struct { +} + +func (*awsAwsjson11_serializeOpListBuildBatches) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListBuildBatches) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListBuildBatchesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.ListBuildBatches") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListBuildBatchesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpListBuildBatchesForProject struct { +} + +func (*awsAwsjson11_serializeOpListBuildBatchesForProject) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListBuildBatchesForProject) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListBuildBatchesForProjectInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.ListBuildBatchesForProject") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListBuildBatchesForProjectInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpListBuilds struct { +} + +func (*awsAwsjson11_serializeOpListBuilds) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListBuilds) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListBuildsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.ListBuilds") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListBuildsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpListBuildsForProject struct { +} + +func (*awsAwsjson11_serializeOpListBuildsForProject) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListBuildsForProject) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListBuildsForProjectInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.ListBuildsForProject") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListBuildsForProjectInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpListCommandExecutionsForSandbox struct { +} + +func (*awsAwsjson11_serializeOpListCommandExecutionsForSandbox) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListCommandExecutionsForSandbox) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListCommandExecutionsForSandboxInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.ListCommandExecutionsForSandbox") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListCommandExecutionsForSandboxInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpListCuratedEnvironmentImages struct { +} + +func (*awsAwsjson11_serializeOpListCuratedEnvironmentImages) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListCuratedEnvironmentImages) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListCuratedEnvironmentImagesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.ListCuratedEnvironmentImages") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListCuratedEnvironmentImagesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpListFleets struct { +} + +func (*awsAwsjson11_serializeOpListFleets) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListFleets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListFleetsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.ListFleets") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListFleetsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpListProjects struct { +} + +func (*awsAwsjson11_serializeOpListProjects) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListProjects) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListProjectsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.ListProjects") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListProjectsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpListReportGroups struct { +} + +func (*awsAwsjson11_serializeOpListReportGroups) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListReportGroups) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListReportGroupsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.ListReportGroups") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListReportGroupsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpListReports struct { +} + +func (*awsAwsjson11_serializeOpListReports) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListReports) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListReportsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.ListReports") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListReportsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpListReportsForReportGroup struct { +} + +func (*awsAwsjson11_serializeOpListReportsForReportGroup) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListReportsForReportGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListReportsForReportGroupInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.ListReportsForReportGroup") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListReportsForReportGroupInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpListSandboxes struct { +} + +func (*awsAwsjson11_serializeOpListSandboxes) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListSandboxes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListSandboxesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.ListSandboxes") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListSandboxesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpListSandboxesForProject struct { +} + +func (*awsAwsjson11_serializeOpListSandboxesForProject) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListSandboxesForProject) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListSandboxesForProjectInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.ListSandboxesForProject") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListSandboxesForProjectInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpListSharedProjects struct { +} + +func (*awsAwsjson11_serializeOpListSharedProjects) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListSharedProjects) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListSharedProjectsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.ListSharedProjects") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListSharedProjectsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpListSharedReportGroups struct { +} + +func (*awsAwsjson11_serializeOpListSharedReportGroups) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListSharedReportGroups) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListSharedReportGroupsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.ListSharedReportGroups") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListSharedReportGroupsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpListSourceCredentials struct { +} + +func (*awsAwsjson11_serializeOpListSourceCredentials) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListSourceCredentials) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListSourceCredentialsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.ListSourceCredentials") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListSourceCredentialsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpPutResourcePolicy struct { +} + +func (*awsAwsjson11_serializeOpPutResourcePolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpPutResourcePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*PutResourcePolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.PutResourcePolicy") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentPutResourcePolicyInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpRetryBuild struct { +} + +func (*awsAwsjson11_serializeOpRetryBuild) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpRetryBuild) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*RetryBuildInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.RetryBuild") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentRetryBuildInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpRetryBuildBatch struct { +} + +func (*awsAwsjson11_serializeOpRetryBuildBatch) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpRetryBuildBatch) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*RetryBuildBatchInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.RetryBuildBatch") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentRetryBuildBatchInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpStartBuild struct { +} + +func (*awsAwsjson11_serializeOpStartBuild) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpStartBuild) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*StartBuildInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.StartBuild") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentStartBuildInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpStartBuildBatch struct { +} + +func (*awsAwsjson11_serializeOpStartBuildBatch) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpStartBuildBatch) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*StartBuildBatchInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.StartBuildBatch") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentStartBuildBatchInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpStartCommandExecution struct { +} + +func (*awsAwsjson11_serializeOpStartCommandExecution) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpStartCommandExecution) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*StartCommandExecutionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.StartCommandExecution") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentStartCommandExecutionInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpStartSandbox struct { +} + +func (*awsAwsjson11_serializeOpStartSandbox) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpStartSandbox) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*StartSandboxInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.StartSandbox") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentStartSandboxInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpStartSandboxConnection struct { +} + +func (*awsAwsjson11_serializeOpStartSandboxConnection) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpStartSandboxConnection) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*StartSandboxConnectionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.StartSandboxConnection") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentStartSandboxConnectionInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpStopBuild struct { +} + +func (*awsAwsjson11_serializeOpStopBuild) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpStopBuild) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*StopBuildInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.StopBuild") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentStopBuildInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpStopBuildBatch struct { +} + +func (*awsAwsjson11_serializeOpStopBuildBatch) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpStopBuildBatch) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*StopBuildBatchInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.StopBuildBatch") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentStopBuildBatchInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpStopSandbox struct { +} + +func (*awsAwsjson11_serializeOpStopSandbox) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpStopSandbox) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*StopSandboxInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.StopSandbox") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentStopSandboxInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpUpdateFleet struct { +} + +func (*awsAwsjson11_serializeOpUpdateFleet) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpUpdateFleet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateFleetInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.UpdateFleet") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentUpdateFleetInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpUpdateProject struct { +} + +func (*awsAwsjson11_serializeOpUpdateProject) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpUpdateProject) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateProjectInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.UpdateProject") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentUpdateProjectInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpUpdateProjectVisibility struct { +} + +func (*awsAwsjson11_serializeOpUpdateProjectVisibility) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpUpdateProjectVisibility) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateProjectVisibilityInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.UpdateProjectVisibility") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentUpdateProjectVisibilityInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpUpdateReportGroup struct { +} + +func (*awsAwsjson11_serializeOpUpdateReportGroup) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpUpdateReportGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateReportGroupInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.UpdateReportGroup") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentUpdateReportGroupInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpUpdateWebhook struct { +} + +func (*awsAwsjson11_serializeOpUpdateWebhook) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpUpdateWebhook) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateWebhookInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodeBuild_20161006.UpdateWebhook") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentUpdateWebhookInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsAwsjson11_serializeDocumentBatchRestrictions(v *types.BatchRestrictions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ComputeTypesAllowed != nil { + ok := object.Key("computeTypesAllowed") + if err := awsAwsjson11_serializeDocumentComputeTypesAllowed(v.ComputeTypesAllowed, ok); err != nil { + return err + } + } + + if v.FleetsAllowed != nil { + ok := object.Key("fleetsAllowed") + if err := awsAwsjson11_serializeDocumentFleetsAllowed(v.FleetsAllowed, ok); err != nil { + return err + } + } + + if v.MaximumBuildsAllowed != nil { + ok := object.Key("maximumBuildsAllowed") + ok.Integer(*v.MaximumBuildsAllowed) + } + + return nil +} + +func awsAwsjson11_serializeDocumentBuildBatchFilter(v *types.BuildBatchFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Status) > 0 { + ok := object.Key("status") + ok.String(string(v.Status)) + } + + return nil +} + +func awsAwsjson11_serializeDocumentBuildBatchIds(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentBuildIds(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentBuildStatusConfig(v *types.BuildStatusConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Context != nil { + ok := object.Key("context") + ok.String(*v.Context) + } + + if v.TargetUrl != nil { + ok := object.Key("targetUrl") + ok.String(*v.TargetUrl) + } + + return nil +} + +func awsAwsjson11_serializeDocumentCloudWatchLogsConfig(v *types.CloudWatchLogsConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.GroupName != nil { + ok := object.Key("groupName") + ok.String(*v.GroupName) + } + + if len(v.Status) > 0 { + ok := object.Key("status") + ok.String(string(v.Status)) + } + + if v.StreamName != nil { + ok := object.Key("streamName") + ok.String(*v.StreamName) + } + + return nil +} + +func awsAwsjson11_serializeDocumentCommandExecutionIds(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentComputeConfiguration(v *types.ComputeConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Disk != nil { + ok := object.Key("disk") + ok.Long(*v.Disk) + } + + if v.InstanceType != nil { + ok := object.Key("instanceType") + ok.String(*v.InstanceType) + } + + if len(v.MachineType) > 0 { + ok := object.Key("machineType") + ok.String(string(v.MachineType)) + } + + if v.Memory != nil { + ok := object.Key("memory") + ok.Long(*v.Memory) + } + + if v.VCpu != nil { + ok := object.Key("vCpu") + ok.Long(*v.VCpu) + } + + return nil +} + +func awsAwsjson11_serializeDocumentComputeTypesAllowed(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentDockerServer(v *types.DockerServer, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.ComputeType) > 0 { + ok := object.Key("computeType") + ok.String(string(v.ComputeType)) + } + + if v.SecurityGroupIds != nil { + ok := object.Key("securityGroupIds") + if err := awsAwsjson11_serializeDocumentSecurityGroupIds(v.SecurityGroupIds, ok); err != nil { + return err + } + } + + if v.Status != nil { + ok := object.Key("status") + if err := awsAwsjson11_serializeDocumentDockerServerStatus(v.Status, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentDockerServerStatus(v *types.DockerServerStatus, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Message != nil { + ok := object.Key("message") + ok.String(*v.Message) + } + + if v.Status != nil { + ok := object.Key("status") + ok.String(*v.Status) + } + + return nil +} + +func awsAwsjson11_serializeDocumentEnvironmentVariable(v *types.EnvironmentVariable, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if len(v.Type) > 0 { + ok := object.Key("type") + ok.String(string(v.Type)) + } + + if v.Value != nil { + ok := object.Key("value") + ok.String(*v.Value) + } + + return nil +} + +func awsAwsjson11_serializeDocumentEnvironmentVariables(v []types.EnvironmentVariable, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentEnvironmentVariable(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentFilterGroup(v []types.WebhookFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentWebhookFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentFilterGroups(v [][]types.WebhookFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if vv := v[i]; vv == nil { + continue + } + if err := awsAwsjson11_serializeDocumentFilterGroup(v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentFleetNames(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentFleetProxyRule(v *types.FleetProxyRule, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Effect) > 0 { + ok := object.Key("effect") + ok.String(string(v.Effect)) + } + + if v.Entities != nil { + ok := object.Key("entities") + if err := awsAwsjson11_serializeDocumentFleetProxyRuleEntities(v.Entities, ok); err != nil { + return err + } + } + + if len(v.Type) > 0 { + ok := object.Key("type") + ok.String(string(v.Type)) + } + + return nil +} + +func awsAwsjson11_serializeDocumentFleetProxyRuleEntities(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentFleetProxyRules(v []types.FleetProxyRule, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentFleetProxyRule(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentFleetsAllowed(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentGitSubmodulesConfig(v *types.GitSubmodulesConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.FetchSubmodules != nil { + ok := object.Key("fetchSubmodules") + ok.Boolean(*v.FetchSubmodules) + } + + return nil +} + +func awsAwsjson11_serializeDocumentLogsConfig(v *types.LogsConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CloudWatchLogs != nil { + ok := object.Key("cloudWatchLogs") + if err := awsAwsjson11_serializeDocumentCloudWatchLogsConfig(v.CloudWatchLogs, ok); err != nil { + return err + } + } + + if v.S3Logs != nil { + ok := object.Key("s3Logs") + if err := awsAwsjson11_serializeDocumentS3LogsConfig(v.S3Logs, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentProjectArtifacts(v *types.ProjectArtifacts, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ArtifactIdentifier != nil { + ok := object.Key("artifactIdentifier") + ok.String(*v.ArtifactIdentifier) + } + + if len(v.BucketOwnerAccess) > 0 { + ok := object.Key("bucketOwnerAccess") + ok.String(string(v.BucketOwnerAccess)) + } + + if v.EncryptionDisabled != nil { + ok := object.Key("encryptionDisabled") + ok.Boolean(*v.EncryptionDisabled) + } + + if v.Location != nil { + ok := object.Key("location") + ok.String(*v.Location) + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if len(v.NamespaceType) > 0 { + ok := object.Key("namespaceType") + ok.String(string(v.NamespaceType)) + } + + if v.OverrideArtifactName != nil { + ok := object.Key("overrideArtifactName") + ok.Boolean(*v.OverrideArtifactName) + } + + if len(v.Packaging) > 0 { + ok := object.Key("packaging") + ok.String(string(v.Packaging)) + } + + if v.Path != nil { + ok := object.Key("path") + ok.String(*v.Path) + } + + if len(v.Type) > 0 { + ok := object.Key("type") + ok.String(string(v.Type)) + } + + return nil +} + +func awsAwsjson11_serializeDocumentProjectArtifactsList(v []types.ProjectArtifacts, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentProjectArtifacts(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentProjectBuildBatchConfig(v *types.ProjectBuildBatchConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.BatchReportMode) > 0 { + ok := object.Key("batchReportMode") + ok.String(string(v.BatchReportMode)) + } + + if v.CombineArtifacts != nil { + ok := object.Key("combineArtifacts") + ok.Boolean(*v.CombineArtifacts) + } + + if v.Restrictions != nil { + ok := object.Key("restrictions") + if err := awsAwsjson11_serializeDocumentBatchRestrictions(v.Restrictions, ok); err != nil { + return err + } + } + + if v.ServiceRole != nil { + ok := object.Key("serviceRole") + ok.String(*v.ServiceRole) + } + + if v.TimeoutInMins != nil { + ok := object.Key("timeoutInMins") + ok.Integer(*v.TimeoutInMins) + } + + return nil +} + +func awsAwsjson11_serializeDocumentProjectCache(v *types.ProjectCache, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CacheNamespace != nil { + ok := object.Key("cacheNamespace") + ok.String(*v.CacheNamespace) + } + + if v.Location != nil { + ok := object.Key("location") + ok.String(*v.Location) + } + + if v.Modes != nil { + ok := object.Key("modes") + if err := awsAwsjson11_serializeDocumentProjectCacheModes(v.Modes, ok); err != nil { + return err + } + } + + if len(v.Type) > 0 { + ok := object.Key("type") + ok.String(string(v.Type)) + } + + return nil +} + +func awsAwsjson11_serializeDocumentProjectCacheModes(v []types.CacheMode, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + +func awsAwsjson11_serializeDocumentProjectEnvironment(v *types.ProjectEnvironment, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Certificate != nil { + ok := object.Key("certificate") + ok.String(*v.Certificate) + } + + if v.ComputeConfiguration != nil { + ok := object.Key("computeConfiguration") + if err := awsAwsjson11_serializeDocumentComputeConfiguration(v.ComputeConfiguration, ok); err != nil { + return err + } + } + + if len(v.ComputeType) > 0 { + ok := object.Key("computeType") + ok.String(string(v.ComputeType)) + } + + if v.DockerServer != nil { + ok := object.Key("dockerServer") + if err := awsAwsjson11_serializeDocumentDockerServer(v.DockerServer, ok); err != nil { + return err + } + } + + if v.EnvironmentVariables != nil { + ok := object.Key("environmentVariables") + if err := awsAwsjson11_serializeDocumentEnvironmentVariables(v.EnvironmentVariables, ok); err != nil { + return err + } + } + + if v.Fleet != nil { + ok := object.Key("fleet") + if err := awsAwsjson11_serializeDocumentProjectFleet(v.Fleet, ok); err != nil { + return err + } + } + + if v.Image != nil { + ok := object.Key("image") + ok.String(*v.Image) + } + + if len(v.ImagePullCredentialsType) > 0 { + ok := object.Key("imagePullCredentialsType") + ok.String(string(v.ImagePullCredentialsType)) + } + + if v.PrivilegedMode != nil { + ok := object.Key("privilegedMode") + ok.Boolean(*v.PrivilegedMode) + } + + if v.RegistryCredential != nil { + ok := object.Key("registryCredential") + if err := awsAwsjson11_serializeDocumentRegistryCredential(v.RegistryCredential, ok); err != nil { + return err + } + } + + if len(v.Type) > 0 { + ok := object.Key("type") + ok.String(string(v.Type)) + } + + return nil +} + +func awsAwsjson11_serializeDocumentProjectFileSystemLocation(v *types.ProjectFileSystemLocation, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Identifier != nil { + ok := object.Key("identifier") + ok.String(*v.Identifier) + } + + if v.Location != nil { + ok := object.Key("location") + ok.String(*v.Location) + } + + if v.MountOptions != nil { + ok := object.Key("mountOptions") + ok.String(*v.MountOptions) + } + + if v.MountPoint != nil { + ok := object.Key("mountPoint") + ok.String(*v.MountPoint) + } + + if len(v.Type) > 0 { + ok := object.Key("type") + ok.String(string(v.Type)) + } + + return nil +} + +func awsAwsjson11_serializeDocumentProjectFileSystemLocations(v []types.ProjectFileSystemLocation, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentProjectFileSystemLocation(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentProjectFleet(v *types.ProjectFleet, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.FleetArn != nil { + ok := object.Key("fleetArn") + ok.String(*v.FleetArn) + } + + return nil +} + +func awsAwsjson11_serializeDocumentProjectNames(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentProjectSecondarySourceVersions(v []types.ProjectSourceVersion, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentProjectSourceVersion(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentProjectSource(v *types.ProjectSource, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Auth != nil { + ok := object.Key("auth") + if err := awsAwsjson11_serializeDocumentSourceAuth(v.Auth, ok); err != nil { + return err + } + } + + if v.Buildspec != nil { + ok := object.Key("buildspec") + ok.String(*v.Buildspec) + } + + if v.BuildStatusConfig != nil { + ok := object.Key("buildStatusConfig") + if err := awsAwsjson11_serializeDocumentBuildStatusConfig(v.BuildStatusConfig, ok); err != nil { + return err + } + } + + if v.GitCloneDepth != nil { + ok := object.Key("gitCloneDepth") + ok.Integer(*v.GitCloneDepth) + } + + if v.GitSubmodulesConfig != nil { + ok := object.Key("gitSubmodulesConfig") + if err := awsAwsjson11_serializeDocumentGitSubmodulesConfig(v.GitSubmodulesConfig, ok); err != nil { + return err + } + } + + if v.InsecureSsl != nil { + ok := object.Key("insecureSsl") + ok.Boolean(*v.InsecureSsl) + } + + if v.Location != nil { + ok := object.Key("location") + ok.String(*v.Location) + } + + if v.ReportBuildStatus != nil { + ok := object.Key("reportBuildStatus") + ok.Boolean(*v.ReportBuildStatus) + } + + if v.SourceIdentifier != nil { + ok := object.Key("sourceIdentifier") + ok.String(*v.SourceIdentifier) + } + + if len(v.Type) > 0 { + ok := object.Key("type") + ok.String(string(v.Type)) + } + + return nil +} + +func awsAwsjson11_serializeDocumentProjectSources(v []types.ProjectSource, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentProjectSource(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentProjectSourceVersion(v *types.ProjectSourceVersion, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.SourceIdentifier != nil { + ok := object.Key("sourceIdentifier") + ok.String(*v.SourceIdentifier) + } + + if v.SourceVersion != nil { + ok := object.Key("sourceVersion") + ok.String(*v.SourceVersion) + } + + return nil +} + +func awsAwsjson11_serializeDocumentProxyConfiguration(v *types.ProxyConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.DefaultBehavior) > 0 { + ok := object.Key("defaultBehavior") + ok.String(string(v.DefaultBehavior)) + } + + if v.OrderedProxyRules != nil { + ok := object.Key("orderedProxyRules") + if err := awsAwsjson11_serializeDocumentFleetProxyRules(v.OrderedProxyRules, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentPullRequestBuildApproverRoles(v []types.PullRequestBuildApproverRole, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + +func awsAwsjson11_serializeDocumentPullRequestBuildPolicy(v *types.PullRequestBuildPolicy, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ApproverRoles != nil { + ok := object.Key("approverRoles") + if err := awsAwsjson11_serializeDocumentPullRequestBuildApproverRoles(v.ApproverRoles, ok); err != nil { + return err + } + } + + if len(v.RequiresCommentApproval) > 0 { + ok := object.Key("requiresCommentApproval") + ok.String(string(v.RequiresCommentApproval)) + } + + return nil +} + +func awsAwsjson11_serializeDocumentRegistryCredential(v *types.RegistryCredential, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Credential != nil { + ok := object.Key("credential") + ok.String(*v.Credential) + } + + if len(v.CredentialProvider) > 0 { + ok := object.Key("credentialProvider") + ok.String(string(v.CredentialProvider)) + } + + return nil +} + +func awsAwsjson11_serializeDocumentReportArns(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentReportExportConfig(v *types.ReportExportConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.ExportConfigType) > 0 { + ok := object.Key("exportConfigType") + ok.String(string(v.ExportConfigType)) + } + + if v.S3Destination != nil { + ok := object.Key("s3Destination") + if err := awsAwsjson11_serializeDocumentS3ReportExportConfig(v.S3Destination, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentReportFilter(v *types.ReportFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Status) > 0 { + ok := object.Key("status") + ok.String(string(v.Status)) + } + + return nil +} + +func awsAwsjson11_serializeDocumentReportGroupArns(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentS3LogsConfig(v *types.S3LogsConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.BucketOwnerAccess) > 0 { + ok := object.Key("bucketOwnerAccess") + ok.String(string(v.BucketOwnerAccess)) + } + + if v.EncryptionDisabled != nil { + ok := object.Key("encryptionDisabled") + ok.Boolean(*v.EncryptionDisabled) + } + + if v.Location != nil { + ok := object.Key("location") + ok.String(*v.Location) + } + + if len(v.Status) > 0 { + ok := object.Key("status") + ok.String(string(v.Status)) + } + + return nil +} + +func awsAwsjson11_serializeDocumentS3ReportExportConfig(v *types.S3ReportExportConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Bucket != nil { + ok := object.Key("bucket") + ok.String(*v.Bucket) + } + + if v.BucketOwner != nil { + ok := object.Key("bucketOwner") + ok.String(*v.BucketOwner) + } + + if v.EncryptionDisabled != nil { + ok := object.Key("encryptionDisabled") + ok.Boolean(*v.EncryptionDisabled) + } + + if v.EncryptionKey != nil { + ok := object.Key("encryptionKey") + ok.String(*v.EncryptionKey) + } + + if len(v.Packaging) > 0 { + ok := object.Key("packaging") + ok.String(string(v.Packaging)) + } + + if v.Path != nil { + ok := object.Key("path") + ok.String(*v.Path) + } + + return nil +} + +func awsAwsjson11_serializeDocumentSandboxIds(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentScalingConfigurationInput(v *types.ScalingConfigurationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MaxCapacity != nil { + ok := object.Key("maxCapacity") + ok.Integer(*v.MaxCapacity) + } + + if len(v.ScalingType) > 0 { + ok := object.Key("scalingType") + ok.String(string(v.ScalingType)) + } + + if v.TargetTrackingScalingConfigs != nil { + ok := object.Key("targetTrackingScalingConfigs") + if err := awsAwsjson11_serializeDocumentTargetTrackingScalingConfigurations(v.TargetTrackingScalingConfigs, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentScopeConfiguration(v *types.ScopeConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Domain != nil { + ok := object.Key("domain") + ok.String(*v.Domain) + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if len(v.Scope) > 0 { + ok := object.Key("scope") + ok.String(string(v.Scope)) + } + + return nil +} + +func awsAwsjson11_serializeDocumentSecurityGroupIds(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentSourceAuth(v *types.SourceAuth, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Resource != nil { + ok := object.Key("resource") + ok.String(*v.Resource) + } + + if len(v.Type) > 0 { + ok := object.Key("type") + ok.String(string(v.Type)) + } + + return nil +} + +func awsAwsjson11_serializeDocumentSubnets(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsAwsjson11_serializeDocumentTag(v *types.Tag, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Key != nil { + ok := object.Key("key") + ok.String(*v.Key) + } + + if v.Value != nil { + ok := object.Key("value") + ok.String(*v.Value) + } + + return nil +} + +func awsAwsjson11_serializeDocumentTagList(v []types.Tag, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentTag(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentTargetTrackingScalingConfiguration(v *types.TargetTrackingScalingConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.MetricType) > 0 { + ok := object.Key("metricType") + ok.String(string(v.MetricType)) + } + + if v.TargetValue != nil { + ok := object.Key("targetValue") + switch { + case math.IsNaN(*v.TargetValue): + ok.String("NaN") + + case math.IsInf(*v.TargetValue, 1): + ok.String("Infinity") + + case math.IsInf(*v.TargetValue, -1): + ok.String("-Infinity") + + default: + ok.Double(*v.TargetValue) + + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentTargetTrackingScalingConfigurations(v []types.TargetTrackingScalingConfiguration, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentTargetTrackingScalingConfiguration(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentTestCaseFilter(v *types.TestCaseFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Keyword != nil { + ok := object.Key("keyword") + ok.String(*v.Keyword) + } + + if v.Status != nil { + ok := object.Key("status") + ok.String(*v.Status) + } + + return nil +} + +func awsAwsjson11_serializeDocumentVpcConfig(v *types.VpcConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.SecurityGroupIds != nil { + ok := object.Key("securityGroupIds") + if err := awsAwsjson11_serializeDocumentSecurityGroupIds(v.SecurityGroupIds, ok); err != nil { + return err + } + } + + if v.Subnets != nil { + ok := object.Key("subnets") + if err := awsAwsjson11_serializeDocumentSubnets(v.Subnets, ok); err != nil { + return err + } + } + + if v.VpcId != nil { + ok := object.Key("vpcId") + ok.String(*v.VpcId) + } + + return nil +} + +func awsAwsjson11_serializeDocumentWebhookFilter(v *types.WebhookFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ExcludeMatchedPattern != nil { + ok := object.Key("excludeMatchedPattern") + ok.Boolean(*v.ExcludeMatchedPattern) + } + + if v.Pattern != nil { + ok := object.Key("pattern") + ok.String(*v.Pattern) + } + + if len(v.Type) > 0 { + ok := object.Key("type") + ok.String(string(v.Type)) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentBatchDeleteBuildsInput(v *BatchDeleteBuildsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Ids != nil { + ok := object.Key("ids") + if err := awsAwsjson11_serializeDocumentBuildIds(v.Ids, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentBatchGetBuildBatchesInput(v *BatchGetBuildBatchesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Ids != nil { + ok := object.Key("ids") + if err := awsAwsjson11_serializeDocumentBuildBatchIds(v.Ids, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentBatchGetBuildsInput(v *BatchGetBuildsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Ids != nil { + ok := object.Key("ids") + if err := awsAwsjson11_serializeDocumentBuildIds(v.Ids, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentBatchGetCommandExecutionsInput(v *BatchGetCommandExecutionsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CommandExecutionIds != nil { + ok := object.Key("commandExecutionIds") + if err := awsAwsjson11_serializeDocumentCommandExecutionIds(v.CommandExecutionIds, ok); err != nil { + return err + } + } + + if v.SandboxId != nil { + ok := object.Key("sandboxId") + ok.String(*v.SandboxId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentBatchGetFleetsInput(v *BatchGetFleetsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Names != nil { + ok := object.Key("names") + if err := awsAwsjson11_serializeDocumentFleetNames(v.Names, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentBatchGetProjectsInput(v *BatchGetProjectsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Names != nil { + ok := object.Key("names") + if err := awsAwsjson11_serializeDocumentProjectNames(v.Names, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentBatchGetReportGroupsInput(v *BatchGetReportGroupsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ReportGroupArns != nil { + ok := object.Key("reportGroupArns") + if err := awsAwsjson11_serializeDocumentReportGroupArns(v.ReportGroupArns, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentBatchGetReportsInput(v *BatchGetReportsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ReportArns != nil { + ok := object.Key("reportArns") + if err := awsAwsjson11_serializeDocumentReportArns(v.ReportArns, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentBatchGetSandboxesInput(v *BatchGetSandboxesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Ids != nil { + ok := object.Key("ids") + if err := awsAwsjson11_serializeDocumentSandboxIds(v.Ids, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentCreateFleetInput(v *CreateFleetInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BaseCapacity != nil { + ok := object.Key("baseCapacity") + ok.Integer(*v.BaseCapacity) + } + + if v.ComputeConfiguration != nil { + ok := object.Key("computeConfiguration") + if err := awsAwsjson11_serializeDocumentComputeConfiguration(v.ComputeConfiguration, ok); err != nil { + return err + } + } + + if len(v.ComputeType) > 0 { + ok := object.Key("computeType") + ok.String(string(v.ComputeType)) + } + + if len(v.EnvironmentType) > 0 { + ok := object.Key("environmentType") + ok.String(string(v.EnvironmentType)) + } + + if v.FleetServiceRole != nil { + ok := object.Key("fleetServiceRole") + ok.String(*v.FleetServiceRole) + } + + if v.ImageId != nil { + ok := object.Key("imageId") + ok.String(*v.ImageId) + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if len(v.OverflowBehavior) > 0 { + ok := object.Key("overflowBehavior") + ok.String(string(v.OverflowBehavior)) + } + + if v.ProxyConfiguration != nil { + ok := object.Key("proxyConfiguration") + if err := awsAwsjson11_serializeDocumentProxyConfiguration(v.ProxyConfiguration, ok); err != nil { + return err + } + } + + if v.ScalingConfiguration != nil { + ok := object.Key("scalingConfiguration") + if err := awsAwsjson11_serializeDocumentScalingConfigurationInput(v.ScalingConfiguration, ok); err != nil { + return err + } + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil { + return err + } + } + + if v.VpcConfig != nil { + ok := object.Key("vpcConfig") + if err := awsAwsjson11_serializeDocumentVpcConfig(v.VpcConfig, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentCreateProjectInput(v *CreateProjectInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Artifacts != nil { + ok := object.Key("artifacts") + if err := awsAwsjson11_serializeDocumentProjectArtifacts(v.Artifacts, ok); err != nil { + return err + } + } + + if v.AutoRetryLimit != nil { + ok := object.Key("autoRetryLimit") + ok.Integer(*v.AutoRetryLimit) + } + + if v.BadgeEnabled != nil { + ok := object.Key("badgeEnabled") + ok.Boolean(*v.BadgeEnabled) + } + + if v.BuildBatchConfig != nil { + ok := object.Key("buildBatchConfig") + if err := awsAwsjson11_serializeDocumentProjectBuildBatchConfig(v.BuildBatchConfig, ok); err != nil { + return err + } + } + + if v.Cache != nil { + ok := object.Key("cache") + if err := awsAwsjson11_serializeDocumentProjectCache(v.Cache, ok); err != nil { + return err + } + } + + if v.ConcurrentBuildLimit != nil { + ok := object.Key("concurrentBuildLimit") + ok.Integer(*v.ConcurrentBuildLimit) + } + + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + if v.EncryptionKey != nil { + ok := object.Key("encryptionKey") + ok.String(*v.EncryptionKey) + } + + if v.Environment != nil { + ok := object.Key("environment") + if err := awsAwsjson11_serializeDocumentProjectEnvironment(v.Environment, ok); err != nil { + return err + } + } + + if v.FileSystemLocations != nil { + ok := object.Key("fileSystemLocations") + if err := awsAwsjson11_serializeDocumentProjectFileSystemLocations(v.FileSystemLocations, ok); err != nil { + return err + } + } + + if v.LogsConfig != nil { + ok := object.Key("logsConfig") + if err := awsAwsjson11_serializeDocumentLogsConfig(v.LogsConfig, ok); err != nil { + return err + } + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.QueuedTimeoutInMinutes != nil { + ok := object.Key("queuedTimeoutInMinutes") + ok.Integer(*v.QueuedTimeoutInMinutes) + } + + if v.SecondaryArtifacts != nil { + ok := object.Key("secondaryArtifacts") + if err := awsAwsjson11_serializeDocumentProjectArtifactsList(v.SecondaryArtifacts, ok); err != nil { + return err + } + } + + if v.SecondarySources != nil { + ok := object.Key("secondarySources") + if err := awsAwsjson11_serializeDocumentProjectSources(v.SecondarySources, ok); err != nil { + return err + } + } + + if v.SecondarySourceVersions != nil { + ok := object.Key("secondarySourceVersions") + if err := awsAwsjson11_serializeDocumentProjectSecondarySourceVersions(v.SecondarySourceVersions, ok); err != nil { + return err + } + } + + if v.ServiceRole != nil { + ok := object.Key("serviceRole") + ok.String(*v.ServiceRole) + } + + if v.Source != nil { + ok := object.Key("source") + if err := awsAwsjson11_serializeDocumentProjectSource(v.Source, ok); err != nil { + return err + } + } + + if v.SourceVersion != nil { + ok := object.Key("sourceVersion") + ok.String(*v.SourceVersion) + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil { + return err + } + } + + if v.TimeoutInMinutes != nil { + ok := object.Key("timeoutInMinutes") + ok.Integer(*v.TimeoutInMinutes) + } + + if v.VpcConfig != nil { + ok := object.Key("vpcConfig") + if err := awsAwsjson11_serializeDocumentVpcConfig(v.VpcConfig, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentCreateReportGroupInput(v *CreateReportGroupInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ExportConfig != nil { + ok := object.Key("exportConfig") + if err := awsAwsjson11_serializeDocumentReportExportConfig(v.ExportConfig, ok); err != nil { + return err + } + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil { + return err + } + } + + if len(v.Type) > 0 { + ok := object.Key("type") + ok.String(string(v.Type)) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentCreateWebhookInput(v *CreateWebhookInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BranchFilter != nil { + ok := object.Key("branchFilter") + ok.String(*v.BranchFilter) + } + + if len(v.BuildType) > 0 { + ok := object.Key("buildType") + ok.String(string(v.BuildType)) + } + + if v.FilterGroups != nil { + ok := object.Key("filterGroups") + if err := awsAwsjson11_serializeDocumentFilterGroups(v.FilterGroups, ok); err != nil { + return err + } + } + + if v.ManualCreation != nil { + ok := object.Key("manualCreation") + ok.Boolean(*v.ManualCreation) + } + + if v.ProjectName != nil { + ok := object.Key("projectName") + ok.String(*v.ProjectName) + } + + if v.PullRequestBuildPolicy != nil { + ok := object.Key("pullRequestBuildPolicy") + if err := awsAwsjson11_serializeDocumentPullRequestBuildPolicy(v.PullRequestBuildPolicy, ok); err != nil { + return err + } + } + + if v.ScopeConfiguration != nil { + ok := object.Key("scopeConfiguration") + if err := awsAwsjson11_serializeDocumentScopeConfiguration(v.ScopeConfiguration, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDeleteBuildBatchInput(v *DeleteBuildBatchInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Id != nil { + ok := object.Key("id") + ok.String(*v.Id) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDeleteFleetInput(v *DeleteFleetInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Arn != nil { + ok := object.Key("arn") + ok.String(*v.Arn) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDeleteProjectInput(v *DeleteProjectInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDeleteReportGroupInput(v *DeleteReportGroupInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Arn != nil { + ok := object.Key("arn") + ok.String(*v.Arn) + } + + if v.DeleteReports { + ok := object.Key("deleteReports") + ok.Boolean(v.DeleteReports) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDeleteReportInput(v *DeleteReportInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Arn != nil { + ok := object.Key("arn") + ok.String(*v.Arn) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDeleteResourcePolicyInput(v *DeleteResourcePolicyInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ResourceArn != nil { + ok := object.Key("resourceArn") + ok.String(*v.ResourceArn) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDeleteSourceCredentialsInput(v *DeleteSourceCredentialsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Arn != nil { + ok := object.Key("arn") + ok.String(*v.Arn) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDeleteWebhookInput(v *DeleteWebhookInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ProjectName != nil { + ok := object.Key("projectName") + ok.String(*v.ProjectName) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribeCodeCoveragesInput(v *DescribeCodeCoveragesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MaxLineCoveragePercentage != nil { + ok := object.Key("maxLineCoveragePercentage") + switch { + case math.IsNaN(*v.MaxLineCoveragePercentage): + ok.String("NaN") + + case math.IsInf(*v.MaxLineCoveragePercentage, 1): + ok.String("Infinity") + + case math.IsInf(*v.MaxLineCoveragePercentage, -1): + ok.String("-Infinity") + + default: + ok.Double(*v.MaxLineCoveragePercentage) + + } + } + + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.MinLineCoveragePercentage != nil { + ok := object.Key("minLineCoveragePercentage") + switch { + case math.IsNaN(*v.MinLineCoveragePercentage): + ok.String("NaN") + + case math.IsInf(*v.MinLineCoveragePercentage, 1): + ok.String("Infinity") + + case math.IsInf(*v.MinLineCoveragePercentage, -1): + ok.String("-Infinity") + + default: + ok.Double(*v.MinLineCoveragePercentage) + + } + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + if v.ReportArn != nil { + ok := object.Key("reportArn") + ok.String(*v.ReportArn) + } + + if len(v.SortBy) > 0 { + ok := object.Key("sortBy") + ok.String(string(v.SortBy)) + } + + if len(v.SortOrder) > 0 { + ok := object.Key("sortOrder") + ok.String(string(v.SortOrder)) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentDescribeTestCasesInput(v *DescribeTestCasesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filter != nil { + ok := object.Key("filter") + if err := awsAwsjson11_serializeDocumentTestCaseFilter(v.Filter, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + if v.ReportArn != nil { + ok := object.Key("reportArn") + ok.String(*v.ReportArn) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentGetReportGroupTrendInput(v *GetReportGroupTrendInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.NumOfReports != nil { + ok := object.Key("numOfReports") + ok.Integer(*v.NumOfReports) + } + + if v.ReportGroupArn != nil { + ok := object.Key("reportGroupArn") + ok.String(*v.ReportGroupArn) + } + + if len(v.TrendField) > 0 { + ok := object.Key("trendField") + ok.String(string(v.TrendField)) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentGetResourcePolicyInput(v *GetResourcePolicyInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ResourceArn != nil { + ok := object.Key("resourceArn") + ok.String(*v.ResourceArn) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentImportSourceCredentialsInput(v *ImportSourceCredentialsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.AuthType) > 0 { + ok := object.Key("authType") + ok.String(string(v.AuthType)) + } + + if len(v.ServerType) > 0 { + ok := object.Key("serverType") + ok.String(string(v.ServerType)) + } + + if v.ShouldOverwrite != nil { + ok := object.Key("shouldOverwrite") + ok.Boolean(*v.ShouldOverwrite) + } + + if v.Token != nil { + ok := object.Key("token") + ok.String(*v.Token) + } + + if v.Username != nil { + ok := object.Key("username") + ok.String(*v.Username) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentInvalidateProjectCacheInput(v *InvalidateProjectCacheInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ProjectName != nil { + ok := object.Key("projectName") + ok.String(*v.ProjectName) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentListBuildBatchesForProjectInput(v *ListBuildBatchesForProjectInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filter != nil { + ok := object.Key("filter") + if err := awsAwsjson11_serializeDocumentBuildBatchFilter(v.Filter, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + if v.ProjectName != nil { + ok := object.Key("projectName") + ok.String(*v.ProjectName) + } + + if len(v.SortOrder) > 0 { + ok := object.Key("sortOrder") + ok.String(string(v.SortOrder)) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentListBuildBatchesInput(v *ListBuildBatchesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filter != nil { + ok := object.Key("filter") + if err := awsAwsjson11_serializeDocumentBuildBatchFilter(v.Filter, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + if len(v.SortOrder) > 0 { + ok := object.Key("sortOrder") + ok.String(string(v.SortOrder)) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentListBuildsForProjectInput(v *ListBuildsForProjectInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + if v.ProjectName != nil { + ok := object.Key("projectName") + ok.String(*v.ProjectName) + } + + if len(v.SortOrder) > 0 { + ok := object.Key("sortOrder") + ok.String(string(v.SortOrder)) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentListBuildsInput(v *ListBuildsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + if len(v.SortOrder) > 0 { + ok := object.Key("sortOrder") + ok.String(string(v.SortOrder)) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentListCommandExecutionsForSandboxInput(v *ListCommandExecutionsForSandboxInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + if v.SandboxId != nil { + ok := object.Key("sandboxId") + ok.String(*v.SandboxId) + } + + if len(v.SortOrder) > 0 { + ok := object.Key("sortOrder") + ok.String(string(v.SortOrder)) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentListCuratedEnvironmentImagesInput(v *ListCuratedEnvironmentImagesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + return nil +} + +func awsAwsjson11_serializeOpDocumentListFleetsInput(v *ListFleetsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + if len(v.SortBy) > 0 { + ok := object.Key("sortBy") + ok.String(string(v.SortBy)) + } + + if len(v.SortOrder) > 0 { + ok := object.Key("sortOrder") + ok.String(string(v.SortOrder)) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentListProjectsInput(v *ListProjectsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + if len(v.SortBy) > 0 { + ok := object.Key("sortBy") + ok.String(string(v.SortBy)) + } + + if len(v.SortOrder) > 0 { + ok := object.Key("sortOrder") + ok.String(string(v.SortOrder)) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentListReportGroupsInput(v *ListReportGroupsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + if len(v.SortBy) > 0 { + ok := object.Key("sortBy") + ok.String(string(v.SortBy)) + } + + if len(v.SortOrder) > 0 { + ok := object.Key("sortOrder") + ok.String(string(v.SortOrder)) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentListReportsForReportGroupInput(v *ListReportsForReportGroupInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filter != nil { + ok := object.Key("filter") + if err := awsAwsjson11_serializeDocumentReportFilter(v.Filter, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + if v.ReportGroupArn != nil { + ok := object.Key("reportGroupArn") + ok.String(*v.ReportGroupArn) + } + + if len(v.SortOrder) > 0 { + ok := object.Key("sortOrder") + ok.String(string(v.SortOrder)) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentListReportsInput(v *ListReportsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filter != nil { + ok := object.Key("filter") + if err := awsAwsjson11_serializeDocumentReportFilter(v.Filter, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + if len(v.SortOrder) > 0 { + ok := object.Key("sortOrder") + ok.String(string(v.SortOrder)) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentListSandboxesForProjectInput(v *ListSandboxesForProjectInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + if v.ProjectName != nil { + ok := object.Key("projectName") + ok.String(*v.ProjectName) + } + + if len(v.SortOrder) > 0 { + ok := object.Key("sortOrder") + ok.String(string(v.SortOrder)) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentListSandboxesInput(v *ListSandboxesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + if len(v.SortOrder) > 0 { + ok := object.Key("sortOrder") + ok.String(string(v.SortOrder)) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentListSharedProjectsInput(v *ListSharedProjectsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + if len(v.SortBy) > 0 { + ok := object.Key("sortBy") + ok.String(string(v.SortBy)) + } + + if len(v.SortOrder) > 0 { + ok := object.Key("sortOrder") + ok.String(string(v.SortOrder)) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentListSharedReportGroupsInput(v *ListSharedReportGroupsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + if len(v.SortBy) > 0 { + ok := object.Key("sortBy") + ok.String(string(v.SortBy)) + } + + if len(v.SortOrder) > 0 { + ok := object.Key("sortOrder") + ok.String(string(v.SortOrder)) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentListSourceCredentialsInput(v *ListSourceCredentialsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + return nil +} + +func awsAwsjson11_serializeOpDocumentPutResourcePolicyInput(v *PutResourcePolicyInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Policy != nil { + ok := object.Key("policy") + ok.String(*v.Policy) + } + + if v.ResourceArn != nil { + ok := object.Key("resourceArn") + ok.String(*v.ResourceArn) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentRetryBuildBatchInput(v *RetryBuildBatchInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Id != nil { + ok := object.Key("id") + ok.String(*v.Id) + } + + if v.IdempotencyToken != nil { + ok := object.Key("idempotencyToken") + ok.String(*v.IdempotencyToken) + } + + if len(v.RetryType) > 0 { + ok := object.Key("retryType") + ok.String(string(v.RetryType)) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentRetryBuildInput(v *RetryBuildInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Id != nil { + ok := object.Key("id") + ok.String(*v.Id) + } + + if v.IdempotencyToken != nil { + ok := object.Key("idempotencyToken") + ok.String(*v.IdempotencyToken) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentStartBuildBatchInput(v *StartBuildBatchInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ArtifactsOverride != nil { + ok := object.Key("artifactsOverride") + if err := awsAwsjson11_serializeDocumentProjectArtifacts(v.ArtifactsOverride, ok); err != nil { + return err + } + } + + if v.BuildBatchConfigOverride != nil { + ok := object.Key("buildBatchConfigOverride") + if err := awsAwsjson11_serializeDocumentProjectBuildBatchConfig(v.BuildBatchConfigOverride, ok); err != nil { + return err + } + } + + if v.BuildspecOverride != nil { + ok := object.Key("buildspecOverride") + ok.String(*v.BuildspecOverride) + } + + if v.BuildTimeoutInMinutesOverride != nil { + ok := object.Key("buildTimeoutInMinutesOverride") + ok.Integer(*v.BuildTimeoutInMinutesOverride) + } + + if v.CacheOverride != nil { + ok := object.Key("cacheOverride") + if err := awsAwsjson11_serializeDocumentProjectCache(v.CacheOverride, ok); err != nil { + return err + } + } + + if v.CertificateOverride != nil { + ok := object.Key("certificateOverride") + ok.String(*v.CertificateOverride) + } + + if len(v.ComputeTypeOverride) > 0 { + ok := object.Key("computeTypeOverride") + ok.String(string(v.ComputeTypeOverride)) + } + + if v.DebugSessionEnabled != nil { + ok := object.Key("debugSessionEnabled") + ok.Boolean(*v.DebugSessionEnabled) + } + + if v.EncryptionKeyOverride != nil { + ok := object.Key("encryptionKeyOverride") + ok.String(*v.EncryptionKeyOverride) + } + + if len(v.EnvironmentTypeOverride) > 0 { + ok := object.Key("environmentTypeOverride") + ok.String(string(v.EnvironmentTypeOverride)) + } + + if v.EnvironmentVariablesOverride != nil { + ok := object.Key("environmentVariablesOverride") + if err := awsAwsjson11_serializeDocumentEnvironmentVariables(v.EnvironmentVariablesOverride, ok); err != nil { + return err + } + } + + if v.GitCloneDepthOverride != nil { + ok := object.Key("gitCloneDepthOverride") + ok.Integer(*v.GitCloneDepthOverride) + } + + if v.GitSubmodulesConfigOverride != nil { + ok := object.Key("gitSubmodulesConfigOverride") + if err := awsAwsjson11_serializeDocumentGitSubmodulesConfig(v.GitSubmodulesConfigOverride, ok); err != nil { + return err + } + } + + if v.IdempotencyToken != nil { + ok := object.Key("idempotencyToken") + ok.String(*v.IdempotencyToken) + } + + if v.ImageOverride != nil { + ok := object.Key("imageOverride") + ok.String(*v.ImageOverride) + } + + if len(v.ImagePullCredentialsTypeOverride) > 0 { + ok := object.Key("imagePullCredentialsTypeOverride") + ok.String(string(v.ImagePullCredentialsTypeOverride)) + } + + if v.InsecureSslOverride != nil { + ok := object.Key("insecureSslOverride") + ok.Boolean(*v.InsecureSslOverride) + } + + if v.LogsConfigOverride != nil { + ok := object.Key("logsConfigOverride") + if err := awsAwsjson11_serializeDocumentLogsConfig(v.LogsConfigOverride, ok); err != nil { + return err + } + } + + if v.PrivilegedModeOverride != nil { + ok := object.Key("privilegedModeOverride") + ok.Boolean(*v.PrivilegedModeOverride) + } + + if v.ProjectName != nil { + ok := object.Key("projectName") + ok.String(*v.ProjectName) + } + + if v.QueuedTimeoutInMinutesOverride != nil { + ok := object.Key("queuedTimeoutInMinutesOverride") + ok.Integer(*v.QueuedTimeoutInMinutesOverride) + } + + if v.RegistryCredentialOverride != nil { + ok := object.Key("registryCredentialOverride") + if err := awsAwsjson11_serializeDocumentRegistryCredential(v.RegistryCredentialOverride, ok); err != nil { + return err + } + } + + if v.ReportBuildBatchStatusOverride != nil { + ok := object.Key("reportBuildBatchStatusOverride") + ok.Boolean(*v.ReportBuildBatchStatusOverride) + } + + if v.SecondaryArtifactsOverride != nil { + ok := object.Key("secondaryArtifactsOverride") + if err := awsAwsjson11_serializeDocumentProjectArtifactsList(v.SecondaryArtifactsOverride, ok); err != nil { + return err + } + } + + if v.SecondarySourcesOverride != nil { + ok := object.Key("secondarySourcesOverride") + if err := awsAwsjson11_serializeDocumentProjectSources(v.SecondarySourcesOverride, ok); err != nil { + return err + } + } + + if v.SecondarySourcesVersionOverride != nil { + ok := object.Key("secondarySourcesVersionOverride") + if err := awsAwsjson11_serializeDocumentProjectSecondarySourceVersions(v.SecondarySourcesVersionOverride, ok); err != nil { + return err + } + } + + if v.ServiceRoleOverride != nil { + ok := object.Key("serviceRoleOverride") + ok.String(*v.ServiceRoleOverride) + } + + if v.SourceAuthOverride != nil { + ok := object.Key("sourceAuthOverride") + if err := awsAwsjson11_serializeDocumentSourceAuth(v.SourceAuthOverride, ok); err != nil { + return err + } + } + + if v.SourceLocationOverride != nil { + ok := object.Key("sourceLocationOverride") + ok.String(*v.SourceLocationOverride) + } + + if len(v.SourceTypeOverride) > 0 { + ok := object.Key("sourceTypeOverride") + ok.String(string(v.SourceTypeOverride)) + } + + if v.SourceVersion != nil { + ok := object.Key("sourceVersion") + ok.String(*v.SourceVersion) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentStartBuildInput(v *StartBuildInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ArtifactsOverride != nil { + ok := object.Key("artifactsOverride") + if err := awsAwsjson11_serializeDocumentProjectArtifacts(v.ArtifactsOverride, ok); err != nil { + return err + } + } + + if v.AutoRetryLimitOverride != nil { + ok := object.Key("autoRetryLimitOverride") + ok.Integer(*v.AutoRetryLimitOverride) + } + + if v.BuildspecOverride != nil { + ok := object.Key("buildspecOverride") + ok.String(*v.BuildspecOverride) + } + + if v.BuildStatusConfigOverride != nil { + ok := object.Key("buildStatusConfigOverride") + if err := awsAwsjson11_serializeDocumentBuildStatusConfig(v.BuildStatusConfigOverride, ok); err != nil { + return err + } + } + + if v.CacheOverride != nil { + ok := object.Key("cacheOverride") + if err := awsAwsjson11_serializeDocumentProjectCache(v.CacheOverride, ok); err != nil { + return err + } + } + + if v.CertificateOverride != nil { + ok := object.Key("certificateOverride") + ok.String(*v.CertificateOverride) + } + + if len(v.ComputeTypeOverride) > 0 { + ok := object.Key("computeTypeOverride") + ok.String(string(v.ComputeTypeOverride)) + } + + if v.DebugSessionEnabled != nil { + ok := object.Key("debugSessionEnabled") + ok.Boolean(*v.DebugSessionEnabled) + } + + if v.EncryptionKeyOverride != nil { + ok := object.Key("encryptionKeyOverride") + ok.String(*v.EncryptionKeyOverride) + } + + if len(v.EnvironmentTypeOverride) > 0 { + ok := object.Key("environmentTypeOverride") + ok.String(string(v.EnvironmentTypeOverride)) + } + + if v.EnvironmentVariablesOverride != nil { + ok := object.Key("environmentVariablesOverride") + if err := awsAwsjson11_serializeDocumentEnvironmentVariables(v.EnvironmentVariablesOverride, ok); err != nil { + return err + } + } + + if v.FleetOverride != nil { + ok := object.Key("fleetOverride") + if err := awsAwsjson11_serializeDocumentProjectFleet(v.FleetOverride, ok); err != nil { + return err + } + } + + if v.GitCloneDepthOverride != nil { + ok := object.Key("gitCloneDepthOverride") + ok.Integer(*v.GitCloneDepthOverride) + } + + if v.GitSubmodulesConfigOverride != nil { + ok := object.Key("gitSubmodulesConfigOverride") + if err := awsAwsjson11_serializeDocumentGitSubmodulesConfig(v.GitSubmodulesConfigOverride, ok); err != nil { + return err + } + } + + if v.IdempotencyToken != nil { + ok := object.Key("idempotencyToken") + ok.String(*v.IdempotencyToken) + } + + if v.ImageOverride != nil { + ok := object.Key("imageOverride") + ok.String(*v.ImageOverride) + } + + if len(v.ImagePullCredentialsTypeOverride) > 0 { + ok := object.Key("imagePullCredentialsTypeOverride") + ok.String(string(v.ImagePullCredentialsTypeOverride)) + } + + if v.InsecureSslOverride != nil { + ok := object.Key("insecureSslOverride") + ok.Boolean(*v.InsecureSslOverride) + } + + if v.LogsConfigOverride != nil { + ok := object.Key("logsConfigOverride") + if err := awsAwsjson11_serializeDocumentLogsConfig(v.LogsConfigOverride, ok); err != nil { + return err + } + } + + if v.PrivilegedModeOverride != nil { + ok := object.Key("privilegedModeOverride") + ok.Boolean(*v.PrivilegedModeOverride) + } + + if v.ProjectName != nil { + ok := object.Key("projectName") + ok.String(*v.ProjectName) + } + + if v.QueuedTimeoutInMinutesOverride != nil { + ok := object.Key("queuedTimeoutInMinutesOverride") + ok.Integer(*v.QueuedTimeoutInMinutesOverride) + } + + if v.RegistryCredentialOverride != nil { + ok := object.Key("registryCredentialOverride") + if err := awsAwsjson11_serializeDocumentRegistryCredential(v.RegistryCredentialOverride, ok); err != nil { + return err + } + } + + if v.ReportBuildStatusOverride != nil { + ok := object.Key("reportBuildStatusOverride") + ok.Boolean(*v.ReportBuildStatusOverride) + } + + if v.SecondaryArtifactsOverride != nil { + ok := object.Key("secondaryArtifactsOverride") + if err := awsAwsjson11_serializeDocumentProjectArtifactsList(v.SecondaryArtifactsOverride, ok); err != nil { + return err + } + } + + if v.SecondarySourcesOverride != nil { + ok := object.Key("secondarySourcesOverride") + if err := awsAwsjson11_serializeDocumentProjectSources(v.SecondarySourcesOverride, ok); err != nil { + return err + } + } + + if v.SecondarySourcesVersionOverride != nil { + ok := object.Key("secondarySourcesVersionOverride") + if err := awsAwsjson11_serializeDocumentProjectSecondarySourceVersions(v.SecondarySourcesVersionOverride, ok); err != nil { + return err + } + } + + if v.ServiceRoleOverride != nil { + ok := object.Key("serviceRoleOverride") + ok.String(*v.ServiceRoleOverride) + } + + if v.SourceAuthOverride != nil { + ok := object.Key("sourceAuthOverride") + if err := awsAwsjson11_serializeDocumentSourceAuth(v.SourceAuthOverride, ok); err != nil { + return err + } + } + + if v.SourceLocationOverride != nil { + ok := object.Key("sourceLocationOverride") + ok.String(*v.SourceLocationOverride) + } + + if len(v.SourceTypeOverride) > 0 { + ok := object.Key("sourceTypeOverride") + ok.String(string(v.SourceTypeOverride)) + } + + if v.SourceVersion != nil { + ok := object.Key("sourceVersion") + ok.String(*v.SourceVersion) + } + + if v.TimeoutInMinutesOverride != nil { + ok := object.Key("timeoutInMinutesOverride") + ok.Integer(*v.TimeoutInMinutesOverride) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentStartCommandExecutionInput(v *StartCommandExecutionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Command != nil { + ok := object.Key("command") + ok.String(*v.Command) + } + + if v.SandboxId != nil { + ok := object.Key("sandboxId") + ok.String(*v.SandboxId) + } + + if len(v.Type) > 0 { + ok := object.Key("type") + ok.String(string(v.Type)) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentStartSandboxConnectionInput(v *StartSandboxConnectionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.SandboxId != nil { + ok := object.Key("sandboxId") + ok.String(*v.SandboxId) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentStartSandboxInput(v *StartSandboxInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.IdempotencyToken != nil { + ok := object.Key("idempotencyToken") + ok.String(*v.IdempotencyToken) + } + + if v.ProjectName != nil { + ok := object.Key("projectName") + ok.String(*v.ProjectName) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentStopBuildBatchInput(v *StopBuildBatchInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Id != nil { + ok := object.Key("id") + ok.String(*v.Id) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentStopBuildInput(v *StopBuildInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Id != nil { + ok := object.Key("id") + ok.String(*v.Id) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentStopSandboxInput(v *StopSandboxInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Id != nil { + ok := object.Key("id") + ok.String(*v.Id) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentUpdateFleetInput(v *UpdateFleetInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Arn != nil { + ok := object.Key("arn") + ok.String(*v.Arn) + } + + if v.BaseCapacity != nil { + ok := object.Key("baseCapacity") + ok.Integer(*v.BaseCapacity) + } + + if v.ComputeConfiguration != nil { + ok := object.Key("computeConfiguration") + if err := awsAwsjson11_serializeDocumentComputeConfiguration(v.ComputeConfiguration, ok); err != nil { + return err + } + } + + if len(v.ComputeType) > 0 { + ok := object.Key("computeType") + ok.String(string(v.ComputeType)) + } + + if len(v.EnvironmentType) > 0 { + ok := object.Key("environmentType") + ok.String(string(v.EnvironmentType)) + } + + if v.FleetServiceRole != nil { + ok := object.Key("fleetServiceRole") + ok.String(*v.FleetServiceRole) + } + + if v.ImageId != nil { + ok := object.Key("imageId") + ok.String(*v.ImageId) + } + + if len(v.OverflowBehavior) > 0 { + ok := object.Key("overflowBehavior") + ok.String(string(v.OverflowBehavior)) + } + + if v.ProxyConfiguration != nil { + ok := object.Key("proxyConfiguration") + if err := awsAwsjson11_serializeDocumentProxyConfiguration(v.ProxyConfiguration, ok); err != nil { + return err + } + } + + if v.ScalingConfiguration != nil { + ok := object.Key("scalingConfiguration") + if err := awsAwsjson11_serializeDocumentScalingConfigurationInput(v.ScalingConfiguration, ok); err != nil { + return err + } + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil { + return err + } + } + + if v.VpcConfig != nil { + ok := object.Key("vpcConfig") + if err := awsAwsjson11_serializeDocumentVpcConfig(v.VpcConfig, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentUpdateProjectInput(v *UpdateProjectInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Artifacts != nil { + ok := object.Key("artifacts") + if err := awsAwsjson11_serializeDocumentProjectArtifacts(v.Artifacts, ok); err != nil { + return err + } + } + + if v.AutoRetryLimit != nil { + ok := object.Key("autoRetryLimit") + ok.Integer(*v.AutoRetryLimit) + } + + if v.BadgeEnabled != nil { + ok := object.Key("badgeEnabled") + ok.Boolean(*v.BadgeEnabled) + } + + if v.BuildBatchConfig != nil { + ok := object.Key("buildBatchConfig") + if err := awsAwsjson11_serializeDocumentProjectBuildBatchConfig(v.BuildBatchConfig, ok); err != nil { + return err + } + } + + if v.Cache != nil { + ok := object.Key("cache") + if err := awsAwsjson11_serializeDocumentProjectCache(v.Cache, ok); err != nil { + return err + } + } + + if v.ConcurrentBuildLimit != nil { + ok := object.Key("concurrentBuildLimit") + ok.Integer(*v.ConcurrentBuildLimit) + } + + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + if v.EncryptionKey != nil { + ok := object.Key("encryptionKey") + ok.String(*v.EncryptionKey) + } + + if v.Environment != nil { + ok := object.Key("environment") + if err := awsAwsjson11_serializeDocumentProjectEnvironment(v.Environment, ok); err != nil { + return err + } + } + + if v.FileSystemLocations != nil { + ok := object.Key("fileSystemLocations") + if err := awsAwsjson11_serializeDocumentProjectFileSystemLocations(v.FileSystemLocations, ok); err != nil { + return err + } + } + + if v.LogsConfig != nil { + ok := object.Key("logsConfig") + if err := awsAwsjson11_serializeDocumentLogsConfig(v.LogsConfig, ok); err != nil { + return err + } + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.QueuedTimeoutInMinutes != nil { + ok := object.Key("queuedTimeoutInMinutes") + ok.Integer(*v.QueuedTimeoutInMinutes) + } + + if v.SecondaryArtifacts != nil { + ok := object.Key("secondaryArtifacts") + if err := awsAwsjson11_serializeDocumentProjectArtifactsList(v.SecondaryArtifacts, ok); err != nil { + return err + } + } + + if v.SecondarySources != nil { + ok := object.Key("secondarySources") + if err := awsAwsjson11_serializeDocumentProjectSources(v.SecondarySources, ok); err != nil { + return err + } + } + + if v.SecondarySourceVersions != nil { + ok := object.Key("secondarySourceVersions") + if err := awsAwsjson11_serializeDocumentProjectSecondarySourceVersions(v.SecondarySourceVersions, ok); err != nil { + return err + } + } + + if v.ServiceRole != nil { + ok := object.Key("serviceRole") + ok.String(*v.ServiceRole) + } + + if v.Source != nil { + ok := object.Key("source") + if err := awsAwsjson11_serializeDocumentProjectSource(v.Source, ok); err != nil { + return err + } + } + + if v.SourceVersion != nil { + ok := object.Key("sourceVersion") + ok.String(*v.SourceVersion) + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil { + return err + } + } + + if v.TimeoutInMinutes != nil { + ok := object.Key("timeoutInMinutes") + ok.Integer(*v.TimeoutInMinutes) + } + + if v.VpcConfig != nil { + ok := object.Key("vpcConfig") + if err := awsAwsjson11_serializeDocumentVpcConfig(v.VpcConfig, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentUpdateProjectVisibilityInput(v *UpdateProjectVisibilityInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ProjectArn != nil { + ok := object.Key("projectArn") + ok.String(*v.ProjectArn) + } + + if len(v.ProjectVisibility) > 0 { + ok := object.Key("projectVisibility") + ok.String(string(v.ProjectVisibility)) + } + + if v.ResourceAccessRole != nil { + ok := object.Key("resourceAccessRole") + ok.String(*v.ResourceAccessRole) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentUpdateReportGroupInput(v *UpdateReportGroupInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Arn != nil { + ok := object.Key("arn") + ok.String(*v.Arn) + } + + if v.ExportConfig != nil { + ok := object.Key("exportConfig") + if err := awsAwsjson11_serializeDocumentReportExportConfig(v.ExportConfig, ok); err != nil { + return err + } + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentUpdateWebhookInput(v *UpdateWebhookInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BranchFilter != nil { + ok := object.Key("branchFilter") + ok.String(*v.BranchFilter) + } + + if len(v.BuildType) > 0 { + ok := object.Key("buildType") + ok.String(string(v.BuildType)) + } + + if v.FilterGroups != nil { + ok := object.Key("filterGroups") + if err := awsAwsjson11_serializeDocumentFilterGroups(v.FilterGroups, ok); err != nil { + return err + } + } + + if v.ProjectName != nil { + ok := object.Key("projectName") + ok.String(*v.ProjectName) + } + + if v.PullRequestBuildPolicy != nil { + ok := object.Key("pullRequestBuildPolicy") + if err := awsAwsjson11_serializeDocumentPullRequestBuildPolicy(v.PullRequestBuildPolicy, ok); err != nil { + return err + } + } + + if v.RotateSecret { + ok := object.Key("rotateSecret") + ok.Boolean(v.RotateSecret) + } + + return nil +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/types/enums.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/types/enums.go new file mode 100644 index 00000000000..bac26f5c374 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/types/enums.go @@ -0,0 +1,1233 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +type ArtifactNamespace string + +// Enum values for ArtifactNamespace +const ( + ArtifactNamespaceNone ArtifactNamespace = "NONE" + ArtifactNamespaceBuildId ArtifactNamespace = "BUILD_ID" +) + +// Values returns all known values for ArtifactNamespace. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ArtifactNamespace) Values() []ArtifactNamespace { + return []ArtifactNamespace{ + "NONE", + "BUILD_ID", + } +} + +type ArtifactPackaging string + +// Enum values for ArtifactPackaging +const ( + ArtifactPackagingNone ArtifactPackaging = "NONE" + ArtifactPackagingZip ArtifactPackaging = "ZIP" +) + +// Values returns all known values for ArtifactPackaging. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ArtifactPackaging) Values() []ArtifactPackaging { + return []ArtifactPackaging{ + "NONE", + "ZIP", + } +} + +type ArtifactsType string + +// Enum values for ArtifactsType +const ( + ArtifactsTypeCodepipeline ArtifactsType = "CODEPIPELINE" + ArtifactsTypeS3 ArtifactsType = "S3" + ArtifactsTypeNoArtifacts ArtifactsType = "NO_ARTIFACTS" +) + +// Values returns all known values for ArtifactsType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ArtifactsType) Values() []ArtifactsType { + return []ArtifactsType{ + "CODEPIPELINE", + "S3", + "NO_ARTIFACTS", + } +} + +type AuthType string + +// Enum values for AuthType +const ( + AuthTypeOauth AuthType = "OAUTH" + AuthTypeBasicAuth AuthType = "BASIC_AUTH" + AuthTypePersonalAccessToken AuthType = "PERSONAL_ACCESS_TOKEN" + AuthTypeCodeconnections AuthType = "CODECONNECTIONS" + AuthTypeSecretsManager AuthType = "SECRETS_MANAGER" +) + +// Values returns all known values for AuthType. Note that this can be expanded in +// the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (AuthType) Values() []AuthType { + return []AuthType{ + "OAUTH", + "BASIC_AUTH", + "PERSONAL_ACCESS_TOKEN", + "CODECONNECTIONS", + "SECRETS_MANAGER", + } +} + +type BatchReportModeType string + +// Enum values for BatchReportModeType +const ( + BatchReportModeTypeReportIndividualBuilds BatchReportModeType = "REPORT_INDIVIDUAL_BUILDS" + BatchReportModeTypeReportAggregatedBatch BatchReportModeType = "REPORT_AGGREGATED_BATCH" +) + +// Values returns all known values for BatchReportModeType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (BatchReportModeType) Values() []BatchReportModeType { + return []BatchReportModeType{ + "REPORT_INDIVIDUAL_BUILDS", + "REPORT_AGGREGATED_BATCH", + } +} + +type BucketOwnerAccess string + +// Enum values for BucketOwnerAccess +const ( + BucketOwnerAccessNone BucketOwnerAccess = "NONE" + BucketOwnerAccessReadOnly BucketOwnerAccess = "READ_ONLY" + BucketOwnerAccessFull BucketOwnerAccess = "FULL" +) + +// Values returns all known values for BucketOwnerAccess. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (BucketOwnerAccess) Values() []BucketOwnerAccess { + return []BucketOwnerAccess{ + "NONE", + "READ_ONLY", + "FULL", + } +} + +type BuildBatchPhaseType string + +// Enum values for BuildBatchPhaseType +const ( + BuildBatchPhaseTypeSubmitted BuildBatchPhaseType = "SUBMITTED" + BuildBatchPhaseTypeDownloadBatchspec BuildBatchPhaseType = "DOWNLOAD_BATCHSPEC" + BuildBatchPhaseTypeInProgress BuildBatchPhaseType = "IN_PROGRESS" + BuildBatchPhaseTypeCombineArtifacts BuildBatchPhaseType = "COMBINE_ARTIFACTS" + BuildBatchPhaseTypeSucceeded BuildBatchPhaseType = "SUCCEEDED" + BuildBatchPhaseTypeFailed BuildBatchPhaseType = "FAILED" + BuildBatchPhaseTypeStopped BuildBatchPhaseType = "STOPPED" +) + +// Values returns all known values for BuildBatchPhaseType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (BuildBatchPhaseType) Values() []BuildBatchPhaseType { + return []BuildBatchPhaseType{ + "SUBMITTED", + "DOWNLOAD_BATCHSPEC", + "IN_PROGRESS", + "COMBINE_ARTIFACTS", + "SUCCEEDED", + "FAILED", + "STOPPED", + } +} + +type BuildPhaseType string + +// Enum values for BuildPhaseType +const ( + BuildPhaseTypeSubmitted BuildPhaseType = "SUBMITTED" + BuildPhaseTypeQueued BuildPhaseType = "QUEUED" + BuildPhaseTypeProvisioning BuildPhaseType = "PROVISIONING" + BuildPhaseTypeDownloadSource BuildPhaseType = "DOWNLOAD_SOURCE" + BuildPhaseTypeInstall BuildPhaseType = "INSTALL" + BuildPhaseTypePreBuild BuildPhaseType = "PRE_BUILD" + BuildPhaseTypeBuild BuildPhaseType = "BUILD" + BuildPhaseTypePostBuild BuildPhaseType = "POST_BUILD" + BuildPhaseTypeUploadArtifacts BuildPhaseType = "UPLOAD_ARTIFACTS" + BuildPhaseTypeFinalizing BuildPhaseType = "FINALIZING" + BuildPhaseTypeCompleted BuildPhaseType = "COMPLETED" +) + +// Values returns all known values for BuildPhaseType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (BuildPhaseType) Values() []BuildPhaseType { + return []BuildPhaseType{ + "SUBMITTED", + "QUEUED", + "PROVISIONING", + "DOWNLOAD_SOURCE", + "INSTALL", + "PRE_BUILD", + "BUILD", + "POST_BUILD", + "UPLOAD_ARTIFACTS", + "FINALIZING", + "COMPLETED", + } +} + +type CacheMode string + +// Enum values for CacheMode +const ( + CacheModeLocalDockerLayerCache CacheMode = "LOCAL_DOCKER_LAYER_CACHE" + CacheModeLocalSourceCache CacheMode = "LOCAL_SOURCE_CACHE" + CacheModeLocalCustomCache CacheMode = "LOCAL_CUSTOM_CACHE" +) + +// Values returns all known values for CacheMode. Note that this can be expanded +// in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (CacheMode) Values() []CacheMode { + return []CacheMode{ + "LOCAL_DOCKER_LAYER_CACHE", + "LOCAL_SOURCE_CACHE", + "LOCAL_CUSTOM_CACHE", + } +} + +type CacheType string + +// Enum values for CacheType +const ( + CacheTypeNoCache CacheType = "NO_CACHE" + CacheTypeS3 CacheType = "S3" + CacheTypeLocal CacheType = "LOCAL" +) + +// Values returns all known values for CacheType. Note that this can be expanded +// in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (CacheType) Values() []CacheType { + return []CacheType{ + "NO_CACHE", + "S3", + "LOCAL", + } +} + +type CommandType string + +// Enum values for CommandType +const ( + CommandTypeShell CommandType = "SHELL" +) + +// Values returns all known values for CommandType. Note that this can be expanded +// in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (CommandType) Values() []CommandType { + return []CommandType{ + "SHELL", + } +} + +type ComputeType string + +// Enum values for ComputeType +const ( + ComputeTypeBuildGeneral1Small ComputeType = "BUILD_GENERAL1_SMALL" + ComputeTypeBuildGeneral1Medium ComputeType = "BUILD_GENERAL1_MEDIUM" + ComputeTypeBuildGeneral1Large ComputeType = "BUILD_GENERAL1_LARGE" + ComputeTypeBuildGeneral1Xlarge ComputeType = "BUILD_GENERAL1_XLARGE" + ComputeTypeBuildGeneral12xlarge ComputeType = "BUILD_GENERAL1_2XLARGE" + ComputeTypeBuildLambda1gb ComputeType = "BUILD_LAMBDA_1GB" + ComputeTypeBuildLambda2gb ComputeType = "BUILD_LAMBDA_2GB" + ComputeTypeBuildLambda4gb ComputeType = "BUILD_LAMBDA_4GB" + ComputeTypeBuildLambda8gb ComputeType = "BUILD_LAMBDA_8GB" + ComputeTypeBuildLambda10gb ComputeType = "BUILD_LAMBDA_10GB" + ComputeTypeAttributeBasedCompute ComputeType = "ATTRIBUTE_BASED_COMPUTE" + ComputeTypeCustomInstanceType ComputeType = "CUSTOM_INSTANCE_TYPE" +) + +// Values returns all known values for ComputeType. Note that this can be expanded +// in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ComputeType) Values() []ComputeType { + return []ComputeType{ + "BUILD_GENERAL1_SMALL", + "BUILD_GENERAL1_MEDIUM", + "BUILD_GENERAL1_LARGE", + "BUILD_GENERAL1_XLARGE", + "BUILD_GENERAL1_2XLARGE", + "BUILD_LAMBDA_1GB", + "BUILD_LAMBDA_2GB", + "BUILD_LAMBDA_4GB", + "BUILD_LAMBDA_8GB", + "BUILD_LAMBDA_10GB", + "ATTRIBUTE_BASED_COMPUTE", + "CUSTOM_INSTANCE_TYPE", + } +} + +type CredentialProviderType string + +// Enum values for CredentialProviderType +const ( + CredentialProviderTypeSecretsManager CredentialProviderType = "SECRETS_MANAGER" +) + +// Values returns all known values for CredentialProviderType. Note that this can +// be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (CredentialProviderType) Values() []CredentialProviderType { + return []CredentialProviderType{ + "SECRETS_MANAGER", + } +} + +type EnvironmentType string + +// Enum values for EnvironmentType +const ( + EnvironmentTypeWindowsContainer EnvironmentType = "WINDOWS_CONTAINER" + EnvironmentTypeLinuxContainer EnvironmentType = "LINUX_CONTAINER" + EnvironmentTypeLinuxGpuContainer EnvironmentType = "LINUX_GPU_CONTAINER" + EnvironmentTypeArmContainer EnvironmentType = "ARM_CONTAINER" + EnvironmentTypeWindowsServer2019Container EnvironmentType = "WINDOWS_SERVER_2019_CONTAINER" + EnvironmentTypeWindowsServer2022Container EnvironmentType = "WINDOWS_SERVER_2022_CONTAINER" + EnvironmentTypeLinuxLambdaContainer EnvironmentType = "LINUX_LAMBDA_CONTAINER" + EnvironmentTypeArmLambdaContainer EnvironmentType = "ARM_LAMBDA_CONTAINER" + EnvironmentTypeLinuxEc2 EnvironmentType = "LINUX_EC2" + EnvironmentTypeArmEc2 EnvironmentType = "ARM_EC2" + EnvironmentTypeWindowsEc2 EnvironmentType = "WINDOWS_EC2" + EnvironmentTypeMacArm EnvironmentType = "MAC_ARM" +) + +// Values returns all known values for EnvironmentType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (EnvironmentType) Values() []EnvironmentType { + return []EnvironmentType{ + "WINDOWS_CONTAINER", + "LINUX_CONTAINER", + "LINUX_GPU_CONTAINER", + "ARM_CONTAINER", + "WINDOWS_SERVER_2019_CONTAINER", + "WINDOWS_SERVER_2022_CONTAINER", + "LINUX_LAMBDA_CONTAINER", + "ARM_LAMBDA_CONTAINER", + "LINUX_EC2", + "ARM_EC2", + "WINDOWS_EC2", + "MAC_ARM", + } +} + +type EnvironmentVariableType string + +// Enum values for EnvironmentVariableType +const ( + EnvironmentVariableTypePlaintext EnvironmentVariableType = "PLAINTEXT" + EnvironmentVariableTypeParameterStore EnvironmentVariableType = "PARAMETER_STORE" + EnvironmentVariableTypeSecretsManager EnvironmentVariableType = "SECRETS_MANAGER" +) + +// Values returns all known values for EnvironmentVariableType. Note that this can +// be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (EnvironmentVariableType) Values() []EnvironmentVariableType { + return []EnvironmentVariableType{ + "PLAINTEXT", + "PARAMETER_STORE", + "SECRETS_MANAGER", + } +} + +type FileSystemType string + +// Enum values for FileSystemType +const ( + FileSystemTypeEfs FileSystemType = "EFS" +) + +// Values returns all known values for FileSystemType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (FileSystemType) Values() []FileSystemType { + return []FileSystemType{ + "EFS", + } +} + +type FleetContextCode string + +// Enum values for FleetContextCode +const ( + FleetContextCodeCreateFailed FleetContextCode = "CREATE_FAILED" + FleetContextCodeUpdateFailed FleetContextCode = "UPDATE_FAILED" + FleetContextCodeActionRequired FleetContextCode = "ACTION_REQUIRED" + FleetContextCodePendingDeletion FleetContextCode = "PENDING_DELETION" + FleetContextCodeInsufficientCapacity FleetContextCode = "INSUFFICIENT_CAPACITY" +) + +// Values returns all known values for FleetContextCode. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (FleetContextCode) Values() []FleetContextCode { + return []FleetContextCode{ + "CREATE_FAILED", + "UPDATE_FAILED", + "ACTION_REQUIRED", + "PENDING_DELETION", + "INSUFFICIENT_CAPACITY", + } +} + +type FleetOverflowBehavior string + +// Enum values for FleetOverflowBehavior +const ( + FleetOverflowBehaviorQueue FleetOverflowBehavior = "QUEUE" + FleetOverflowBehaviorOnDemand FleetOverflowBehavior = "ON_DEMAND" +) + +// Values returns all known values for FleetOverflowBehavior. Note that this can +// be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (FleetOverflowBehavior) Values() []FleetOverflowBehavior { + return []FleetOverflowBehavior{ + "QUEUE", + "ON_DEMAND", + } +} + +type FleetProxyRuleBehavior string + +// Enum values for FleetProxyRuleBehavior +const ( + FleetProxyRuleBehaviorAllowAll FleetProxyRuleBehavior = "ALLOW_ALL" + FleetProxyRuleBehaviorDenyAll FleetProxyRuleBehavior = "DENY_ALL" +) + +// Values returns all known values for FleetProxyRuleBehavior. Note that this can +// be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (FleetProxyRuleBehavior) Values() []FleetProxyRuleBehavior { + return []FleetProxyRuleBehavior{ + "ALLOW_ALL", + "DENY_ALL", + } +} + +type FleetProxyRuleEffectType string + +// Enum values for FleetProxyRuleEffectType +const ( + FleetProxyRuleEffectTypeAllow FleetProxyRuleEffectType = "ALLOW" + FleetProxyRuleEffectTypeDeny FleetProxyRuleEffectType = "DENY" +) + +// Values returns all known values for FleetProxyRuleEffectType. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (FleetProxyRuleEffectType) Values() []FleetProxyRuleEffectType { + return []FleetProxyRuleEffectType{ + "ALLOW", + "DENY", + } +} + +type FleetProxyRuleType string + +// Enum values for FleetProxyRuleType +const ( + FleetProxyRuleTypeDomain FleetProxyRuleType = "DOMAIN" + FleetProxyRuleTypeIp FleetProxyRuleType = "IP" +) + +// Values returns all known values for FleetProxyRuleType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (FleetProxyRuleType) Values() []FleetProxyRuleType { + return []FleetProxyRuleType{ + "DOMAIN", + "IP", + } +} + +type FleetScalingMetricType string + +// Enum values for FleetScalingMetricType +const ( + FleetScalingMetricTypeFleetUtilizationRate FleetScalingMetricType = "FLEET_UTILIZATION_RATE" +) + +// Values returns all known values for FleetScalingMetricType. Note that this can +// be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (FleetScalingMetricType) Values() []FleetScalingMetricType { + return []FleetScalingMetricType{ + "FLEET_UTILIZATION_RATE", + } +} + +type FleetScalingType string + +// Enum values for FleetScalingType +const ( + FleetScalingTypeTargetTrackingScaling FleetScalingType = "TARGET_TRACKING_SCALING" +) + +// Values returns all known values for FleetScalingType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (FleetScalingType) Values() []FleetScalingType { + return []FleetScalingType{ + "TARGET_TRACKING_SCALING", + } +} + +type FleetSortByType string + +// Enum values for FleetSortByType +const ( + FleetSortByTypeName FleetSortByType = "NAME" + FleetSortByTypeCreatedTime FleetSortByType = "CREATED_TIME" + FleetSortByTypeLastModifiedTime FleetSortByType = "LAST_MODIFIED_TIME" +) + +// Values returns all known values for FleetSortByType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (FleetSortByType) Values() []FleetSortByType { + return []FleetSortByType{ + "NAME", + "CREATED_TIME", + "LAST_MODIFIED_TIME", + } +} + +type FleetStatusCode string + +// Enum values for FleetStatusCode +const ( + FleetStatusCodeCreating FleetStatusCode = "CREATING" + FleetStatusCodeUpdating FleetStatusCode = "UPDATING" + FleetStatusCodeRotating FleetStatusCode = "ROTATING" + FleetStatusCodePendingDeletion FleetStatusCode = "PENDING_DELETION" + FleetStatusCodeDeleting FleetStatusCode = "DELETING" + FleetStatusCodeCreateFailed FleetStatusCode = "CREATE_FAILED" + FleetStatusCodeUpdateRollbackFailed FleetStatusCode = "UPDATE_ROLLBACK_FAILED" + FleetStatusCodeActive FleetStatusCode = "ACTIVE" +) + +// Values returns all known values for FleetStatusCode. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (FleetStatusCode) Values() []FleetStatusCode { + return []FleetStatusCode{ + "CREATING", + "UPDATING", + "ROTATING", + "PENDING_DELETION", + "DELETING", + "CREATE_FAILED", + "UPDATE_ROLLBACK_FAILED", + "ACTIVE", + } +} + +type ImagePullCredentialsType string + +// Enum values for ImagePullCredentialsType +const ( + ImagePullCredentialsTypeCodebuild ImagePullCredentialsType = "CODEBUILD" + ImagePullCredentialsTypeServiceRole ImagePullCredentialsType = "SERVICE_ROLE" +) + +// Values returns all known values for ImagePullCredentialsType. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ImagePullCredentialsType) Values() []ImagePullCredentialsType { + return []ImagePullCredentialsType{ + "CODEBUILD", + "SERVICE_ROLE", + } +} + +type LanguageType string + +// Enum values for LanguageType +const ( + LanguageTypeJava LanguageType = "JAVA" + LanguageTypePython LanguageType = "PYTHON" + LanguageTypeNodeJs LanguageType = "NODE_JS" + LanguageTypeRuby LanguageType = "RUBY" + LanguageTypeGolang LanguageType = "GOLANG" + LanguageTypeDocker LanguageType = "DOCKER" + LanguageTypeAndroid LanguageType = "ANDROID" + LanguageTypeDotnet LanguageType = "DOTNET" + LanguageTypeBase LanguageType = "BASE" + LanguageTypePhp LanguageType = "PHP" +) + +// Values returns all known values for LanguageType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (LanguageType) Values() []LanguageType { + return []LanguageType{ + "JAVA", + "PYTHON", + "NODE_JS", + "RUBY", + "GOLANG", + "DOCKER", + "ANDROID", + "DOTNET", + "BASE", + "PHP", + } +} + +type LogsConfigStatusType string + +// Enum values for LogsConfigStatusType +const ( + LogsConfigStatusTypeEnabled LogsConfigStatusType = "ENABLED" + LogsConfigStatusTypeDisabled LogsConfigStatusType = "DISABLED" +) + +// Values returns all known values for LogsConfigStatusType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (LogsConfigStatusType) Values() []LogsConfigStatusType { + return []LogsConfigStatusType{ + "ENABLED", + "DISABLED", + } +} + +type MachineType string + +// Enum values for MachineType +const ( + MachineTypeGeneral MachineType = "GENERAL" + MachineTypeNvme MachineType = "NVME" +) + +// Values returns all known values for MachineType. Note that this can be expanded +// in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (MachineType) Values() []MachineType { + return []MachineType{ + "GENERAL", + "NVME", + } +} + +type PlatformType string + +// Enum values for PlatformType +const ( + PlatformTypeDebian PlatformType = "DEBIAN" + PlatformTypeAmazonLinux PlatformType = "AMAZON_LINUX" + PlatformTypeUbuntu PlatformType = "UBUNTU" + PlatformTypeWindowsServer PlatformType = "WINDOWS_SERVER" +) + +// Values returns all known values for PlatformType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (PlatformType) Values() []PlatformType { + return []PlatformType{ + "DEBIAN", + "AMAZON_LINUX", + "UBUNTU", + "WINDOWS_SERVER", + } +} + +type ProjectSortByType string + +// Enum values for ProjectSortByType +const ( + ProjectSortByTypeName ProjectSortByType = "NAME" + ProjectSortByTypeCreatedTime ProjectSortByType = "CREATED_TIME" + ProjectSortByTypeLastModifiedTime ProjectSortByType = "LAST_MODIFIED_TIME" +) + +// Values returns all known values for ProjectSortByType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ProjectSortByType) Values() []ProjectSortByType { + return []ProjectSortByType{ + "NAME", + "CREATED_TIME", + "LAST_MODIFIED_TIME", + } +} + +type ProjectVisibilityType string + +// Enum values for ProjectVisibilityType +const ( + ProjectVisibilityTypePublicRead ProjectVisibilityType = "PUBLIC_READ" + ProjectVisibilityTypePrivate ProjectVisibilityType = "PRIVATE" +) + +// Values returns all known values for ProjectVisibilityType. Note that this can +// be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ProjectVisibilityType) Values() []ProjectVisibilityType { + return []ProjectVisibilityType{ + "PUBLIC_READ", + "PRIVATE", + } +} + +type PullRequestBuildApproverRole string + +// Enum values for PullRequestBuildApproverRole +const ( + PullRequestBuildApproverRoleGithubRead PullRequestBuildApproverRole = "GITHUB_READ" + PullRequestBuildApproverRoleGithubTriage PullRequestBuildApproverRole = "GITHUB_TRIAGE" + PullRequestBuildApproverRoleGithubWrite PullRequestBuildApproverRole = "GITHUB_WRITE" + PullRequestBuildApproverRoleGithubMaintain PullRequestBuildApproverRole = "GITHUB_MAINTAIN" + PullRequestBuildApproverRoleGithubAdmin PullRequestBuildApproverRole = "GITHUB_ADMIN" + PullRequestBuildApproverRoleGitlabGuest PullRequestBuildApproverRole = "GITLAB_GUEST" + PullRequestBuildApproverRoleGitlabPlanner PullRequestBuildApproverRole = "GITLAB_PLANNER" + PullRequestBuildApproverRoleGitlabReporter PullRequestBuildApproverRole = "GITLAB_REPORTER" + PullRequestBuildApproverRoleGitlabDeveloper PullRequestBuildApproverRole = "GITLAB_DEVELOPER" + PullRequestBuildApproverRoleGitlabMaintainer PullRequestBuildApproverRole = "GITLAB_MAINTAINER" + PullRequestBuildApproverRoleGitlabOwner PullRequestBuildApproverRole = "GITLAB_OWNER" + PullRequestBuildApproverRoleBitbucketRead PullRequestBuildApproverRole = "BITBUCKET_READ" + PullRequestBuildApproverRoleBitbucketWrite PullRequestBuildApproverRole = "BITBUCKET_WRITE" + PullRequestBuildApproverRoleBitbucketAdmin PullRequestBuildApproverRole = "BITBUCKET_ADMIN" +) + +// Values returns all known values for PullRequestBuildApproverRole. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (PullRequestBuildApproverRole) Values() []PullRequestBuildApproverRole { + return []PullRequestBuildApproverRole{ + "GITHUB_READ", + "GITHUB_TRIAGE", + "GITHUB_WRITE", + "GITHUB_MAINTAIN", + "GITHUB_ADMIN", + "GITLAB_GUEST", + "GITLAB_PLANNER", + "GITLAB_REPORTER", + "GITLAB_DEVELOPER", + "GITLAB_MAINTAINER", + "GITLAB_OWNER", + "BITBUCKET_READ", + "BITBUCKET_WRITE", + "BITBUCKET_ADMIN", + } +} + +type PullRequestBuildCommentApproval string + +// Enum values for PullRequestBuildCommentApproval +const ( + PullRequestBuildCommentApprovalDisabled PullRequestBuildCommentApproval = "DISABLED" + PullRequestBuildCommentApprovalAllPullRequests PullRequestBuildCommentApproval = "ALL_PULL_REQUESTS" + PullRequestBuildCommentApprovalForkPullRequests PullRequestBuildCommentApproval = "FORK_PULL_REQUESTS" +) + +// Values returns all known values for PullRequestBuildCommentApproval. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (PullRequestBuildCommentApproval) Values() []PullRequestBuildCommentApproval { + return []PullRequestBuildCommentApproval{ + "DISABLED", + "ALL_PULL_REQUESTS", + "FORK_PULL_REQUESTS", + } +} + +type ReportCodeCoverageSortByType string + +// Enum values for ReportCodeCoverageSortByType +const ( + ReportCodeCoverageSortByTypeLineCoveragePercentage ReportCodeCoverageSortByType = "LINE_COVERAGE_PERCENTAGE" + ReportCodeCoverageSortByTypeFilePath ReportCodeCoverageSortByType = "FILE_PATH" +) + +// Values returns all known values for ReportCodeCoverageSortByType. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ReportCodeCoverageSortByType) Values() []ReportCodeCoverageSortByType { + return []ReportCodeCoverageSortByType{ + "LINE_COVERAGE_PERCENTAGE", + "FILE_PATH", + } +} + +type ReportExportConfigType string + +// Enum values for ReportExportConfigType +const ( + ReportExportConfigTypeS3 ReportExportConfigType = "S3" + ReportExportConfigTypeNoExport ReportExportConfigType = "NO_EXPORT" +) + +// Values returns all known values for ReportExportConfigType. Note that this can +// be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ReportExportConfigType) Values() []ReportExportConfigType { + return []ReportExportConfigType{ + "S3", + "NO_EXPORT", + } +} + +type ReportGroupSortByType string + +// Enum values for ReportGroupSortByType +const ( + ReportGroupSortByTypeName ReportGroupSortByType = "NAME" + ReportGroupSortByTypeCreatedTime ReportGroupSortByType = "CREATED_TIME" + ReportGroupSortByTypeLastModifiedTime ReportGroupSortByType = "LAST_MODIFIED_TIME" +) + +// Values returns all known values for ReportGroupSortByType. Note that this can +// be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ReportGroupSortByType) Values() []ReportGroupSortByType { + return []ReportGroupSortByType{ + "NAME", + "CREATED_TIME", + "LAST_MODIFIED_TIME", + } +} + +type ReportGroupStatusType string + +// Enum values for ReportGroupStatusType +const ( + ReportGroupStatusTypeActive ReportGroupStatusType = "ACTIVE" + ReportGroupStatusTypeDeleting ReportGroupStatusType = "DELETING" +) + +// Values returns all known values for ReportGroupStatusType. Note that this can +// be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ReportGroupStatusType) Values() []ReportGroupStatusType { + return []ReportGroupStatusType{ + "ACTIVE", + "DELETING", + } +} + +type ReportGroupTrendFieldType string + +// Enum values for ReportGroupTrendFieldType +const ( + ReportGroupTrendFieldTypePassRate ReportGroupTrendFieldType = "PASS_RATE" + ReportGroupTrendFieldTypeDuration ReportGroupTrendFieldType = "DURATION" + ReportGroupTrendFieldTypeTotal ReportGroupTrendFieldType = "TOTAL" + ReportGroupTrendFieldTypeLineCoverage ReportGroupTrendFieldType = "LINE_COVERAGE" + ReportGroupTrendFieldTypeLinesCovered ReportGroupTrendFieldType = "LINES_COVERED" + ReportGroupTrendFieldTypeLinesMissed ReportGroupTrendFieldType = "LINES_MISSED" + ReportGroupTrendFieldTypeBranchCoverage ReportGroupTrendFieldType = "BRANCH_COVERAGE" + ReportGroupTrendFieldTypeBranchesCovered ReportGroupTrendFieldType = "BRANCHES_COVERED" + ReportGroupTrendFieldTypeBranchesMissed ReportGroupTrendFieldType = "BRANCHES_MISSED" +) + +// Values returns all known values for ReportGroupTrendFieldType. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ReportGroupTrendFieldType) Values() []ReportGroupTrendFieldType { + return []ReportGroupTrendFieldType{ + "PASS_RATE", + "DURATION", + "TOTAL", + "LINE_COVERAGE", + "LINES_COVERED", + "LINES_MISSED", + "BRANCH_COVERAGE", + "BRANCHES_COVERED", + "BRANCHES_MISSED", + } +} + +type ReportPackagingType string + +// Enum values for ReportPackagingType +const ( + ReportPackagingTypeZip ReportPackagingType = "ZIP" + ReportPackagingTypeNone ReportPackagingType = "NONE" +) + +// Values returns all known values for ReportPackagingType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ReportPackagingType) Values() []ReportPackagingType { + return []ReportPackagingType{ + "ZIP", + "NONE", + } +} + +type ReportStatusType string + +// Enum values for ReportStatusType +const ( + ReportStatusTypeGenerating ReportStatusType = "GENERATING" + ReportStatusTypeSucceeded ReportStatusType = "SUCCEEDED" + ReportStatusTypeFailed ReportStatusType = "FAILED" + ReportStatusTypeIncomplete ReportStatusType = "INCOMPLETE" + ReportStatusTypeDeleting ReportStatusType = "DELETING" +) + +// 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{ + "GENERATING", + "SUCCEEDED", + "FAILED", + "INCOMPLETE", + "DELETING", + } +} + +type ReportType string + +// Enum values for ReportType +const ( + ReportTypeTest ReportType = "TEST" + ReportTypeCodeCoverage ReportType = "CODE_COVERAGE" +) + +// Values returns all known values for ReportType. Note that this can be expanded +// in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ReportType) Values() []ReportType { + return []ReportType{ + "TEST", + "CODE_COVERAGE", + } +} + +type RetryBuildBatchType string + +// Enum values for RetryBuildBatchType +const ( + RetryBuildBatchTypeRetryAllBuilds RetryBuildBatchType = "RETRY_ALL_BUILDS" + RetryBuildBatchTypeRetryFailedBuilds RetryBuildBatchType = "RETRY_FAILED_BUILDS" +) + +// Values returns all known values for RetryBuildBatchType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RetryBuildBatchType) Values() []RetryBuildBatchType { + return []RetryBuildBatchType{ + "RETRY_ALL_BUILDS", + "RETRY_FAILED_BUILDS", + } +} + +type ServerType string + +// Enum values for ServerType +const ( + ServerTypeGithub ServerType = "GITHUB" + ServerTypeBitbucket ServerType = "BITBUCKET" + ServerTypeGithubEnterprise ServerType = "GITHUB_ENTERPRISE" + ServerTypeGitlab ServerType = "GITLAB" + ServerTypeGitlabSelfManaged ServerType = "GITLAB_SELF_MANAGED" +) + +// Values returns all known values for ServerType. Note that this can be expanded +// in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ServerType) Values() []ServerType { + return []ServerType{ + "GITHUB", + "BITBUCKET", + "GITHUB_ENTERPRISE", + "GITLAB", + "GITLAB_SELF_MANAGED", + } +} + +type SharedResourceSortByType string + +// Enum values for SharedResourceSortByType +const ( + SharedResourceSortByTypeArn SharedResourceSortByType = "ARN" + SharedResourceSortByTypeModifiedTime SharedResourceSortByType = "MODIFIED_TIME" +) + +// Values returns all known values for SharedResourceSortByType. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (SharedResourceSortByType) Values() []SharedResourceSortByType { + return []SharedResourceSortByType{ + "ARN", + "MODIFIED_TIME", + } +} + +type SortOrderType string + +// Enum values for SortOrderType +const ( + SortOrderTypeAscending SortOrderType = "ASCENDING" + SortOrderTypeDescending SortOrderType = "DESCENDING" +) + +// Values returns all known values for SortOrderType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (SortOrderType) Values() []SortOrderType { + return []SortOrderType{ + "ASCENDING", + "DESCENDING", + } +} + +type SourceAuthType string + +// Enum values for SourceAuthType +const ( + SourceAuthTypeOauth SourceAuthType = "OAUTH" + SourceAuthTypeCodeconnections SourceAuthType = "CODECONNECTIONS" + SourceAuthTypeSecretsManager SourceAuthType = "SECRETS_MANAGER" +) + +// Values returns all known values for SourceAuthType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (SourceAuthType) Values() []SourceAuthType { + return []SourceAuthType{ + "OAUTH", + "CODECONNECTIONS", + "SECRETS_MANAGER", + } +} + +type SourceType string + +// Enum values for SourceType +const ( + SourceTypeCodecommit SourceType = "CODECOMMIT" + SourceTypeCodepipeline SourceType = "CODEPIPELINE" + SourceTypeGithub SourceType = "GITHUB" + SourceTypeGitlab SourceType = "GITLAB" + SourceTypeGitlabSelfManaged SourceType = "GITLAB_SELF_MANAGED" + SourceTypeS3 SourceType = "S3" + SourceTypeBitbucket SourceType = "BITBUCKET" + SourceTypeGithubEnterprise SourceType = "GITHUB_ENTERPRISE" + SourceTypeNoSource SourceType = "NO_SOURCE" +) + +// Values returns all known values for SourceType. Note that this can be expanded +// in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (SourceType) Values() []SourceType { + return []SourceType{ + "CODECOMMIT", + "CODEPIPELINE", + "GITHUB", + "GITLAB", + "GITLAB_SELF_MANAGED", + "S3", + "BITBUCKET", + "GITHUB_ENTERPRISE", + "NO_SOURCE", + } +} + +type StatusType string + +// Enum values for StatusType +const ( + StatusTypeSucceeded StatusType = "SUCCEEDED" + StatusTypeFailed StatusType = "FAILED" + StatusTypeFault StatusType = "FAULT" + StatusTypeTimedOut StatusType = "TIMED_OUT" + StatusTypeInProgress StatusType = "IN_PROGRESS" + StatusTypeStopped StatusType = "STOPPED" +) + +// 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{ + "SUCCEEDED", + "FAILED", + "FAULT", + "TIMED_OUT", + "IN_PROGRESS", + "STOPPED", + } +} + +type WebhookBuildType string + +// Enum values for WebhookBuildType +const ( + WebhookBuildTypeBuild WebhookBuildType = "BUILD" + WebhookBuildTypeBuildBatch WebhookBuildType = "BUILD_BATCH" + WebhookBuildTypeRunnerBuildkiteBuild WebhookBuildType = "RUNNER_BUILDKITE_BUILD" +) + +// Values returns all known values for WebhookBuildType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (WebhookBuildType) Values() []WebhookBuildType { + return []WebhookBuildType{ + "BUILD", + "BUILD_BATCH", + "RUNNER_BUILDKITE_BUILD", + } +} + +type WebhookFilterType string + +// Enum values for WebhookFilterType +const ( + WebhookFilterTypeEvent WebhookFilterType = "EVENT" + WebhookFilterTypeBaseRef WebhookFilterType = "BASE_REF" + WebhookFilterTypeHeadRef WebhookFilterType = "HEAD_REF" + WebhookFilterTypeActorAccountId WebhookFilterType = "ACTOR_ACCOUNT_ID" + WebhookFilterTypeFilePath WebhookFilterType = "FILE_PATH" + WebhookFilterTypeCommitMessage WebhookFilterType = "COMMIT_MESSAGE" + WebhookFilterTypeWorkflowName WebhookFilterType = "WORKFLOW_NAME" + WebhookFilterTypeTagName WebhookFilterType = "TAG_NAME" + WebhookFilterTypeReleaseName WebhookFilterType = "RELEASE_NAME" + WebhookFilterTypeRepositoryName WebhookFilterType = "REPOSITORY_NAME" + WebhookFilterTypeOrganizationName WebhookFilterType = "ORGANIZATION_NAME" +) + +// Values returns all known values for WebhookFilterType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (WebhookFilterType) Values() []WebhookFilterType { + return []WebhookFilterType{ + "EVENT", + "BASE_REF", + "HEAD_REF", + "ACTOR_ACCOUNT_ID", + "FILE_PATH", + "COMMIT_MESSAGE", + "WORKFLOW_NAME", + "TAG_NAME", + "RELEASE_NAME", + "REPOSITORY_NAME", + "ORGANIZATION_NAME", + } +} + +type WebhookScopeType string + +// Enum values for WebhookScopeType +const ( + WebhookScopeTypeGithubOrganization WebhookScopeType = "GITHUB_ORGANIZATION" + WebhookScopeTypeGithubGlobal WebhookScopeType = "GITHUB_GLOBAL" + WebhookScopeTypeGitlabGroup WebhookScopeType = "GITLAB_GROUP" +) + +// Values returns all known values for WebhookScopeType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (WebhookScopeType) Values() []WebhookScopeType { + return []WebhookScopeType{ + "GITHUB_ORGANIZATION", + "GITHUB_GLOBAL", + "GITLAB_GROUP", + } +} + +type WebhookStatus string + +// Enum values for WebhookStatus +const ( + WebhookStatusCreating WebhookStatus = "CREATING" + WebhookStatusCreateFailed WebhookStatus = "CREATE_FAILED" + WebhookStatusActive WebhookStatus = "ACTIVE" + WebhookStatusDeleting WebhookStatus = "DELETING" +) + +// Values returns all known values for WebhookStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (WebhookStatus) Values() []WebhookStatus { + return []WebhookStatus{ + "CREATING", + "CREATE_FAILED", + "ACTIVE", + "DELETING", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/types/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/types/errors.go new file mode 100644 index 00000000000..46225feba24 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/types/errors.go @@ -0,0 +1,167 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + "fmt" + smithy "github.com/aws/smithy-go" +) + +// An Amazon Web Services service limit was exceeded for the calling Amazon Web +// Services account. +type AccountLimitExceededException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *AccountLimitExceededException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *AccountLimitExceededException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *AccountLimitExceededException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "AccountLimitExceededException" + } + return *e.ErrorCodeOverride +} +func (e *AccountLimitExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The CodeBuild access has been suspended for the calling Amazon Web Services +// account. +type AccountSuspendedException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *AccountSuspendedException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *AccountSuspendedException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *AccountSuspendedException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "AccountSuspendedException" + } + return *e.ErrorCodeOverride +} +func (e *AccountSuspendedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The input value that was provided is not valid. +type InvalidInputException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidInputException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidInputException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidInputException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidInputException" + } + return *e.ErrorCodeOverride +} +func (e *InvalidInputException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// There was a problem with the underlying OAuth provider. +type OAuthProviderException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *OAuthProviderException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *OAuthProviderException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *OAuthProviderException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "OAuthProviderException" + } + return *e.ErrorCodeOverride +} +func (e *OAuthProviderException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The specified Amazon Web Services resource cannot be created, because an Amazon +// Web Services resource with the same settings already exists. +type ResourceAlreadyExistsException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ResourceAlreadyExistsException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ResourceAlreadyExistsException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ResourceAlreadyExistsException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ResourceAlreadyExistsException" + } + return *e.ErrorCodeOverride +} +func (e *ResourceAlreadyExistsException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The specified Amazon Web Services resource cannot be found. +type ResourceNotFoundException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ResourceNotFoundException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ResourceNotFoundException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ResourceNotFoundException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ResourceNotFoundException" + } + return *e.ErrorCodeOverride +} +func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/types/types.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/types/types.go new file mode 100644 index 00000000000..3aefde044c5 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/types/types.go @@ -0,0 +1,3132 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + smithydocument "github.com/aws/smithy-go/document" + "time" +) + +// Information about the auto-retry configuration for the build. +type AutoRetryConfig struct { + + // The maximum number of additional automatic retries after a failed build. For + // example, if the auto-retry limit is set to 2, CodeBuild will call the RetryBuild + // API to automatically retry your build for up to 2 additional times. + AutoRetryLimit *int32 + + // The number of times that the build has been retried. The initial build will + // have an auto-retry number of 0. + AutoRetryNumber *int32 + + // The build ARN of the auto-retried build triggered by the current build. The + // next auto-retry will be null for builds that don't trigger an auto-retry. + NextAutoRetry *string + + // The build ARN of the build that triggered the current auto-retry build. The + // previous auto-retry will be null for the initial build. + PreviousAutoRetry *string + + noSmithyDocumentSerde +} + +// Specifies restrictions for the batch build. +type BatchRestrictions struct { + + // An array of strings that specify the compute types that are allowed for the + // batch build. See [Build environment compute types]in the CodeBuild User Guide for these values. + // + // [Build environment compute types]: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html + ComputeTypesAllowed []string + + // An array of strings that specify the fleets that are allowed for the batch + // build. See [Run builds on reserved capacity fleets]in the CodeBuild User Guide for more information. + // + // [Run builds on reserved capacity fleets]: https://docs.aws.amazon.com/codebuild/latest/userguide/fleets.html + FleetsAllowed []string + + // Specifies the maximum number of builds allowed. + MaximumBuildsAllowed *int32 + + noSmithyDocumentSerde +} + +// Information about a build. +type Build struct { + + // The Amazon Resource Name (ARN) of the build. + Arn *string + + // Information about the output artifacts for the build. + Artifacts *BuildArtifacts + + // Information about the auto-retry configuration for the build. + AutoRetryConfig *AutoRetryConfig + + // The ARN of the batch build that this build is a member of, if applicable. + BuildBatchArn *string + + // Whether the build is complete. True if complete; otherwise, false. + BuildComplete bool + + // The number of the build. For each project, the buildNumber of its first build + // is 1 . The buildNumber of each subsequent build is incremented by 1 . If a build + // is deleted, the buildNumber of other builds does not change. + BuildNumber *int64 + + // The current status of the build. Valid values include: + // + // - FAILED : The build failed. + // + // - FAULT : The build faulted. + // + // - IN_PROGRESS : The build is still in progress. + // + // - STOPPED : The build stopped. + // + // - SUCCEEDED : The build succeeded. + // + // - TIMED_OUT : The build timed out. + BuildStatus StatusType + + // Information about the cache for the build. + Cache *ProjectCache + + // The current build phase. + CurrentPhase *string + + // Contains information about the debug session for this build. + DebugSession *DebugSession + + // The Key Management Service customer master key (CMK) to be used for encrypting + // the build output artifacts. + // + // You can use a cross-account KMS key to encrypt the build output artifacts if + // your service role has permission to that key. + // + // You can specify either the Amazon Resource Name (ARN) of the CMK or, if + // available, the CMK's alias (using the format alias/ ). + EncryptionKey *string + + // When the build process ended, expressed in Unix time format. + EndTime *time.Time + + // Information about the build environment for this build. + Environment *ProjectEnvironment + + // A list of exported environment variables for this build. + // + // Exported environment variables are used in conjunction with CodePipeline to + // export environment variables from the current build stage to subsequent stages + // in the pipeline. For more information, see [Working with variables]in the CodePipeline User Guide. + // + // [Working with variables]: https://docs.aws.amazon.com/codepipeline/latest/userguide/actions-variables.html + ExportedEnvironmentVariables []ExportedEnvironmentVariable + + // An array of ProjectFileSystemLocation objects for a CodeBuild build project. A + // ProjectFileSystemLocation object specifies the identifier , location , + // mountOptions , mountPoint , and type of a file system created using Amazon + // Elastic File System. + FileSystemLocations []ProjectFileSystemLocation + + // The unique ID for the build. + Id *string + + // The entity that started the build. Valid values include: + // + // - If CodePipeline started the build, the pipeline's name (for example, + // codepipeline/my-demo-pipeline ). + // + // - If a user started the build, the user's name (for example, MyUserName ). + // + // - If the Jenkins plugin for CodeBuild started the build, the string + // CodeBuild-Jenkins-Plugin . + Initiator *string + + // Information about the build's logs in CloudWatch Logs. + Logs *LogsLocation + + // Describes a network interface. + NetworkInterface *NetworkInterface + + // Information about all previous build phases that are complete and information + // about any current build phase that is not yet complete. + Phases []BuildPhase + + // The name of the CodeBuild project. + ProjectName *string + + // The number of minutes a build is allowed to be queued before it times out. + QueuedTimeoutInMinutes *int32 + + // An array of the ARNs associated with this build's reports. + ReportArns []string + + // An identifier for the version of this build's source code. + // + // - For CodeCommit, GitHub, GitHub Enterprise, and BitBucket, the commit ID. + // + // - For CodePipeline, the source revision provided by CodePipeline. + // + // - For Amazon S3, this does not apply. + ResolvedSourceVersion *string + + // An array of ProjectArtifacts objects. + SecondaryArtifacts []BuildArtifacts + + // An array of ProjectSourceVersion objects. Each ProjectSourceVersion must be + // one of: + // + // - For CodeCommit: the commit ID, branch, or Git tag to use. + // + // - For GitHub: the commit ID, pull request ID, branch name, or tag name that + // corresponds to the version of the source code you want to build. If a pull + // request ID is specified, it must use the format pr/pull-request-ID (for + // example, pr/25 ). If a branch name is specified, the branch's HEAD commit ID + // is used. If not specified, the default branch's HEAD commit ID is used. + // + // - For Bitbucket: the commit ID, branch name, or tag name that corresponds to + // the version of the source code you want to build. If a branch name is specified, + // the branch's HEAD commit ID is used. If not specified, the default branch's HEAD + // commit ID is used. + // + // - For Amazon S3: the version ID of the object that represents the build input + // ZIP file to use. + SecondarySourceVersions []ProjectSourceVersion + + // An array of ProjectSource objects. + SecondarySources []ProjectSource + + // The name of a service role used for this build. + ServiceRole *string + + // Information about the source code to be built. + Source *ProjectSource + + // Any version identifier for the version of the source code to be built. If + // sourceVersion is specified at the project level, then this sourceVersion (at + // the build level) takes precedence. + // + // For more information, see [Source Version Sample with CodeBuild] in the CodeBuild User Guide. + // + // [Source Version Sample with CodeBuild]: https://docs.aws.amazon.com/codebuild/latest/userguide/sample-source-version.html + SourceVersion *string + + // When the build process started, expressed in Unix time format. + StartTime *time.Time + + // How long, in minutes, from 5 to 2160 (36 hours), for CodeBuild to wait before + // timing out this build if it does not get marked as completed. + TimeoutInMinutes *int32 + + // If your CodeBuild project accesses resources in an Amazon VPC, you provide this + // parameter that identifies the VPC ID and the list of security group IDs and + // subnet IDs. The security groups and subnets must belong to the same VPC. You + // must provide at least one security group and one subnet ID. + VpcConfig *VpcConfig + + noSmithyDocumentSerde +} + +// Information about build output artifacts. +type BuildArtifacts struct { + + // An identifier for this artifact definition. + ArtifactIdentifier *string + + // Specifies the bucket owner's access for objects that another account uploads to + // their Amazon S3 bucket. By default, only the account that uploads the objects to + // the bucket has access to these objects. This property allows you to give the + // bucket owner access to these objects. + // + // To use this property, your CodeBuild service role must have the s3:PutBucketAcl + // permission. This permission allows CodeBuild to modify the access control list + // for the bucket. + // + // This property can be one of the following values: + // + // NONE The bucket owner does not have access to the objects. This is the default. + // + // READ_ONLY The bucket owner has read-only access to the objects. The uploading + // account retains ownership of the objects. + // + // FULL The bucket owner has full access to the objects. Object ownership is + // determined by the following criteria: + // + // - If the bucket is configured with the Bucket owner preferred setting, the + // bucket owner owns the objects. The uploading account will have object access as + // specified by the bucket's policy. + // + // - Otherwise, the uploading account retains ownership of the objects. + // + // For more information about Amazon S3 object ownership, see [Controlling ownership of uploaded objects using S3 Object Ownership] in the Amazon + // Simple Storage Service User Guide. + // + // [Controlling ownership of uploaded objects using S3 Object Ownership]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html + BucketOwnerAccess BucketOwnerAccess + + // Information that tells you if encryption for build artifacts is disabled. + EncryptionDisabled *bool + + // Information about the location of the build artifacts. + Location *string + + // The MD5 hash of the build artifact. + // + // You can use this hash along with a checksum tool to confirm file integrity and + // authenticity. + // + // This value is available only if the build project's packaging value is set to + // ZIP . + Md5sum *string + + // If this flag is set, a name specified in the buildspec file overrides the + // artifact name. The name specified in a buildspec file is calculated at build + // time and uses the Shell Command Language. For example, you can append a date and + // time to your artifact name so that it is always unique. + OverrideArtifactName *bool + + // The SHA-256 hash of the build artifact. + // + // You can use this hash along with a checksum tool to confirm file integrity and + // authenticity. + // + // This value is available only if the build project's packaging value is set to + // ZIP . + Sha256sum *string + + noSmithyDocumentSerde +} + +// Contains information about a batch build. +type BuildBatch struct { + + // The ARN of the batch build. + Arn *string + + // A BuildArtifacts object the defines the build artifacts for this batch build. + Artifacts *BuildArtifacts + + // Contains configuration information about a batch build project. + BuildBatchConfig *ProjectBuildBatchConfig + + // The number of the batch build. For each project, the buildBatchNumber of its + // first batch build is 1 . The buildBatchNumber of each subsequent batch build is + // incremented by 1 . If a batch build is deleted, the buildBatchNumber of other + // batch builds does not change. + BuildBatchNumber *int64 + + // The status of the batch build. + BuildBatchStatus StatusType + + // An array of BuildGroup objects that define the build groups for the batch build. + BuildGroups []BuildGroup + + // Specifies the maximum amount of time, in minutes, that the build in a batch + // must be completed in. + BuildTimeoutInMinutes *int32 + + // Information about the cache for the build project. + Cache *ProjectCache + + // Indicates if the batch build is complete. + Complete bool + + // The current phase of the batch build. + CurrentPhase *string + + // Specifies if session debugging is enabled for this batch build. For more + // information, see [Viewing a running build in Session Manager]. Batch session debugging is not supported for matrix batch + // builds. + // + // [Viewing a running build in Session Manager]: https://docs.aws.amazon.com/codebuild/latest/userguide/session-manager.html + DebugSessionEnabled *bool + + // The Key Management Service customer master key (CMK) to be used for encrypting + // the batch build output artifacts. + // + // You can use a cross-account KMS key to encrypt the build output artifacts if + // your service role has permission to that key. + // + // You can specify either the Amazon Resource Name (ARN) of the CMK or, if + // available, the CMK's alias (using the format alias/ ). + EncryptionKey *string + + // The date and time that the batch build ended. + EndTime *time.Time + + // Information about the build environment of the build project. + Environment *ProjectEnvironment + + // An array of ProjectFileSystemLocation objects for the batch build project. A + // ProjectFileSystemLocation object specifies the identifier , location , + // mountOptions , mountPoint , and type of a file system created using Amazon + // Elastic File System. + FileSystemLocations []ProjectFileSystemLocation + + // The identifier of the batch build. + Id *string + + // The entity that started the batch build. Valid values include: + // + // - If CodePipeline started the build, the pipeline's name (for example, + // codepipeline/my-demo-pipeline ). + // + // - If a user started the build, the user's name. + // + // - If the Jenkins plugin for CodeBuild started the build, the string + // CodeBuild-Jenkins-Plugin . + Initiator *string + + // Information about logs for a build project. These can be logs in CloudWatch + // Logs, built in a specified S3 bucket, or both. + LogConfig *LogsConfig + + // An array of BuildBatchPhase objects the specify the phases of the batch build. + Phases []BuildBatchPhase + + // The name of the batch build project. + ProjectName *string + + // Specifies the amount of time, in minutes, that the batch build is allowed to be + // queued before it times out. + QueuedTimeoutInMinutes *int32 + + // An array that contains the ARNs of reports created by merging reports from + // builds associated with this batch build. + ReportArns []string + + // The identifier of the resolved version of this batch build's source code. + // + // - For CodeCommit, GitHub, GitHub Enterprise, and BitBucket, the commit ID. + // + // - For CodePipeline, the source revision provided by CodePipeline. + // + // - For Amazon S3, this does not apply. + ResolvedSourceVersion *string + + // An array of BuildArtifacts objects the define the build artifacts for this + // batch build. + SecondaryArtifacts []BuildArtifacts + + // An array of ProjectSourceVersion objects. Each ProjectSourceVersion must be one + // of: + // + // - For CodeCommit: the commit ID, branch, or Git tag to use. + // + // - For GitHub: the commit ID, pull request ID, branch name, or tag name that + // corresponds to the version of the source code you want to build. If a pull + // request ID is specified, it must use the format pr/pull-request-ID (for + // example, pr/25 ). If a branch name is specified, the branch's HEAD commit ID + // is used. If not specified, the default branch's HEAD commit ID is used. + // + // - For Bitbucket: the commit ID, branch name, or tag name that corresponds to + // the version of the source code you want to build. If a branch name is specified, + // the branch's HEAD commit ID is used. If not specified, the default branch's HEAD + // commit ID is used. + // + // - For Amazon S3: the version ID of the object that represents the build input + // ZIP file to use. + SecondarySourceVersions []ProjectSourceVersion + + // An array of ProjectSource objects that define the sources for the batch build. + SecondarySources []ProjectSource + + // The name of a service role used for builds in the batch. + ServiceRole *string + + // Information about the build input source code for the build project. + Source *ProjectSource + + // The identifier of the version of the source code to be built. + SourceVersion *string + + // The date and time that the batch build started. + StartTime *time.Time + + // Information about the VPC configuration that CodeBuild accesses. + VpcConfig *VpcConfig + + noSmithyDocumentSerde +} + +// Specifies filters when retrieving batch builds. +type BuildBatchFilter struct { + + // The status of the batch builds to retrieve. Only batch builds that have this + // status will be retrieved. + Status StatusType + + noSmithyDocumentSerde +} + +// Contains information about a stage for a batch build. +type BuildBatchPhase struct { + + // Additional information about the batch build phase. Especially to help + // troubleshoot a failed batch build. + Contexts []PhaseContext + + // How long, in seconds, between the starting and ending times of the batch + // build's phase. + DurationInSeconds *int64 + + // When the batch build phase ended, expressed in Unix time format. + EndTime *time.Time + + // The current status of the batch build phase. Valid values include: + // + // FAILED The build phase failed. + // + // FAULT The build phase faulted. + // + // IN_PROGRESS The build phase is still in progress. + // + // STOPPED The build phase stopped. + // + // SUCCEEDED The build phase succeeded. + // + // TIMED_OUT The build phase timed out. + PhaseStatus StatusType + + // The name of the batch build phase. Valid values include: + // + // COMBINE_ARTIFACTS Build output artifacts are being combined and uploaded to the + // output location. + // + // DOWNLOAD_BATCHSPEC The batch build specification is being downloaded. + // + // FAILED One or more of the builds failed. + // + // IN_PROGRESS The batch build is in progress. + // + // STOPPED The batch build was stopped. + // + // SUBMITTED The btach build has been submitted. + // + // SUCCEEDED The batch build succeeded. + PhaseType BuildBatchPhaseType + + // When the batch build phase started, expressed in Unix time format. + StartTime *time.Time + + noSmithyDocumentSerde +} + +// Contains information about a batch build build group. Build groups are used to +// combine builds that can run in parallel, while still being able to set +// dependencies on other build groups. +type BuildGroup struct { + + // A BuildSummary object that contains a summary of the current build group. + CurrentBuildSummary *BuildSummary + + // An array of strings that contain the identifiers of the build groups that this + // build group depends on. + DependsOn []string + + // Contains the identifier of the build group. + Identifier *string + + // Specifies if failures in this build group can be ignored. + IgnoreFailure bool + + // An array of BuildSummary objects that contain summaries of previous build + // groups. + PriorBuildSummaryList []BuildSummary + + noSmithyDocumentSerde +} + +// Information about a build that could not be successfully deleted. +type BuildNotDeleted struct { + + // The ID of the build that could not be successfully deleted. + Id *string + + // Additional information about the build that could not be successfully deleted. + StatusCode *string + + noSmithyDocumentSerde +} + +// Information about a stage for a build. +type BuildPhase struct { + + // Additional information about a build phase, especially to help troubleshoot a + // failed build. + Contexts []PhaseContext + + // How long, in seconds, between the starting and ending times of the build's + // phase. + DurationInSeconds *int64 + + // When the build phase ended, expressed in Unix time format. + EndTime *time.Time + + // The current status of the build phase. Valid values include: + // + // FAILED The build phase failed. + // + // FAULT The build phase faulted. + // + // IN_PROGRESS The build phase is still in progress. + // + // STOPPED The build phase stopped. + // + // SUCCEEDED The build phase succeeded. + // + // TIMED_OUT The build phase timed out. + PhaseStatus StatusType + + // The name of the build phase. Valid values include: + // + // BUILD Core build activities typically occur in this build phase. + // + // COMPLETED The build has been completed. + // + // DOWNLOAD_SOURCE Source code is being downloaded in this build phase. + // + // FINALIZING The build process is completing in this build phase. + // + // INSTALL Installation activities typically occur in this build phase. + // + // POST_BUILD Post-build activities typically occur in this build phase. + // + // PRE_BUILD Pre-build activities typically occur in this build phase. + // + // PROVISIONING The build environment is being set up. + // + // QUEUED The build has been submitted and is queued behind other submitted builds. + // + // SUBMITTED The build has been submitted. + // + // UPLOAD_ARTIFACTS Build output artifacts are being uploaded to the output + // location. + PhaseType BuildPhaseType + + // When the build phase started, expressed in Unix time format. + StartTime *time.Time + + noSmithyDocumentSerde +} + +// Contains information that defines how the CodeBuild build project reports the +// build status to the source provider. +type BuildStatusConfig struct { + + // Specifies the context of the build status CodeBuild sends to the source + // provider. The usage of this parameter depends on the source provider. + // + // Bitbucket This parameter is used for the name parameter in the Bitbucket commit + // status. For more information, see [build]in the Bitbucket API documentation. + // + // GitHub/GitHub Enterprise Server This parameter is used for the context + // parameter in the GitHub commit status. For more information, see [Create a commit status]in the GitHub + // developer guide. + // + // [build]: https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/commit/%7Bnode%7D/statuses/build + // [Create a commit status]: https://developer.github.com/v3/repos/statuses/#create-a-commit-status + Context *string + + // Specifies the target url of the build status CodeBuild sends to the source + // provider. The usage of this parameter depends on the source provider. + // + // Bitbucket This parameter is used for the url parameter in the Bitbucket commit + // status. For more information, see [build]in the Bitbucket API documentation. + // + // GitHub/GitHub Enterprise Server This parameter is used for the target_url + // parameter in the GitHub commit status. For more information, see [Create a commit status]in the GitHub + // developer guide. + // + // [build]: https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/commit/%7Bnode%7D/statuses/build + // [Create a commit status]: https://developer.github.com/v3/repos/statuses/#create-a-commit-status + TargetUrl *string + + noSmithyDocumentSerde +} + +// Contains summary information about a batch build group. +type BuildSummary struct { + + // The batch build ARN. + Arn *string + + // The status of the build group. + // + // FAILED The build group failed. + // + // FAULT The build group faulted. + // + // IN_PROGRESS The build group is still in progress. + // + // STOPPED The build group stopped. + // + // SUCCEEDED The build group succeeded. + // + // TIMED_OUT The build group timed out. + BuildStatus StatusType + + // A ResolvedArtifact object that represents the primary build artifacts for the + // build group. + PrimaryArtifact *ResolvedArtifact + + // When the build was started, expressed in Unix time format. + RequestedOn *time.Time + + // An array of ResolvedArtifact objects that represents the secondary build + // artifacts for the build group. + SecondaryArtifacts []ResolvedArtifact + + noSmithyDocumentSerde +} + +// Information about CloudWatch Logs for a build project. +type CloudWatchLogsConfig struct { + + // The current status of the logs in CloudWatch Logs for a build project. Valid + // values are: + // + // - ENABLED : CloudWatch Logs are enabled for this build project. + // + // - DISABLED : CloudWatch Logs are not enabled for this build project. + // + // This member is required. + Status LogsConfigStatusType + + // The group name of the logs in CloudWatch Logs. For more information, see [Working with Log Groups and Log Streams]. + // + // [Working with Log Groups and Log Streams]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Working-with-log-groups-and-streams.html + GroupName *string + + // The prefix of the stream name of the CloudWatch Logs. For more information, + // see [Working with Log Groups and Log Streams]. + // + // [Working with Log Groups and Log Streams]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Working-with-log-groups-and-streams.html + StreamName *string + + noSmithyDocumentSerde +} + +// Contains code coverage report information. +// +// Line coverage measures how many statements your tests cover. A statement is a +// single instruction, not including comments, conditionals, etc. +// +// Branch coverage determines if your tests cover every possible branch of a +// control structure, such as an if or case statement. +type CodeCoverage struct { + + // The percentage of branches that are covered by your tests. + BranchCoveragePercentage *float64 + + // The number of conditional branches that are covered by your tests. + BranchesCovered *int32 + + // The number of conditional branches that are not covered by your tests. + BranchesMissed *int32 + + // The date and time that the tests were run. + Expired *time.Time + + // The path of the test report file. + FilePath *string + + // The identifier of the code coverage report. + Id *string + + // The percentage of lines that are covered by your tests. + LineCoveragePercentage *float64 + + // The number of lines that are covered by your tests. + LinesCovered *int32 + + // The number of lines that are not covered by your tests. + LinesMissed *int32 + + // The ARN of the report. + ReportARN *string + + noSmithyDocumentSerde +} + +// Contains a summary of a code coverage report. +// +// Line coverage measures how many statements your tests cover. A statement is a +// single instruction, not including comments, conditionals, etc. +// +// Branch coverage determines if your tests cover every possible branch of a +// control structure, such as an if or case statement. +type CodeCoverageReportSummary struct { + + // The percentage of branches that are covered by your tests. + BranchCoveragePercentage *float64 + + // The number of conditional branches that are covered by your tests. + BranchesCovered *int32 + + // The number of conditional branches that are not covered by your tests. + BranchesMissed *int32 + + // The percentage of lines that are covered by your tests. + LineCoveragePercentage *float64 + + // The number of lines that are covered by your tests. + LinesCovered *int32 + + // The number of lines that are not covered by your tests. + LinesMissed *int32 + + noSmithyDocumentSerde +} + +// Contains command execution information. +type CommandExecution struct { + + // The command that needs to be executed. + Command *string + + // When the command execution process ended, expressed in Unix time format. + EndTime *time.Time + + // The exit code to return upon completion. + ExitCode *string + + // The ID of the command execution. + Id *string + + // Information about build logs in CloudWatch Logs. + Logs *LogsLocation + + // A sandboxArn . + SandboxArn *string + + // A sandboxId . + SandboxId *string + + // The text written by the command to stderr. + StandardErrContent *string + + // The text written by the command to stdout. + StandardOutputContent *string + + // When the command execution process started, expressed in Unix time format. + StartTime *time.Time + + // The status of the command execution. + Status *string + + // When the command execution process was initially submitted, expressed in Unix + // time format. + SubmitTime *time.Time + + // The command type. + Type CommandType + + noSmithyDocumentSerde +} + +// Contains compute attributes. These attributes only need be specified when your +// project's or fleet's computeType is set to ATTRIBUTE_BASED_COMPUTE or +// CUSTOM_INSTANCE_TYPE . +type ComputeConfiguration struct { + + // The amount of disk space of the instance type included in your fleet. + Disk *int64 + + // The EC2 instance type to be launched in your fleet. + InstanceType *string + + // The machine type of the instance type included in your fleet. + MachineType MachineType + + // The amount of memory of the instance type included in your fleet. + Memory *int64 + + // The number of vCPUs of the instance type included in your fleet. + VCpu *int64 + + noSmithyDocumentSerde +} + +// Contains information about the debug session for a build. For more information, +// see [Viewing a running build in Session Manager]. +// +// [Viewing a running build in Session Manager]: https://docs.aws.amazon.com/codebuild/latest/userguide/session-manager.html +type DebugSession struct { + + // Specifies if session debugging is enabled for this build. + SessionEnabled *bool + + // Contains the identifier of the Session Manager session used for the build. To + // work with the paused build, you open this session to examine, control, and + // resume the build. + SessionTarget *string + + noSmithyDocumentSerde +} + +// Contains docker server information. +type DockerServer struct { + + // Information about the compute resources the docker server uses. Available + // values include: + // + // - BUILD_GENERAL1_SMALL : Use up to 4 GiB memory and 2 vCPUs for your docker + // server. + // + // - BUILD_GENERAL1_MEDIUM : Use up to 8 GiB memory and 4 vCPUs for your docker + // server. + // + // - BUILD_GENERAL1_LARGE : Use up to 16 GiB memory and 8 vCPUs for your docker + // server. + // + // - BUILD_GENERAL1_XLARGE : Use up to 64 GiB memory and 32 vCPUs for your docker + // server. + // + // - BUILD_GENERAL1_2XLARGE : Use up to 128 GiB memory and 64 vCPUs for your + // docker server. + // + // This member is required. + ComputeType ComputeType + + // A list of one or more security groups IDs. + // + // Security groups configured for Docker servers should allow ingress network + // traffic from the VPC configured in the project. They should allow ingress on + // port 9876. + SecurityGroupIds []string + + // A DockerServerStatus object to use for this docker server. + Status *DockerServerStatus + + noSmithyDocumentSerde +} + +// Contains information about the status of the docker server. +type DockerServerStatus struct { + + // A message associated with the status of a docker server. + Message *string + + // The status of the docker server. + Status *string + + noSmithyDocumentSerde +} + +// Information about a Docker image that is managed by CodeBuild. +type EnvironmentImage struct { + + // The description of the Docker image. + Description *string + + // The name of the Docker image. + Name *string + + // A list of environment image versions. + Versions []string + + noSmithyDocumentSerde +} + +// A set of Docker images that are related by programming language and are managed +// by CodeBuild. +type EnvironmentLanguage struct { + + // The list of Docker images that are related by the specified programming + // language. + Images []EnvironmentImage + + // The programming language for the Docker images. + Language LanguageType + + noSmithyDocumentSerde +} + +// A set of Docker images that are related by platform and are managed by +// CodeBuild. +type EnvironmentPlatform struct { + + // The list of programming languages that are available for the specified platform. + Languages []EnvironmentLanguage + + // The platform's name. + Platform PlatformType + + noSmithyDocumentSerde +} + +// Information about an environment variable for a build project or a build. +type EnvironmentVariable struct { + + // The name or key of the environment variable. + // + // This member is required. + Name *string + + // The value of the environment variable. + // + // We strongly discourage the use of PLAINTEXT environment variables to store + // sensitive values, especially Amazon Web Services secret key IDs. PLAINTEXT + // environment variables can be displayed in plain text using the CodeBuild console + // and the CLI. For sensitive values, we recommend you use an environment variable + // of type PARAMETER_STORE or SECRETS_MANAGER . + // + // This member is required. + Value *string + + // The type of environment variable. Valid values include: + // + // - PARAMETER_STORE : An environment variable stored in Systems Manager + // Parameter Store. For environment variables of this type, specify the name of the + // parameter as the value of the EnvironmentVariable. The parameter value will be + // substituted for the name at runtime. You can also define Parameter Store + // environment variables in the buildspec. To learn how to do so, see [env/parameter-store]in the + // CodeBuild User Guide. + // + // - PLAINTEXT : An environment variable in plain text format. This is the + // default value. + // + // - SECRETS_MANAGER : An environment variable stored in Secrets Manager. For + // environment variables of this type, specify the name of the secret as the + // value of the EnvironmentVariable. The secret value will be substituted for the + // name at runtime. You can also define Secrets Manager environment variables in + // the buildspec. To learn how to do so, see [env/secrets-manager]in the CodeBuild User Guide. + // + // [env/secrets-manager]: https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#build-spec.env.secrets-manager + // [env/parameter-store]: https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#build-spec.env.parameter-store + Type EnvironmentVariableType + + noSmithyDocumentSerde +} + +// Contains information about an exported environment variable. +// +// Exported environment variables are used in conjunction with CodePipeline to +// export environment variables from the current build stage to subsequent stages +// in the pipeline. For more information, see [Working with variables]in the CodePipeline User Guide. +// +// During a build, the value of a variable is available starting with the install +// phase. It can be updated between the start of the install phase and the end of +// the post_build phase. After the post_build phase ends, the value of exported +// variables cannot change. +// +// [Working with variables]: https://docs.aws.amazon.com/codepipeline/latest/userguide/actions-variables.html +type ExportedEnvironmentVariable struct { + + // The name of the exported environment variable. + Name *string + + // The value assigned to the exported environment variable. + Value *string + + noSmithyDocumentSerde +} + +// A set of dedicated instances for your build environment. +type Fleet struct { + + // The ARN of the compute fleet. + Arn *string + + // The initial number of machines allocated to the compute fleet, which defines the + // number of builds that can run in parallel. + BaseCapacity *int32 + + // The compute configuration of the compute fleet. This is only required if + // computeType is set to ATTRIBUTE_BASED_COMPUTE or CUSTOM_INSTANCE_TYPE . + ComputeConfiguration *ComputeConfiguration + + // Information about the compute resources the compute fleet uses. Available + // values include: + // + // - ATTRIBUTE_BASED_COMPUTE : Specify the amount of vCPUs, memory, disk space, + // and the type of machine. + // + // If you use ATTRIBUTE_BASED_COMPUTE , you must define your attributes by using + // computeConfiguration . CodeBuild will select the cheapest instance that + // satisfies your specified attributes. For more information, see [Reserved capacity environment types]in the + // CodeBuild User Guide. + // + // - CUSTOM_INSTANCE_TYPE : Specify the instance type for your compute fleet. For + // a list of supported instance types, see [Supported instance families]in the CodeBuild User Guide. + // + // - BUILD_GENERAL1_SMALL : Use up to 4 GiB memory and 2 vCPUs for builds. + // + // - BUILD_GENERAL1_MEDIUM : Use up to 8 GiB memory and 4 vCPUs for builds. + // + // - BUILD_GENERAL1_LARGE : Use up to 16 GiB memory and 8 vCPUs for builds, + // depending on your environment type. + // + // - BUILD_GENERAL1_XLARGE : Use up to 72 GiB memory and 36 vCPUs for builds, + // depending on your environment type. + // + // - BUILD_GENERAL1_2XLARGE : Use up to 144 GiB memory, 72 vCPUs, and 824 GB of + // SSD storage for builds. This compute type supports Docker images up to 100 GB + // uncompressed. + // + // - BUILD_LAMBDA_1GB : Use up to 1 GiB memory for builds. Only available for + // environment type LINUX_LAMBDA_CONTAINER and ARM_LAMBDA_CONTAINER . + // + // - BUILD_LAMBDA_2GB : Use up to 2 GiB memory for builds. Only available for + // environment type LINUX_LAMBDA_CONTAINER and ARM_LAMBDA_CONTAINER . + // + // - BUILD_LAMBDA_4GB : Use up to 4 GiB memory for builds. Only available for + // environment type LINUX_LAMBDA_CONTAINER and ARM_LAMBDA_CONTAINER . + // + // - BUILD_LAMBDA_8GB : Use up to 8 GiB memory for builds. Only available for + // environment type LINUX_LAMBDA_CONTAINER and ARM_LAMBDA_CONTAINER . + // + // - BUILD_LAMBDA_10GB : Use up to 10 GiB memory for builds. Only available for + // environment type LINUX_LAMBDA_CONTAINER and ARM_LAMBDA_CONTAINER . + // + // If you use BUILD_GENERAL1_SMALL : + // + // - For environment type LINUX_CONTAINER , you can use up to 4 GiB memory and 2 + // vCPUs for builds. + // + // - For environment type LINUX_GPU_CONTAINER , you can use up to 16 GiB memory, + // 4 vCPUs, and 1 NVIDIA A10G Tensor Core GPU for builds. + // + // - For environment type ARM_CONTAINER , you can use up to 4 GiB memory and 2 + // vCPUs on ARM-based processors for builds. + // + // If you use BUILD_GENERAL1_LARGE : + // + // - For environment type LINUX_CONTAINER , you can use up to 16 GiB memory and 8 + // vCPUs for builds. + // + // - For environment type LINUX_GPU_CONTAINER , you can use up to 255 GiB memory, + // 32 vCPUs, and 4 NVIDIA Tesla V100 GPUs for builds. + // + // - For environment type ARM_CONTAINER , you can use up to 16 GiB memory and 8 + // vCPUs on ARM-based processors for builds. + // + // For more information, see [On-demand environment types] in the CodeBuild User Guide. + // + // [Supported instance families]: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html#environment-reserved-capacity.instance-types + // [Reserved capacity environment types]: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html#environment-reserved-capacity.types + // [On-demand environment types]: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html#environment.types + ComputeType ComputeType + + // The time at which the compute fleet was created. + Created *time.Time + + // The environment type of the compute fleet. + // + // - The environment type ARM_CONTAINER is available only in regions US East (N. + // Virginia), US East (Ohio), US West (Oregon), EU (Ireland), Asia Pacific + // (Mumbai), Asia Pacific (Tokyo), Asia Pacific (Singapore), Asia Pacific (Sydney), + // EU (Frankfurt), and South America (São Paulo). + // + // - The environment type ARM_EC2 is available only in regions US East (N. + // Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia + // Pacific (Tokyo), Asia Pacific (Singapore), Asia Pacific (Sydney), South America + // (São Paulo), and Asia Pacific (Mumbai). + // + // - The environment type LINUX_CONTAINER is available only in regions US East + // (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), + // Asia Pacific (Tokyo), Asia Pacific (Singapore), Asia Pacific (Sydney), South + // America (São Paulo), and Asia Pacific (Mumbai). + // + // - The environment type LINUX_EC2 is available only in regions US East (N. + // Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia + // Pacific (Tokyo), Asia Pacific (Singapore), Asia Pacific (Sydney), South America + // (São Paulo), and Asia Pacific (Mumbai). + // + // - The environment type LINUX_GPU_CONTAINER is available only in regions US + // East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU + // (Frankfurt), Asia Pacific (Tokyo), and Asia Pacific (Sydney). + // + // - The environment type MAC_ARM is available for Medium fleets only in regions + // US East (N. Virginia), US East (Ohio), US West (Oregon), Asia Pacific (Sydney), + // and EU (Frankfurt) + // + // - The environment type MAC_ARM is available for Large fleets only in regions + // US East (N. Virginia), US East (Ohio), US West (Oregon), and Asia Pacific + // (Sydney). + // + // - The environment type WINDOWS_EC2 is available only in regions US East (N. + // Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (Frankfurt), Asia + // Pacific (Tokyo), Asia Pacific (Singapore), Asia Pacific (Sydney), South America + // (São Paulo), and Asia Pacific (Mumbai). + // + // - The environment type WINDOWS_SERVER_2019_CONTAINER is available only in + // regions US East (N. Virginia), US East (Ohio), US West (Oregon), Asia Pacific + // (Sydney), Asia Pacific (Tokyo), Asia Pacific (Mumbai) and EU (Ireland). + // + // - The environment type WINDOWS_SERVER_2022_CONTAINER is available only in + // regions US East (N. Virginia), US East (Ohio), US West (Oregon), EU (Ireland), + // EU (Frankfurt), Asia Pacific (Sydney), Asia Pacific (Singapore), Asia Pacific + // (Tokyo), South America (São Paulo) and Asia Pacific (Mumbai). + // + // For more information, see [Build environment compute types] in the CodeBuild user guide. + // + // [Build environment compute types]: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html + EnvironmentType EnvironmentType + + // The service role associated with the compute fleet. For more information, see [Allow a user to add a permission policy for a fleet service role] + // in the CodeBuild User Guide. + // + // [Allow a user to add a permission policy for a fleet service role]: https://docs.aws.amazon.com/codebuild/latest/userguide/auth-and-access-control-iam-identity-based-access-control.html#customer-managed-policies-example-permission-policy-fleet-service-role.html + FleetServiceRole *string + + // The ID of the compute fleet. + Id *string + + // The Amazon Machine Image (AMI) of the compute fleet. + ImageId *string + + // The time at which the compute fleet was last modified. + LastModified *time.Time + + // The name of the compute fleet. + Name *string + + // The compute fleet overflow behavior. + // + // - For overflow behavior QUEUE , your overflow builds need to wait on the + // existing fleet instance to become available. + // + // - For overflow behavior ON_DEMAND , your overflow builds run on CodeBuild + // on-demand. + // + // If you choose to set your overflow behavior to on-demand while creating a + // VPC-connected fleet, make sure that you add the required VPC permissions to your + // project service role. For more information, see [Example policy statement to allow CodeBuild access to Amazon Web Services services required to create a VPC network interface]. + // + // [Example policy statement to allow CodeBuild access to Amazon Web Services services required to create a VPC network interface]: https://docs.aws.amazon.com/codebuild/latest/userguide/auth-and-access-control-iam-identity-based-access-control.html#customer-managed-policies-example-create-vpc-network-interface + OverflowBehavior FleetOverflowBehavior + + // The proxy configuration of the compute fleet. + ProxyConfiguration *ProxyConfiguration + + // The scaling configuration of the compute fleet. + ScalingConfiguration *ScalingConfigurationOutput + + // The status of the compute fleet. + Status *FleetStatus + + // A list of tag key and value pairs associated with this compute fleet. + // + // These tags are available for use by Amazon Web Services services that support + // CodeBuild build project tags. + Tags []Tag + + // Information about the VPC configuration that CodeBuild accesses. + VpcConfig *VpcConfig + + noSmithyDocumentSerde +} + +// Information about the proxy rule for your reserved capacity instances. +type FleetProxyRule struct { + + // The behavior of the proxy rule. + // + // This member is required. + Effect FleetProxyRuleEffectType + + // The destination of the proxy rule. + // + // This member is required. + Entities []string + + // The type of proxy rule. + // + // This member is required. + Type FleetProxyRuleType + + noSmithyDocumentSerde +} + +// The status of the compute fleet. +type FleetStatus struct { + + // Additional information about a compute fleet. Valid values include: + // + // - CREATE_FAILED : The compute fleet has failed to create. + // + // - UPDATE_FAILED : The compute fleet has failed to update. + Context FleetContextCode + + // A message associated with the status of a compute fleet. + Message *string + + // The status code of the compute fleet. Valid values include: + // + // - CREATING : The compute fleet is being created. + // + // - UPDATING : The compute fleet is being updated. + // + // - ROTATING : The compute fleet is being rotated. + // + // - PENDING_DELETION : The compute fleet is pending deletion. + // + // - DELETING : The compute fleet is being deleted. + // + // - CREATE_FAILED : The compute fleet has failed to create. + // + // - UPDATE_ROLLBACK_FAILED : The compute fleet has failed to update and could + // not rollback to previous state. + // + // - ACTIVE : The compute fleet has succeeded and is active. + StatusCode FleetStatusCode + + noSmithyDocumentSerde +} + +// Information about the Git submodules configuration for an CodeBuild build +// +// project. +type GitSubmodulesConfig struct { + + // Set to true to fetch Git submodules for your CodeBuild build project. + // + // This member is required. + FetchSubmodules *bool + + noSmithyDocumentSerde +} + +// Information about logs for a build project. These can be logs in CloudWatch +// +// Logs, built in a specified S3 bucket, or both. +type LogsConfig struct { + + // Information about CloudWatch Logs for a build project. CloudWatch Logs are + // enabled by default. + CloudWatchLogs *CloudWatchLogsConfig + + // Information about logs built to an S3 bucket for a build project. S3 logs are + // not enabled by default. + S3Logs *S3LogsConfig + + noSmithyDocumentSerde +} + +// Information about build logs in CloudWatch Logs. +type LogsLocation struct { + + // Information about CloudWatch Logs for a build project. + CloudWatchLogs *CloudWatchLogsConfig + + // The ARN of the CloudWatch Logs stream for a build execution. Its format is + // arn:${Partition}:logs:${Region}:${Account}:log-group:${LogGroupName}:log-stream:${LogStreamName} + // . The CloudWatch Logs stream is created during the PROVISIONING phase of a build + // and the ARN will not be valid until it is created. For more information, see [Resources Defined by CloudWatch Logs]. + // + // [Resources Defined by CloudWatch Logs]: https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazoncloudwatchlogs.html#amazoncloudwatchlogs-resources-for-iam-policies + CloudWatchLogsArn *string + + // The URL to an individual build log in CloudWatch Logs. The log stream is + // created during the PROVISIONING phase of a build and the deeplink will not be + // valid until it is created. + DeepLink *string + + // The name of the CloudWatch Logs group for the build logs. + GroupName *string + + // The URL to a build log in an S3 bucket. + S3DeepLink *string + + // Information about S3 logs for a build project. + S3Logs *S3LogsConfig + + // The ARN of S3 logs for a build project. Its format is + // arn:${Partition}:s3:::${BucketName}/${ObjectName} . For more information, see [Resources Defined by Amazon S3]. + // + // [Resources Defined by Amazon S3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazons3.html#amazons3-resources-for-iam-policies + S3LogsArn *string + + // The name of the CloudWatch Logs stream for the build logs. + StreamName *string + + noSmithyDocumentSerde +} + +// Describes a network interface. +type NetworkInterface struct { + + // The ID of the network interface. + NetworkInterfaceId *string + + // The ID of the subnet. + SubnetId *string + + noSmithyDocumentSerde +} + +// Additional information about a build phase that has an error. You can use this +// information for troubleshooting. +type PhaseContext struct { + + // An explanation of the build phase's context. This might include a command ID + // and an exit code. + Message *string + + // The status code for the context of the build phase. + StatusCode *string + + noSmithyDocumentSerde +} + +// Information about a build project. +type Project struct { + + // The Amazon Resource Name (ARN) of the build project. + Arn *string + + // Information about the build output artifacts for the build project. + Artifacts *ProjectArtifacts + + // The maximum number of additional automatic retries after a failed build. For + // example, if the auto-retry limit is set to 2, CodeBuild will call the RetryBuild + // API to automatically retry your build for up to 2 additional times. + AutoRetryLimit *int32 + + // Information about the build badge for the build project. + Badge *ProjectBadge + + // A ProjectBuildBatchConfig object that defines the batch build options for the project. + BuildBatchConfig *ProjectBuildBatchConfig + + // Information about the cache for the build project. + Cache *ProjectCache + + // The maximum number of concurrent builds that are allowed for this project. + // + // New builds are only started if the current number of builds is less than or + // equal to this limit. If the current build count meets this limit, new builds are + // throttled and are not run. + ConcurrentBuildLimit *int32 + + // When the build project was created, expressed in Unix time format. + Created *time.Time + + // A description that makes the build project easy to identify. + Description *string + + // The Key Management Service customer master key (CMK) to be used for encrypting + // the build output artifacts. + // + // You can use a cross-account KMS key to encrypt the build output artifacts if + // your service role has permission to that key. + // + // You can specify either the Amazon Resource Name (ARN) of the CMK or, if + // available, the CMK's alias (using the format alias/ ). If you don't specify a + // value, CodeBuild uses the managed CMK for Amazon Simple Storage Service (Amazon + // S3). + EncryptionKey *string + + // Information about the build environment for this build project. + Environment *ProjectEnvironment + + // An array of ProjectFileSystemLocation objects for a CodeBuild build project. A + // ProjectFileSystemLocation object specifies the identifier , location , + // mountOptions , mountPoint , and type of a file system created using Amazon + // Elastic File System. + FileSystemLocations []ProjectFileSystemLocation + + // When the build project's settings were last modified, expressed in Unix time + // format. + LastModified *time.Time + + // Information about logs for the build project. A project can create logs in + // CloudWatch Logs, an S3 bucket, or both. + LogsConfig *LogsConfig + + // The name of the build project. + Name *string + + // Specifies the visibility of the project's builds. Possible values are: + // + // PUBLIC_READ The project builds are visible to the public. + // + // PRIVATE The project builds are not visible to the public. + ProjectVisibility ProjectVisibilityType + + // Contains the project identifier used with the public build APIs. + PublicProjectAlias *string + + // The number of minutes a build is allowed to be queued before it times out. + QueuedTimeoutInMinutes *int32 + + // The ARN of the IAM role that enables CodeBuild to access the CloudWatch Logs + // and Amazon S3 artifacts for the project's builds. + ResourceAccessRole *string + + // An array of ProjectArtifacts objects. + SecondaryArtifacts []ProjectArtifacts + + // An array of ProjectSourceVersion objects. If secondarySourceVersions is + // specified at the build level, then they take over these secondarySourceVersions + // (at the project level). + SecondarySourceVersions []ProjectSourceVersion + + // An array of ProjectSource objects. + SecondarySources []ProjectSource + + // The ARN of the IAM role that enables CodeBuild to interact with dependent + // Amazon Web Services services on behalf of the Amazon Web Services account. + ServiceRole *string + + // Information about the build input source code for this build project. + Source *ProjectSource + + // A version of the build input to be built for this project. If not specified, + // the latest version is used. If specified, it must be one of: + // + // - For CodeCommit: the commit ID, branch, or Git tag to use. + // + // - For GitHub: the commit ID, pull request ID, branch name, or tag name that + // corresponds to the version of the source code you want to build. If a pull + // request ID is specified, it must use the format pr/pull-request-ID (for + // example pr/25 ). If a branch name is specified, the branch's HEAD commit ID is + // used. If not specified, the default branch's HEAD commit ID is used. + // + // - For GitLab: the commit ID, branch, or Git tag to use. + // + // - For Bitbucket: the commit ID, branch name, or tag name that corresponds to + // the version of the source code you want to build. If a branch name is specified, + // the branch's HEAD commit ID is used. If not specified, the default branch's HEAD + // commit ID is used. + // + // - For Amazon S3: the version ID of the object that represents the build input + // ZIP file to use. + // + // If sourceVersion is specified at the build level, then that version takes + // precedence over this sourceVersion (at the project level). + // + // For more information, see [Source Version Sample with CodeBuild] in the CodeBuild User Guide. + // + // [Source Version Sample with CodeBuild]: https://docs.aws.amazon.com/codebuild/latest/userguide/sample-source-version.html + SourceVersion *string + + // A list of tag key and value pairs associated with this build project. + // + // These tags are available for use by Amazon Web Services services that support + // CodeBuild build project tags. + Tags []Tag + + // How long, in minutes, from 5 to 2160 (36 hours), for CodeBuild to wait before + // timing out any related build that did not get marked as completed. The default + // is 60 minutes. + TimeoutInMinutes *int32 + + // Information about the VPC configuration that CodeBuild accesses. + VpcConfig *VpcConfig + + // Information about a webhook that connects repository events to a build project + // in CodeBuild. + Webhook *Webhook + + noSmithyDocumentSerde +} + +// Information about the build output artifacts for the build project. +type ProjectArtifacts struct { + + // The type of build output artifact. Valid values include: + // + // - CODEPIPELINE : The build project has build output generated through + // CodePipeline. + // + // The CODEPIPELINE type is not supported for secondaryArtifacts . + // + // - NO_ARTIFACTS : The build project does not produce any build output. + // + // - S3 : The build project stores build output in Amazon S3. + // + // This member is required. + Type ArtifactsType + + // An identifier for this artifact definition. + ArtifactIdentifier *string + + // Specifies the bucket owner's access for objects that another account uploads to + // their Amazon S3 bucket. By default, only the account that uploads the objects to + // the bucket has access to these objects. This property allows you to give the + // bucket owner access to these objects. + // + // To use this property, your CodeBuild service role must have the s3:PutBucketAcl + // permission. This permission allows CodeBuild to modify the access control list + // for the bucket. + // + // This property can be one of the following values: + // + // NONE The bucket owner does not have access to the objects. This is the default. + // + // READ_ONLY The bucket owner has read-only access to the objects. The uploading + // account retains ownership of the objects. + // + // FULL The bucket owner has full access to the objects. Object ownership is + // determined by the following criteria: + // + // - If the bucket is configured with the Bucket owner preferred setting, the + // bucket owner owns the objects. The uploading account will have object access as + // specified by the bucket's policy. + // + // - Otherwise, the uploading account retains ownership of the objects. + // + // For more information about Amazon S3 object ownership, see [Controlling ownership of uploaded objects using S3 Object Ownership] in the Amazon + // Simple Storage Service User Guide. + // + // [Controlling ownership of uploaded objects using S3 Object Ownership]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html + BucketOwnerAccess BucketOwnerAccess + + // Set to true if you do not want your output artifacts encrypted. This option is + // valid only if your artifacts type is Amazon S3. If this is set with another + // artifacts type, an invalidInputException is thrown. + EncryptionDisabled *bool + + // Information about the build output artifact location: + // + // - If type is set to CODEPIPELINE , CodePipeline ignores this value if + // specified. This is because CodePipeline manages its build output locations + // instead of CodeBuild. + // + // - If type is set to NO_ARTIFACTS , this value is ignored if specified, because + // no build output is produced. + // + // - If type is set to S3 , this is the name of the output bucket. + Location *string + + // Along with path and namespaceType , the pattern that CodeBuild uses to name and + // store the output artifact: + // + // - If type is set to CODEPIPELINE , CodePipeline ignores this value if + // specified. This is because CodePipeline manages its build output names instead + // of CodeBuild. + // + // - If type is set to NO_ARTIFACTS , this value is ignored if specified, because + // no build output is produced. + // + // - If type is set to S3 , this is the name of the output artifact object. If + // you set the name to be a forward slash ("/"), the artifact is stored in the root + // of the output bucket. + // + // For example: + // + // - If path is set to MyArtifacts , namespaceType is set to BUILD_ID , and name + // is set to MyArtifact.zip , then the output artifact is stored in + // MyArtifacts//MyArtifact.zip . + // + // - If path is empty, namespaceType is set to NONE , and name is set to " / ", + // the output artifact is stored in the root of the output bucket. + // + // - If path is set to MyArtifacts , namespaceType is set to BUILD_ID , and name + // is set to " / ", the output artifact is stored in MyArtifacts/ . + Name *string + + // Along with path and name , the pattern that CodeBuild uses to determine the name + // and location to store the output artifact: + // + // - If type is set to CODEPIPELINE , CodePipeline ignores this value if + // specified. This is because CodePipeline manages its build output names instead + // of CodeBuild. + // + // - If type is set to NO_ARTIFACTS , this value is ignored if specified, because + // no build output is produced. + // + // - If type is set to S3 , valid values include: + // + // - BUILD_ID : Include the build ID in the location of the build output artifact. + // + // - NONE : Do not include the build ID. This is the default if namespaceType is + // not specified. + // + // For example, if path is set to MyArtifacts , namespaceType is set to BUILD_ID , + // and name is set to MyArtifact.zip , the output artifact is stored in + // MyArtifacts//MyArtifact.zip . + NamespaceType ArtifactNamespace + + // If this flag is set, a name specified in the buildspec file overrides the + // artifact name. The name specified in a buildspec file is calculated at build + // time and uses the Shell Command Language. For example, you can append a date and + // time to your artifact name so that it is always unique. + OverrideArtifactName *bool + + // The type of build output artifact to create: + // + // - If type is set to CODEPIPELINE , CodePipeline ignores this value if + // specified. This is because CodePipeline manages its build output artifacts + // instead of CodeBuild. + // + // - If type is set to NO_ARTIFACTS , this value is ignored if specified, because + // no build output is produced. + // + // - If type is set to S3 , valid values include: + // + // - NONE : CodeBuild creates in the output bucket a folder that contains the + // build output. This is the default if packaging is not specified. + // + // - ZIP : CodeBuild creates in the output bucket a ZIP file that contains the + // build output. + Packaging ArtifactPackaging + + // Along with namespaceType and name , the pattern that CodeBuild uses to name and + // store the output artifact: + // + // - If type is set to CODEPIPELINE , CodePipeline ignores this value if + // specified. This is because CodePipeline manages its build output names instead + // of CodeBuild. + // + // - If type is set to NO_ARTIFACTS , this value is ignored if specified, because + // no build output is produced. + // + // - If type is set to S3 , this is the path to the output artifact. If path is + // not specified, path is not used. + // + // For example, if path is set to MyArtifacts , namespaceType is set to NONE , and + // name is set to MyArtifact.zip , the output artifact is stored in the output + // bucket at MyArtifacts/MyArtifact.zip . + Path *string + + noSmithyDocumentSerde +} + +// Information about the build badge for the build project. +type ProjectBadge struct { + + // Set this to true to generate a publicly accessible URL for your project's build + // badge. + BadgeEnabled bool + + // The publicly-accessible URL through which you can access the build badge for + // your project. + BadgeRequestUrl *string + + noSmithyDocumentSerde +} + +// Contains configuration information about a batch build project. +type ProjectBuildBatchConfig struct { + + // Specifies how build status reports are sent to the source provider for the + // batch build. This property is only used when the source provider for your + // project is Bitbucket, GitHub, or GitHub Enterprise, and your project is + // configured to report build statuses to the source provider. + // + // REPORT_AGGREGATED_BATCH (Default) Aggregate all of the build statuses into a + // single status report. + // + // REPORT_INDIVIDUAL_BUILDS Send a separate status report for each individual + // build. + BatchReportMode BatchReportModeType + + // Specifies if the build artifacts for the batch build should be combined into a + // single artifact location. + CombineArtifacts *bool + + // A BatchRestrictions object that specifies the restrictions for the batch build. + Restrictions *BatchRestrictions + + // Specifies the service role ARN for the batch build project. + ServiceRole *string + + // Specifies the maximum amount of time, in minutes, that the batch build must be + // completed in. + TimeoutInMins *int32 + + noSmithyDocumentSerde +} + +// Information about the cache for the build project. +type ProjectCache struct { + + // The type of cache used by the build project. Valid values include: + // + // - NO_CACHE : The build project does not use any cache. + // + // - S3 : The build project reads and writes from and to S3. + // + // - LOCAL : The build project stores a cache locally on a build host that is + // only available to that build host. + // + // This member is required. + Type CacheType + + // Defines the scope of the cache. You can use this namespace to share a cache + // across multiple projects. For more information, see [Cache sharing between projects]in the CodeBuild User Guide. + // + // [Cache sharing between projects]: https://docs.aws.amazon.com/codebuild/latest/userguide/caching-s3.html#caching-s3-sharing + CacheNamespace *string + + // Information about the cache location: + // + // - NO_CACHE or LOCAL : This value is ignored. + // + // - S3 : This is the S3 bucket name/prefix. + Location *string + + // An array of strings that specify the local cache modes. You can use one or more + // local cache modes at the same time. This is only used for LOCAL cache types. + // + // Possible values are: + // + // LOCAL_SOURCE_CACHE Caches Git metadata for primary and secondary sources. After + // the cache is created, subsequent builds pull only the change between commits. + // This mode is a good choice for projects with a clean working directory and a + // source that is a large Git repository. If you choose this option and your + // project does not use a Git repository (GitHub, GitHub Enterprise, or Bitbucket), + // the option is ignored. + // + // LOCAL_DOCKER_LAYER_CACHE Caches existing Docker layers. This mode is a good + // choice for projects that build or pull large Docker images. It can prevent the + // performance issues caused by pulling large Docker images down from the network. + // + // - You can use a Docker layer cache in the Linux environment only. + // + // - The privileged flag must be set so that your project has the required Docker + // permissions. + // + // - You should consider the security implications before you use a Docker layer + // cache. + // + // LOCAL_CUSTOM_CACHE Caches directories you specify in the buildspec file. This + // mode is a good choice if your build scenario is not suited to one of the other + // three local cache modes. If you use a custom cache: + // + // - Only directories can be specified for caching. You cannot specify + // individual files. + // + // - Symlinks are used to reference cached directories. + // + // - Cached directories are linked to your build before it downloads its project + // sources. Cached items are overridden if a source item has the same name. + // Directories are specified using cache paths in the buildspec file. + Modes []CacheMode + + noSmithyDocumentSerde +} + +// Information about the build environment of the build project. +type ProjectEnvironment struct { + + // Information about the compute resources the build project uses. Available + // values include: + // + // - ATTRIBUTE_BASED_COMPUTE : Specify the amount of vCPUs, memory, disk space, + // and the type of machine. + // + // If you use ATTRIBUTE_BASED_COMPUTE , you must define your attributes by using + // computeConfiguration . CodeBuild will select the cheapest instance that + // satisfies your specified attributes. For more information, see [Reserved capacity environment types]in the + // CodeBuild User Guide. + // + // - BUILD_GENERAL1_SMALL : Use up to 4 GiB memory and 2 vCPUs for builds. + // + // - BUILD_GENERAL1_MEDIUM : Use up to 8 GiB memory and 4 vCPUs for builds. + // + // - BUILD_GENERAL1_LARGE : Use up to 16 GiB memory and 8 vCPUs for builds, + // depending on your environment type. + // + // - BUILD_GENERAL1_XLARGE : Use up to 72 GiB memory and 36 vCPUs for builds, + // depending on your environment type. + // + // - BUILD_GENERAL1_2XLARGE : Use up to 144 GiB memory, 72 vCPUs, and 824 GB of + // SSD storage for builds. This compute type supports Docker images up to 100 GB + // uncompressed. + // + // - BUILD_LAMBDA_1GB : Use up to 1 GiB memory for builds. Only available for + // environment type LINUX_LAMBDA_CONTAINER and ARM_LAMBDA_CONTAINER . + // + // - BUILD_LAMBDA_2GB : Use up to 2 GiB memory for builds. Only available for + // environment type LINUX_LAMBDA_CONTAINER and ARM_LAMBDA_CONTAINER . + // + // - BUILD_LAMBDA_4GB : Use up to 4 GiB memory for builds. Only available for + // environment type LINUX_LAMBDA_CONTAINER and ARM_LAMBDA_CONTAINER . + // + // - BUILD_LAMBDA_8GB : Use up to 8 GiB memory for builds. Only available for + // environment type LINUX_LAMBDA_CONTAINER and ARM_LAMBDA_CONTAINER . + // + // - BUILD_LAMBDA_10GB : Use up to 10 GiB memory for builds. Only available for + // environment type LINUX_LAMBDA_CONTAINER and ARM_LAMBDA_CONTAINER . + // + // If you use BUILD_GENERAL1_SMALL : + // + // - For environment type LINUX_CONTAINER , you can use up to 4 GiB memory and 2 + // vCPUs for builds. + // + // - For environment type LINUX_GPU_CONTAINER , you can use up to 16 GiB memory, + // 4 vCPUs, and 1 NVIDIA A10G Tensor Core GPU for builds. + // + // - For environment type ARM_CONTAINER , you can use up to 4 GiB memory and 2 + // vCPUs on ARM-based processors for builds. + // + // If you use BUILD_GENERAL1_LARGE : + // + // - For environment type LINUX_CONTAINER , you can use up to 16 GiB memory and 8 + // vCPUs for builds. + // + // - For environment type LINUX_GPU_CONTAINER , you can use up to 255 GiB memory, + // 32 vCPUs, and 4 NVIDIA Tesla V100 GPUs for builds. + // + // - For environment type ARM_CONTAINER , you can use up to 16 GiB memory and 8 + // vCPUs on ARM-based processors for builds. + // + // For more information, see [On-demand environment types] in the CodeBuild User Guide. + // + // [Reserved capacity environment types]: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html#environment-reserved-capacity.types + // [On-demand environment types]: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html#environment.types + // + // This member is required. + ComputeType ComputeType + + // The image tag or image digest that identifies the Docker image to use for this + // build project. Use the following formats: + // + // - For an image tag: /: . For example, in the Docker repository that CodeBuild + // uses to manage its Docker images, this would be aws/codebuild/standard:4.0 . + // + // - For an image digest: /@ . For example, to specify an image with the digest + // "sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf," use + // /@sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf . + // + // For more information, see [Docker images provided by CodeBuild] in the CodeBuild user guide. + // + // [Docker images provided by CodeBuild]: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html + // + // This member is required. + Image *string + + // The type of build environment to use for related builds. + // + // If you're using compute fleets during project creation, type will be ignored. + // + // For more information, see [Build environment compute types] in the CodeBuild user guide. + // + // [Build environment compute types]: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html + // + // This member is required. + Type EnvironmentType + + // The ARN of the Amazon S3 bucket, path prefix, and object key that contains the + // PEM-encoded certificate for the build project. For more information, see [certificate]in the + // CodeBuild User Guide. + // + // [certificate]: https://docs.aws.amazon.com/codebuild/latest/userguide/create-project-cli.html#cli.environment.certificate + Certificate *string + + // The compute configuration of the build project. This is only required if + // computeType is set to ATTRIBUTE_BASED_COMPUTE . + ComputeConfiguration *ComputeConfiguration + + // A DockerServer object to use for this build project. + DockerServer *DockerServer + + // A set of environment variables to make available to builds for this build + // project. + EnvironmentVariables []EnvironmentVariable + + // A ProjectFleet object to use for this build project. + Fleet *ProjectFleet + + // The type of credentials CodeBuild uses to pull images in your build. There are + // two valid values: + // + // - CODEBUILD specifies that CodeBuild uses its own credentials. This requires + // that you modify your ECR repository policy to trust CodeBuild service principal. + // + // - SERVICE_ROLE specifies that CodeBuild uses your build project's service + // role. + // + // When you use a cross-account or private registry image, you must use + // SERVICE_ROLE credentials. When you use an CodeBuild curated image, you must use + // CODEBUILD credentials. + ImagePullCredentialsType ImagePullCredentialsType + + // Enables running the Docker daemon inside a Docker container. Set to true only + // if the build project is used to build Docker images. Otherwise, a build that + // attempts to interact with the Docker daemon fails. The default setting is false . + // + // You can initialize the Docker daemon during the install phase of your build by + // adding one of the following sets of commands to the install phase of your + // buildspec file: + // + // If the operating system's base image is Ubuntu Linux: + // + // - nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock + // --host=tcp://0.0.0.0:2375 --storage-driver=overlay& + // + // - timeout 15 sh -c "until docker info; do echo .; sleep 1; done" + // + // If the operating system's base image is Alpine Linux and the previous command + // does not work, add the -t argument to timeout : + // + // - nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock + // --host=tcp://0.0.0.0:2375 --storage-driver=overlay& + // + // - timeout -t 15 sh -c "until docker info; do echo .; sleep 1; done" + PrivilegedMode *bool + + // The credentials for access to a private registry. + RegistryCredential *RegistryCredential + + noSmithyDocumentSerde +} + +// Information about a file system created by Amazon Elastic File System (EFS). +// +// For more information, see [What Is Amazon Elastic File System?] +// +// [What Is Amazon Elastic File System?]: https://docs.aws.amazon.com/efs/latest/ug/whatisefs.html +type ProjectFileSystemLocation struct { + + // The name used to access a file system created by Amazon EFS. CodeBuild creates + // an environment variable by appending the identifier in all capital letters to + // CODEBUILD_ . For example, if you specify my_efs for identifier , a new + // environment variable is create named CODEBUILD_MY_EFS . + // + // The identifier is used to mount your file system. + Identifier *string + + // A string that specifies the location of the file system created by Amazon EFS. + // Its format is efs-dns-name:/directory-path . You can find the DNS name of file + // system when you view it in the Amazon EFS console. The directory path is a path + // to a directory in the file system that CodeBuild mounts. For example, if the DNS + // name of a file system is fs-abcd1234.efs.us-west-2.amazonaws.com , and its mount + // directory is my-efs-mount-directory , then the location is + // fs-abcd1234.efs.us-west-2.amazonaws.com:/my-efs-mount-directory . + // + // The directory path in the format efs-dns-name:/directory-path is optional. If + // you do not specify a directory path, the location is only the DNS name and + // CodeBuild mounts the entire file system. + Location *string + + // The mount options for a file system created by Amazon EFS. The default mount + // options used by CodeBuild are + // nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2 . For more + // information, see [Recommended NFS Mount Options]. + // + // [Recommended NFS Mount Options]: https://docs.aws.amazon.com/efs/latest/ug/mounting-fs-nfs-mount-settings.html + MountOptions *string + + // The location in the container where you mount the file system. + MountPoint *string + + // The type of the file system. The one supported type is EFS . + Type FileSystemType + + noSmithyDocumentSerde +} + +// Information about the compute fleet of the build project. For more information, +// see [Working with reserved capacity in CodeBuild]. +// +// [Working with reserved capacity in CodeBuild]: https://docs.aws.amazon.com/codebuild/latest/userguide/fleets.html +type ProjectFleet struct { + + // Specifies the compute fleet ARN for the build project. + FleetArn *string + + noSmithyDocumentSerde +} + +// Information about the build input source code for the build project. +type ProjectSource struct { + + // The type of repository that contains the source code to be built. Valid values + // include: + // + // - BITBUCKET : The source code is in a Bitbucket repository. + // + // - CODECOMMIT : The source code is in an CodeCommit repository. + // + // - CODEPIPELINE : The source code settings are specified in the source action + // of a pipeline in CodePipeline. + // + // - GITHUB : The source code is in a GitHub repository. + // + // - GITHUB_ENTERPRISE : The source code is in a GitHub Enterprise Server + // repository. + // + // - GITLAB : The source code is in a GitLab repository. + // + // - GITLAB_SELF_MANAGED : The source code is in a self-managed GitLab repository. + // + // - NO_SOURCE : The project does not have input source code. + // + // - S3 : The source code is in an Amazon S3 bucket. + // + // This member is required. + Type SourceType + + // Information about the authorization settings for CodeBuild to access the source + // code to be built. + Auth *SourceAuth + + // Contains information that defines how the build project reports the build + // status to the source provider. This option is only used when the source provider + // is GITHUB , GITHUB_ENTERPRISE , or BITBUCKET . + BuildStatusConfig *BuildStatusConfig + + // The buildspec file declaration to use for the builds in this build project. + // + // If this value is set, it can be either an inline buildspec definition, the path + // to an alternate buildspec file relative to the value of the built-in + // CODEBUILD_SRC_DIR environment variable, or the path to an S3 bucket. The bucket + // must be in the same Amazon Web Services Region as the build project. Specify the + // buildspec file using its ARN (for example, + // arn:aws:s3:::my-codebuild-sample2/buildspec.yml ). If this value is not provided + // or is set to an empty string, the source code must contain a buildspec file in + // its root directory. For more information, see [Buildspec File Name and Storage Location]. + // + // [Buildspec File Name and Storage Location]: https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#build-spec-ref-name-storage + Buildspec *string + + // Information about the Git clone depth for the build project. + GitCloneDepth *int32 + + // Information about the Git submodules configuration for the build project. + GitSubmodulesConfig *GitSubmodulesConfig + + // Enable this flag to ignore SSL warnings while connecting to the project source + // code. + InsecureSsl *bool + + // Information about the location of the source code to be built. Valid values + // include: + // + // - For source code settings that are specified in the source action of a + // pipeline in CodePipeline, location should not be specified. If it is + // specified, CodePipeline ignores it. This is because CodePipeline uses the + // settings in a pipeline's source action instead of this value. + // + // - For source code in an CodeCommit repository, the HTTPS clone URL to the + // repository that contains the source code and the buildspec file (for example, + // https://git-codecommit..amazonaws.com/v1/repos/ ). + // + // - For source code in an Amazon S3 input bucket, one of the following. + // + // - The path to the ZIP file that contains the source code (for example, //.zip + // ). + // + // - The path to the folder that contains the source code (for example, /// ). + // + // - For source code in a GitHub repository, the HTTPS clone URL to the + // repository that contains the source and the buildspec file. You must connect + // your Amazon Web Services account to your GitHub account. Use the CodeBuild + // console to start creating a build project. When you use the console to connect + // (or reconnect) with GitHub, on the GitHub Authorize application page, for + // Organization access, choose Request access next to each repository you want to + // allow CodeBuild to have access to, and then choose Authorize application. (After + // you have connected to your GitHub account, you do not need to finish creating + // the build project. You can leave the CodeBuild console.) To instruct CodeBuild + // to use this connection, in the source object, set the auth object's type value + // to OAUTH . + // + // - For source code in an GitLab or self-managed GitLab repository, the HTTPS + // clone URL to the repository that contains the source and the buildspec file. You + // must connect your Amazon Web Services account to your GitLab account. Use the + // CodeBuild console to start creating a build project. When you use the console to + // connect (or reconnect) with GitLab, on the Connections Authorize application + // page, choose Authorize. Then on the CodeConnections Create GitLab connection + // page, choose Connect to GitLab. (After you have connected to your GitLab + // account, you do not need to finish creating the build project. You can leave the + // CodeBuild console.) To instruct CodeBuild to override the default connection and + // use this connection instead, set the auth object's type value to + // CODECONNECTIONS in the source object. + // + // - For source code in a Bitbucket repository, the HTTPS clone URL to the + // repository that contains the source and the buildspec file. You must connect + // your Amazon Web Services account to your Bitbucket account. Use the CodeBuild + // console to start creating a build project. When you use the console to connect + // (or reconnect) with Bitbucket, on the Bitbucket Confirm access to your account + // page, choose Grant access. (After you have connected to your Bitbucket account, + // you do not need to finish creating the build project. You can leave the + // CodeBuild console.) To instruct CodeBuild to use this connection, in the + // source object, set the auth object's type value to OAUTH . + // + // If you specify CODEPIPELINE for the Type property, don't specify this property. + // For all of the other types, you must specify Location . + Location *string + + // Set to true to report the status of a build's start and finish to your source + // provider. This option is valid only when your source provider is GitHub, GitHub + // Enterprise, GitLab, GitLab Self Managed, GitLab, GitLab Self Managed, or + // Bitbucket. If this is set and you use a different source provider, an + // invalidInputException is thrown. + // + // To be able to report the build status to the source provider, the user + // associated with the source provider must have write access to the repo. If the + // user does not have write access, the build status cannot be updated. For more + // information, see [Source provider access]in the CodeBuild User Guide. + // + // The status of a build triggered by a webhook is always reported to your source + // provider. + // + // If your project's builds are triggered by a webhook, you must push a new commit + // to the repo for a change to this property to take effect. + // + // [Source provider access]: https://docs.aws.amazon.com/codebuild/latest/userguide/access-tokens.html + ReportBuildStatus *bool + + // An identifier for this project source. The identifier can only contain + // alphanumeric characters and underscores, and must be less than 128 characters in + // length. + SourceIdentifier *string + + noSmithyDocumentSerde +} + +// A source identifier and its corresponding version. +type ProjectSourceVersion struct { + + // An identifier for a source in the build project. The identifier can only + // contain alphanumeric characters and underscores, and must be less than 128 + // characters in length. + // + // This member is required. + SourceIdentifier *string + + // The source version for the corresponding source identifier. If specified, must + // be one of: + // + // - For CodeCommit: the commit ID, branch, or Git tag to use. + // + // - For GitHub: the commit ID, pull request ID, branch name, or tag name that + // corresponds to the version of the source code you want to build. If a pull + // request ID is specified, it must use the format pr/pull-request-ID (for + // example, pr/25 ). If a branch name is specified, the branch's HEAD commit ID + // is used. If not specified, the default branch's HEAD commit ID is used. + // + // - For GitLab: the commit ID, branch, or Git tag to use. + // + // - For Bitbucket: the commit ID, branch name, or tag name that corresponds to + // the version of the source code you want to build. If a branch name is specified, + // the branch's HEAD commit ID is used. If not specified, the default branch's HEAD + // commit ID is used. + // + // - For Amazon S3: the version ID of the object that represents the build input + // ZIP file to use. + // + // For more information, see [Source Version Sample with CodeBuild] in the CodeBuild User Guide. + // + // [Source Version Sample with CodeBuild]: https://docs.aws.amazon.com/codebuild/latest/userguide/sample-source-version.html + // + // This member is required. + SourceVersion *string + + noSmithyDocumentSerde +} + +// Information about the proxy configurations that apply network access control to +// your reserved capacity instances. +type ProxyConfiguration struct { + + // The default behavior of outgoing traffic. + DefaultBehavior FleetProxyRuleBehavior + + // An array of FleetProxyRule objects that represent the specified destination + // domains or IPs to allow or deny network access control to. + OrderedProxyRules []FleetProxyRule + + noSmithyDocumentSerde +} + +// A PullRequestBuildPolicy object that defines comment-based approval +// requirements for triggering builds on pull requests. This policy helps control +// when automated builds are executed based on contributor permissions and approval +// workflows. +type PullRequestBuildPolicy struct { + + // Specifies when comment-based approval is required before triggering a build on + // pull requests. This setting determines whether builds run automatically or + // require explicit approval through comments. + // + // - DISABLED: Builds trigger automatically without requiring comment approval + // + // - ALL_PULL_REQUESTS: All pull requests require comment approval before builds + // execute (unless contributor is one of the approver roles) + // + // - FORK_PULL_REQUESTS: Only pull requests from forked repositories require + // comment approval (unless contributor is one of the approver roles) + // + // This member is required. + RequiresCommentApproval PullRequestBuildCommentApproval + + // List of repository roles that have approval privileges for pull request builds + // when comment approval is required. Only users with these roles can provide valid + // comment approvals. If a pull request contributor is one of these roles, their + // pull request builds will trigger automatically. This field is only applicable + // when requiresCommentApproval is not DISABLED. + ApproverRoles []PullRequestBuildApproverRole + + noSmithyDocumentSerde +} + +// Information about credentials that provide access to a private Docker +// +// registry. When this is set: +// +// - imagePullCredentialsType must be set to SERVICE_ROLE . +// +// - images cannot be curated or an Amazon ECR image. +// +// For more information, see [Private Registry with Secrets Manager Sample for CodeBuild]. +// +// [Private Registry with Secrets Manager Sample for CodeBuild]: https://docs.aws.amazon.com/codebuild/latest/userguide/sample-private-registry.html +type RegistryCredential struct { + + // The Amazon Resource Name (ARN) or name of credentials created using Secrets + // Manager. + // + // The credential can use the name of the credentials only if they exist in your + // current Amazon Web Services Region. + // + // This member is required. + Credential *string + + // The service that created the credentials to access a private Docker registry. + // The valid value, SECRETS_MANAGER, is for Secrets Manager. + // + // This member is required. + CredentialProvider CredentialProviderType + + noSmithyDocumentSerde +} + +// Information about the results from running a series of test cases during the +// run of a build project. The test cases are specified in the buildspec for the +// build project using one or more paths to the test case files. You can specify +// any type of tests you want, such as unit tests, integration tests, and +// functional tests. +type Report struct { + + // The ARN of the report run. + Arn *string + + // A CodeCoverageReportSummary object that contains a code coverage summary for + // this report. + CodeCoverageSummary *CodeCoverageReportSummary + + // The date and time this report run occurred. + Created *time.Time + + // The ARN of the build run that generated this report. + ExecutionId *string + + // The date and time a report expires. A report expires 30 days after it is + // created. An expired report is not available to view in CodeBuild. + Expired *time.Time + + // Information about where the raw data used to generate this report was + // exported. + ExportConfig *ReportExportConfig + + // The name of the report that was run. + Name *string + + // The ARN of the report group associated with this report. + ReportGroupArn *string + + // The status of this report. + Status ReportStatusType + + // A TestReportSummary object that contains information about this test report. + TestSummary *TestReportSummary + + // A boolean that specifies if this report run is truncated. The list of test + // cases is truncated after the maximum number of test cases is reached. + Truncated *bool + + // The type of the report that was run. + // + // CODE_COVERAGE A code coverage report. + // + // TEST A test report. + Type ReportType + + noSmithyDocumentSerde +} + +// Information about the location where the run of a report is exported. +type ReportExportConfig struct { + + // The export configuration type. Valid values are: + // + // - S3 : The report results are exported to an S3 bucket. + // + // - NO_EXPORT : The report results are not exported. + ExportConfigType ReportExportConfigType + + // A S3ReportExportConfig object that contains information about the S3 bucket + // where the run of a report is exported. + S3Destination *S3ReportExportConfig + + noSmithyDocumentSerde +} + +// A filter used to return reports with the status specified by the input status +// +// parameter. +type ReportFilter struct { + + // The status used to filter reports. You can filter using one status only. + Status ReportStatusType + + noSmithyDocumentSerde +} + +// A series of reports. Each report contains information about the results from +// running a series of test cases. You specify the test cases for a report group in +// the buildspec for a build project using one or more paths to the test case +// files. +type ReportGroup struct { + + // The ARN of the ReportGroup . + Arn *string + + // The date and time this ReportGroup was created. + Created *time.Time + + // Information about the destination where the raw data of this ReportGroup is + // exported. + ExportConfig *ReportExportConfig + + // The date and time this ReportGroup was last modified. + LastModified *time.Time + + // The name of the ReportGroup . + Name *string + + // The status of the report group. This property is read-only. + // + // This can be one of the following values: + // + // ACTIVE The report group is active. + // + // DELETING The report group is in the process of being deleted. + Status ReportGroupStatusType + + // A list of tag key and value pairs associated with this report group. + // + // These tags are available for use by Amazon Web Services services that support + // CodeBuild report group tags. + Tags []Tag + + // The type of the ReportGroup . This can be one of the following values: + // + // CODE_COVERAGE The report group contains code coverage reports. + // + // TEST The report group contains test reports. + Type ReportType + + noSmithyDocumentSerde +} + +// Contains trend statistics for a set of reports. The actual values depend on the +// type of trend being collected. For more information, see . +type ReportGroupTrendStats struct { + + // Contains the average of all values analyzed. + Average *string + + // Contains the maximum value analyzed. + Max *string + + // Contains the minimum value analyzed. + Min *string + + noSmithyDocumentSerde +} + +// Contains the unmodified data for the report. For more information, see . +type ReportWithRawData struct { + + // The value of the requested data field from the report. + Data *string + + // The ARN of the report. + ReportArn *string + + noSmithyDocumentSerde +} + +// Represents a resolved build artifact. A resolved artifact is an artifact that +// is built and deployed to the destination, such as Amazon S3. +type ResolvedArtifact struct { + + // The identifier of the artifact. + Identifier *string + + // The location of the artifact. + Location *string + + // Specifies the type of artifact. + Type ArtifactsType + + noSmithyDocumentSerde +} + +// Information about S3 logs for a build project. +type S3LogsConfig struct { + + // The current status of the S3 build logs. Valid values are: + // + // - ENABLED : S3 build logs are enabled for this build project. + // + // - DISABLED : S3 build logs are not enabled for this build project. + // + // This member is required. + Status LogsConfigStatusType + + // Specifies the bucket owner's access for objects that another account uploads to + // their Amazon S3 bucket. By default, only the account that uploads the objects to + // the bucket has access to these objects. This property allows you to give the + // bucket owner access to these objects. + // + // To use this property, your CodeBuild service role must have the s3:PutBucketAcl + // permission. This permission allows CodeBuild to modify the access control list + // for the bucket. + // + // This property can be one of the following values: + // + // NONE The bucket owner does not have access to the objects. This is the default. + // + // READ_ONLY The bucket owner has read-only access to the objects. The uploading + // account retains ownership of the objects. + // + // FULL The bucket owner has full access to the objects. Object ownership is + // determined by the following criteria: + // + // - If the bucket is configured with the Bucket owner preferred setting, the + // bucket owner owns the objects. The uploading account will have object access as + // specified by the bucket's policy. + // + // - Otherwise, the uploading account retains ownership of the objects. + // + // For more information about Amazon S3 object ownership, see [Controlling ownership of uploaded objects using S3 Object Ownership] in the Amazon + // Simple Storage Service User Guide. + // + // [Controlling ownership of uploaded objects using S3 Object Ownership]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html + BucketOwnerAccess BucketOwnerAccess + + // Set to true if you do not want your S3 build log output encrypted. By default + // S3 build logs are encrypted. + EncryptionDisabled *bool + + // The ARN of an S3 bucket and the path prefix for S3 logs. If your Amazon S3 + // bucket name is my-bucket , and your path prefix is build-log , then acceptable + // formats are my-bucket/build-log or arn:aws:s3:::my-bucket/build-log . + Location *string + + noSmithyDocumentSerde +} + +// Information about the S3 bucket where the raw data of a report are exported. +type S3ReportExportConfig struct { + + // The name of the S3 bucket where the raw data of a report are exported. + Bucket *string + + // The Amazon Web Services account identifier of the owner of the Amazon S3 + // bucket. This allows report data to be exported to an Amazon S3 bucket that is + // owned by an account other than the account running the build. + BucketOwner *string + + // A boolean value that specifies if the results of a report are encrypted. + EncryptionDisabled *bool + + // The encryption key for the report's encrypted raw data. + EncryptionKey *string + + // The type of build output artifact to create. Valid values include: + // + // - NONE : CodeBuild creates the raw data in the output bucket. This is the + // default if packaging is not specified. + // + // - ZIP : CodeBuild creates a ZIP file with the raw data in the output bucket. + Packaging ReportPackagingType + + // The path to the exported report's raw data results. + Path *string + + noSmithyDocumentSerde +} + +// Contains sandbox information. +type Sandbox struct { + + // The ARN of the sandbox. + Arn *string + + // The current session for the sandbox. + CurrentSession *SandboxSession + + // The Key Management Service customer master key (CMK) to be used for encrypting + // the sandbox output artifacts. + EncryptionKey *string + + // When the sandbox process ended, expressed in Unix time format. + EndTime *time.Time + + // Information about the build environment of the build project. + Environment *ProjectEnvironment + + // An array of ProjectFileSystemLocation objects for a CodeBuild build project. A + // ProjectFileSystemLocation object specifies the identifier , location , + // mountOptions , mountPoint , and type of a file system created using Amazon + // Elastic File System. + FileSystemLocations []ProjectFileSystemLocation + + // The ID of the sandbox. + Id *string + + // Information about logs for a build project. These can be logs in CloudWatch + // Logs, built in a specified S3 bucket, or both. + LogConfig *LogsConfig + + // The CodeBuild project name. + ProjectName *string + + // The number of minutes a sandbox is allowed to be queued before it times out. + QueuedTimeoutInMinutes *int32 + + // When the sandbox process was initially requested, expressed in Unix time format. + RequestTime *time.Time + + // An array of ProjectSourceVersion objects. + SecondarySourceVersions []ProjectSourceVersion + + // An array of ProjectSource objects. + SecondarySources []ProjectSource + + // The name of a service role used for this sandbox. + ServiceRole *string + + // Information about the build input source code for the build project. + Source *ProjectSource + + // Any version identifier for the version of the sandbox to be built. + SourceVersion *string + + // When the sandbox process started, expressed in Unix time format. + StartTime *time.Time + + // The status of the sandbox. + Status *string + + // How long, in minutes, from 5 to 2160 (36 hours), for CodeBuild to wait before + // timing out this sandbox if it does not get marked as completed. + TimeoutInMinutes *int32 + + // Information about the VPC configuration that CodeBuild accesses. + VpcConfig *VpcConfig + + noSmithyDocumentSerde +} + +// Contains information about the sandbox session. +type SandboxSession struct { + + // The current phase for the sandbox. + CurrentPhase *string + + // When the sandbox session ended, expressed in Unix time format. + EndTime *time.Time + + // The ID of the sandbox session. + Id *string + + // Information about build logs in CloudWatch Logs. + Logs *LogsLocation + + // Describes a network interface. + NetworkInterface *NetworkInterface + + // An array of SandboxSessionPhase objects. + Phases []SandboxSessionPhase + + // An identifier for the version of this sandbox's source code. + ResolvedSourceVersion *string + + // When the sandbox session started, expressed in Unix time format. + StartTime *time.Time + + // The status of the sandbox session. + Status *string + + noSmithyDocumentSerde +} + +// Contains information about the sandbox phase. +type SandboxSessionPhase struct { + + // An array of PhaseContext objects. + Contexts []PhaseContext + + // How long, in seconds, between the starting and ending times of the sandbox's + // phase. + DurationInSeconds *int64 + + // When the sandbox phase ended, expressed in Unix time format. + EndTime *time.Time + + // The current status of the sandbox phase. Valid values include: + // + // FAILED The sandbox phase failed. + // + // FAULT The sandbox phase faulted. + // + // IN_PROGRESS The sandbox phase is still in progress. + // + // STOPPED The sandbox phase stopped. + // + // SUCCEEDED The sandbox phase succeeded. + // + // TIMED_OUT The sandbox phase timed out. + PhaseStatus StatusType + + // The name of the sandbox phase. + PhaseType *string + + // When the sandbox phase started, expressed in Unix time format. + StartTime *time.Time + + noSmithyDocumentSerde +} + +// The scaling configuration input of a compute fleet. +type ScalingConfigurationInput struct { + + // The maximum number of instances in the fleet when auto-scaling. + MaxCapacity *int32 + + // The scaling type for a compute fleet. + ScalingType FleetScalingType + + // A list of TargetTrackingScalingConfiguration objects. + TargetTrackingScalingConfigs []TargetTrackingScalingConfiguration + + noSmithyDocumentSerde +} + +// The scaling configuration output of a compute fleet. +type ScalingConfigurationOutput struct { + + // The desired number of instances in the fleet when auto-scaling. + DesiredCapacity *int32 + + // The maximum number of instances in the fleet when auto-scaling. + MaxCapacity *int32 + + // The scaling type for a compute fleet. + ScalingType FleetScalingType + + // A list of TargetTrackingScalingConfiguration objects. + TargetTrackingScalingConfigs []TargetTrackingScalingConfiguration + + noSmithyDocumentSerde +} + +// Contains configuration information about the scope for a webhook. +type ScopeConfiguration struct { + + // The name of either the group, enterprise, or organization that will send + // webhook events to CodeBuild, depending on the type of webhook. + // + // This member is required. + Name *string + + // The type of scope for a GitHub or GitLab webhook. The scope default is + // GITHUB_ORGANIZATION. + // + // This member is required. + Scope WebhookScopeType + + // The domain of the GitHub Enterprise organization or the GitLab Self Managed + // group. Note that this parameter is only required if your project's source type + // is GITHUB_ENTERPRISE or GITLAB_SELF_MANAGED. + Domain *string + + noSmithyDocumentSerde +} + +// Information about the authorization settings for CodeBuild to access the source +// code to be built. +type SourceAuth struct { + + // The authorization type to use. Valid options are OAUTH, CODECONNECTIONS, or + // SECRETS_MANAGER. + // + // This member is required. + Type SourceAuthType + + // The resource value that applies to the specified authorization type. + Resource *string + + noSmithyDocumentSerde +} + +// Information about the credentials for a GitHub, GitHub Enterprise, GitLab, +// +// GitLab Self Managed, or Bitbucket repository. +type SourceCredentialsInfo struct { + + // The Amazon Resource Name (ARN) of the token. + Arn *string + + // The type of authentication used by the credentials. Valid options are OAUTH, + // BASIC_AUTH, PERSONAL_ACCESS_TOKEN, CODECONNECTIONS, or SECRETS_MANAGER. + AuthType AuthType + + // The connection ARN if your authType is CODECONNECTIONS or SECRETS_MANAGER. + Resource *string + + // The type of source provider. The valid options are GITHUB, GITHUB_ENTERPRISE, + // GITLAB, GITLAB_SELF_MANAGED, or BITBUCKET. + ServerType ServerType + + noSmithyDocumentSerde +} + +// Contains information about the Session Manager session. +type SSMSession struct { + + // The ID of the session. + SessionId *string + + // A URL back to SSM Agent on the managed node that the Session Manager client + // uses to send commands and receive output from the node. + StreamUrl *string + + // An encrypted token value containing session and caller information. + TokenValue *string + + noSmithyDocumentSerde +} + +// A tag, consisting of a key and a value. +// +// This tag is available for use by Amazon Web Services services that support tags +// in CodeBuild. +type Tag struct { + + // The tag's key. + Key *string + + // The tag's value. + Value *string + + noSmithyDocumentSerde +} + +// Defines when a new instance is auto-scaled into the compute fleet. +type TargetTrackingScalingConfiguration struct { + + // The metric type to determine auto-scaling. + MetricType FleetScalingMetricType + + // The value of metricType when to start scaling. + TargetValue *float64 + + noSmithyDocumentSerde +} + +// Information about a test case created using a framework such as NUnit or +// +// Cucumber. A test case might be a unit test or a configuration test. +type TestCase struct { + + // The number of nanoseconds it took to run this test case. + DurationInNanoSeconds *int64 + + // The date and time a test case expires. A test case expires 30 days after it is + // created. An expired test case is not available to view in CodeBuild. + Expired *time.Time + + // A message associated with a test case. For example, an error message or stack + // trace. + Message *string + + // The name of the test case. + Name *string + + // A string that is applied to a series of related test cases. CodeBuild + // generates the prefix. The prefix depends on the framework used to generate the + // tests. + Prefix *string + + // The ARN of the report to which the test case belongs. + ReportArn *string + + // The status returned by the test case after it was run. Valid statuses are + // SUCCEEDED , FAILED , ERROR , SKIPPED , and UNKNOWN . + Status *string + + // The path to the raw data file that contains the test result. + TestRawDataPath *string + + // The name of the test suite that the test case is a part of. + TestSuiteName *string + + noSmithyDocumentSerde +} + +// A filter used to return specific types of test cases. In order to pass the +// filter, the report must meet all of the filter properties. +type TestCaseFilter struct { + + // A keyword that is used to filter on the name or the prefix of the test cases. + // Only test cases where the keyword is a substring of the name or the prefix will + // be returned. + Keyword *string + + // The status used to filter test cases. A TestCaseFilter can have one status. + // Valid values are: + // + // - SUCCEEDED + // + // - FAILED + // + // - ERROR + // + // - SKIPPED + // + // - UNKNOWN + Status *string + + noSmithyDocumentSerde +} + +// Information about a test report. +type TestReportSummary struct { + + // The number of nanoseconds it took to run all of the test cases in this report. + // + // This member is required. + DurationInNanoSeconds *int64 + + // A map that contains the number of each type of status returned by the test + // results in this TestReportSummary . + // + // This member is required. + StatusCounts map[string]int32 + + // The number of test cases in this TestReportSummary . The total includes + // truncated test cases. + // + // This member is required. + Total *int32 + + noSmithyDocumentSerde +} + +// Information about the VPC configuration that CodeBuild accesses. +type VpcConfig struct { + + // A list of one or more security groups IDs in your Amazon VPC. + SecurityGroupIds []string + + // A list of one or more subnet IDs in your Amazon VPC. + Subnets []string + + // The ID of the Amazon VPC. + VpcId *string + + noSmithyDocumentSerde +} + +// Information about a webhook that connects repository events to a build project +// in CodeBuild. +type Webhook struct { + + // A regular expression used to determine which repository branches are built when + // a webhook is triggered. If the name of a branch matches the regular expression, + // then it is built. If branchFilter is empty, then all branches are built. + // + // It is recommended that you use filterGroups instead of branchFilter . + BranchFilter *string + + // Specifies the type of build this webhook will trigger. + // + // RUNNER_BUILDKITE_BUILD is only available for NO_SOURCE source type projects + // configured for Buildkite runner builds. For more information about + // CodeBuild-hosted Buildkite runner builds, see [Tutorial: Configure a CodeBuild-hosted Buildkite runner]in the CodeBuild user guide. + // + // [Tutorial: Configure a CodeBuild-hosted Buildkite runner]: https://docs.aws.amazon.com/codebuild/latest/userguide/sample-runner-buildkite.html + BuildType WebhookBuildType + + // An array of arrays of WebhookFilter objects used to determine which webhooks + // are triggered. At least one WebhookFilter in the array must specify EVENT as + // its type . + // + // For a build to be triggered, at least one filter group in the filterGroups + // array must pass. For a filter group to pass, each of its filters must pass. + FilterGroups [][]WebhookFilter + + // A timestamp that indicates the last time a repository's secret token was + // modified. + LastModifiedSecret *time.Time + + // If manualCreation is true, CodeBuild doesn't create a webhook in GitHub and + // instead returns payloadUrl and secret values for the webhook. The payloadUrl + // and secret values in the output can be used to manually create a webhook within + // GitHub. + // + // manualCreation is only available for GitHub webhooks. + ManualCreation *bool + + // The CodeBuild endpoint where webhook events are sent. + PayloadUrl *string + + // A PullRequestBuildPolicy object that defines comment-based approval + // requirements for triggering builds on pull requests. This policy helps control + // when automated builds are executed based on contributor permissions and approval + // workflows. + PullRequestBuildPolicy *PullRequestBuildPolicy + + // The scope configuration for global or organization webhooks. + // + // Global or organization webhooks are only available for GitHub and Github + // Enterprise webhooks. + ScopeConfiguration *ScopeConfiguration + + // The secret token of the associated repository. + // + // A Bitbucket webhook does not support secret . + Secret *string + + // The status of the webhook. Valid values include: + // + // - CREATING : The webhook is being created. + // + // - CREATE_FAILED : The webhook has failed to create. + // + // - ACTIVE : The webhook has succeeded and is active. + // + // - DELETING : The webhook is being deleted. + Status WebhookStatus + + // A message associated with the status of a webhook. + StatusMessage *string + + // The URL to the webhook. + Url *string + + noSmithyDocumentSerde +} + +// A filter used to determine which webhooks trigger a build. +type WebhookFilter struct { + + // For a WebHookFilter that uses EVENT type, a comma-separated string that + // specifies one or more events. For example, the webhook filter PUSH, + // PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED allows all push, pull request + // created, and pull request updated events to trigger a build. + // + // For a WebHookFilter that uses any of the other filter types, a regular + // expression pattern. For example, a WebHookFilter that uses HEAD_REF for its type + // and the pattern ^refs/heads/ triggers a build when the head reference is a + // branch with a reference name refs/heads/branch-name . + // + // This member is required. + Pattern *string + + // The type of webhook filter. There are 11 webhook filter types: EVENT , + // ACTOR_ACCOUNT_ID , HEAD_REF , BASE_REF , FILE_PATH , COMMIT_MESSAGE , TAG_NAME , + // RELEASE_NAME , REPOSITORY_NAME , ORGANIZATION_NAME , and WORKFLOW_NAME . + // + // - EVENT + // + // - A webhook event triggers a build when the provided pattern matches one of + // nine event types: PUSH , PULL_REQUEST_CREATED , PULL_REQUEST_UPDATED , + // PULL_REQUEST_CLOSED , PULL_REQUEST_REOPENED , PULL_REQUEST_MERGED , RELEASED , + // PRERELEASED , and WORKFLOW_JOB_QUEUED . The EVENT patterns are specified as a + // comma-separated string. For example, PUSH, PULL_REQUEST_CREATED, + // PULL_REQUEST_UPDATED filters all push, pull request created, and pull request + // updated events. + // + // Types PULL_REQUEST_REOPENED and WORKFLOW_JOB_QUEUED work with GitHub and GitHub + // Enterprise only. Types RELEASED and PRERELEASED work with GitHub only. + // + // - ACTOR_ACCOUNT_ID + // + // - A webhook event triggers a build when a GitHub, GitHub Enterprise, or + // Bitbucket account ID matches the regular expression pattern . + // + // - HEAD_REF + // + // - A webhook event triggers a build when the head reference matches the + // regular expression pattern . For example, refs/heads/branch-name and + // refs/tags/tag-name . + // + // Works with GitHub and GitHub Enterprise push, GitHub and GitHub Enterprise pull + // request, Bitbucket push, and Bitbucket pull request events. + // + // - BASE_REF + // + // - A webhook event triggers a build when the base reference matches the + // regular expression pattern . For example, refs/heads/branch-name . + // + // Works with pull request events only. + // + // - FILE_PATH + // + // - A webhook triggers a build when the path of a changed file matches the + // regular expression pattern . + // + // Works with push and pull request events only. + // + // - COMMIT_MESSAGE + // + // - A webhook triggers a build when the head commit message matches the regular + // expression pattern . + // + // Works with push and pull request events only. + // + // - TAG_NAME + // + // - A webhook triggers a build when the tag name of the release matches the + // regular expression pattern . + // + // Works with RELEASED and PRERELEASED events only. + // + // - RELEASE_NAME + // + // - A webhook triggers a build when the release name matches the regular + // expression pattern . + // + // Works with RELEASED and PRERELEASED events only. + // + // - REPOSITORY_NAME + // + // - A webhook triggers a build when the repository name matches the regular + // expression pattern . + // + // Works with GitHub global or organization webhooks only. + // + // - ORGANIZATION_NAME + // + // - A webhook triggers a build when the organization name matches the regular + // expression pattern . + // + // Works with GitHub global webhooks only. + // + // - WORKFLOW_NAME + // + // - A webhook triggers a build when the workflow name matches the regular + // expression pattern . + // + // Works with WORKFLOW_JOB_QUEUED events only. + // + // For CodeBuild-hosted Buildkite runner builds, WORKFLOW_NAME filters will filter + // by pipeline name. + // + // This member is required. + Type WebhookFilterType + + // Used to indicate that the pattern determines which webhook events do not + // trigger a build. If true, then a webhook event that does not match the pattern + // triggers a build. If false, then a webhook event that matches the pattern + // triggers a build. + ExcludeMatchedPattern *bool + + noSmithyDocumentSerde +} + +type noSmithyDocumentSerde = smithydocument.NoSerde diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/validators.go b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/validators.go new file mode 100644 index 00000000000..499e9ca2225 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/codebuild/validators.go @@ -0,0 +1,2437 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codebuild + +import ( + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/codebuild/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/middleware" +) + +type validateOpBatchDeleteBuilds struct { +} + +func (*validateOpBatchDeleteBuilds) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpBatchDeleteBuilds) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*BatchDeleteBuildsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpBatchDeleteBuildsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpBatchGetBuildBatches struct { +} + +func (*validateOpBatchGetBuildBatches) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpBatchGetBuildBatches) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*BatchGetBuildBatchesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpBatchGetBuildBatchesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpBatchGetBuilds struct { +} + +func (*validateOpBatchGetBuilds) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpBatchGetBuilds) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*BatchGetBuildsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpBatchGetBuildsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpBatchGetCommandExecutions struct { +} + +func (*validateOpBatchGetCommandExecutions) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpBatchGetCommandExecutions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*BatchGetCommandExecutionsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpBatchGetCommandExecutionsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpBatchGetFleets struct { +} + +func (*validateOpBatchGetFleets) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpBatchGetFleets) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*BatchGetFleetsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpBatchGetFleetsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpBatchGetProjects struct { +} + +func (*validateOpBatchGetProjects) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpBatchGetProjects) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*BatchGetProjectsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpBatchGetProjectsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpBatchGetReportGroups struct { +} + +func (*validateOpBatchGetReportGroups) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpBatchGetReportGroups) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*BatchGetReportGroupsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpBatchGetReportGroupsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpBatchGetReports struct { +} + +func (*validateOpBatchGetReports) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpBatchGetReports) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*BatchGetReportsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpBatchGetReportsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpBatchGetSandboxes struct { +} + +func (*validateOpBatchGetSandboxes) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpBatchGetSandboxes) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*BatchGetSandboxesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpBatchGetSandboxesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateFleet struct { +} + +func (*validateOpCreateFleet) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateFleet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateFleetInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateFleetInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateProject struct { +} + +func (*validateOpCreateProject) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateProject) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateProjectInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateProjectInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateReportGroup struct { +} + +func (*validateOpCreateReportGroup) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateReportGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateReportGroupInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateReportGroupInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateWebhook struct { +} + +func (*validateOpCreateWebhook) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateWebhook) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateWebhookInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateWebhookInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteBuildBatch struct { +} + +func (*validateOpDeleteBuildBatch) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteBuildBatch) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteBuildBatchInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteBuildBatchInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteFleet struct { +} + +func (*validateOpDeleteFleet) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteFleet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteFleetInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteFleetInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteProject struct { +} + +func (*validateOpDeleteProject) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteProject) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteProjectInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteProjectInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteReportGroup struct { +} + +func (*validateOpDeleteReportGroup) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteReportGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteReportGroupInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteReportGroupInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteReport struct { +} + +func (*validateOpDeleteReport) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteReport) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteReportInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteReportInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteResourcePolicy struct { +} + +func (*validateOpDeleteResourcePolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteResourcePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteResourcePolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteResourcePolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteSourceCredentials struct { +} + +func (*validateOpDeleteSourceCredentials) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteSourceCredentials) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteSourceCredentialsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteSourceCredentialsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteWebhook struct { +} + +func (*validateOpDeleteWebhook) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteWebhook) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteWebhookInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteWebhookInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeCodeCoverages struct { +} + +func (*validateOpDescribeCodeCoverages) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeCodeCoverages) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeCodeCoveragesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeCodeCoveragesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeTestCases struct { +} + +func (*validateOpDescribeTestCases) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeTestCases) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeTestCasesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeTestCasesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetReportGroupTrend struct { +} + +func (*validateOpGetReportGroupTrend) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetReportGroupTrend) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetReportGroupTrendInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetReportGroupTrendInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetResourcePolicy struct { +} + +func (*validateOpGetResourcePolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetResourcePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetResourcePolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetResourcePolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpImportSourceCredentials struct { +} + +func (*validateOpImportSourceCredentials) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpImportSourceCredentials) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ImportSourceCredentialsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpImportSourceCredentialsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpInvalidateProjectCache struct { +} + +func (*validateOpInvalidateProjectCache) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpInvalidateProjectCache) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*InvalidateProjectCacheInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpInvalidateProjectCacheInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListBuildsForProject struct { +} + +func (*validateOpListBuildsForProject) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListBuildsForProject) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListBuildsForProjectInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListBuildsForProjectInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListCommandExecutionsForSandbox struct { +} + +func (*validateOpListCommandExecutionsForSandbox) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListCommandExecutionsForSandbox) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListCommandExecutionsForSandboxInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListCommandExecutionsForSandboxInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListReportsForReportGroup struct { +} + +func (*validateOpListReportsForReportGroup) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListReportsForReportGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListReportsForReportGroupInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListReportsForReportGroupInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListSandboxesForProject struct { +} + +func (*validateOpListSandboxesForProject) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListSandboxesForProject) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListSandboxesForProjectInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListSandboxesForProjectInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpPutResourcePolicy struct { +} + +func (*validateOpPutResourcePolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutResourcePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutResourcePolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutResourcePolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpStartBuildBatch struct { +} + +func (*validateOpStartBuildBatch) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStartBuildBatch) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StartBuildBatchInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStartBuildBatchInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpStartBuild struct { +} + +func (*validateOpStartBuild) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStartBuild) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StartBuildInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStartBuildInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpStartCommandExecution struct { +} + +func (*validateOpStartCommandExecution) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStartCommandExecution) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StartCommandExecutionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStartCommandExecutionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpStartSandboxConnection struct { +} + +func (*validateOpStartSandboxConnection) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStartSandboxConnection) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StartSandboxConnectionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStartSandboxConnectionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpStopBuildBatch struct { +} + +func (*validateOpStopBuildBatch) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStopBuildBatch) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StopBuildBatchInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStopBuildBatchInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpStopBuild struct { +} + +func (*validateOpStopBuild) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStopBuild) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StopBuildInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStopBuildInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpStopSandbox struct { +} + +func (*validateOpStopSandbox) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStopSandbox) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StopSandboxInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStopSandboxInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateFleet struct { +} + +func (*validateOpUpdateFleet) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateFleet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateFleetInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateFleetInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateProject struct { +} + +func (*validateOpUpdateProject) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateProject) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateProjectInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateProjectInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateProjectVisibility struct { +} + +func (*validateOpUpdateProjectVisibility) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateProjectVisibility) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateProjectVisibilityInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateProjectVisibilityInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateReportGroup struct { +} + +func (*validateOpUpdateReportGroup) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateReportGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateReportGroupInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateReportGroupInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateWebhook struct { +} + +func (*validateOpUpdateWebhook) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateWebhook) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateWebhookInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateWebhookInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +func addOpBatchDeleteBuildsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpBatchDeleteBuilds{}, middleware.After) +} + +func addOpBatchGetBuildBatchesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpBatchGetBuildBatches{}, middleware.After) +} + +func addOpBatchGetBuildsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpBatchGetBuilds{}, middleware.After) +} + +func addOpBatchGetCommandExecutionsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpBatchGetCommandExecutions{}, middleware.After) +} + +func addOpBatchGetFleetsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpBatchGetFleets{}, middleware.After) +} + +func addOpBatchGetProjectsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpBatchGetProjects{}, middleware.After) +} + +func addOpBatchGetReportGroupsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpBatchGetReportGroups{}, middleware.After) +} + +func addOpBatchGetReportsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpBatchGetReports{}, middleware.After) +} + +func addOpBatchGetSandboxesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpBatchGetSandboxes{}, middleware.After) +} + +func addOpCreateFleetValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateFleet{}, middleware.After) +} + +func addOpCreateProjectValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateProject{}, middleware.After) +} + +func addOpCreateReportGroupValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateReportGroup{}, middleware.After) +} + +func addOpCreateWebhookValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateWebhook{}, middleware.After) +} + +func addOpDeleteBuildBatchValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteBuildBatch{}, middleware.After) +} + +func addOpDeleteFleetValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteFleet{}, middleware.After) +} + +func addOpDeleteProjectValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteProject{}, middleware.After) +} + +func addOpDeleteReportGroupValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteReportGroup{}, middleware.After) +} + +func addOpDeleteReportValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteReport{}, middleware.After) +} + +func addOpDeleteResourcePolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteResourcePolicy{}, middleware.After) +} + +func addOpDeleteSourceCredentialsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteSourceCredentials{}, middleware.After) +} + +func addOpDeleteWebhookValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteWebhook{}, middleware.After) +} + +func addOpDescribeCodeCoveragesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeCodeCoverages{}, middleware.After) +} + +func addOpDescribeTestCasesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeTestCases{}, middleware.After) +} + +func addOpGetReportGroupTrendValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetReportGroupTrend{}, middleware.After) +} + +func addOpGetResourcePolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetResourcePolicy{}, middleware.After) +} + +func addOpImportSourceCredentialsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpImportSourceCredentials{}, middleware.After) +} + +func addOpInvalidateProjectCacheValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpInvalidateProjectCache{}, middleware.After) +} + +func addOpListBuildsForProjectValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListBuildsForProject{}, middleware.After) +} + +func addOpListCommandExecutionsForSandboxValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListCommandExecutionsForSandbox{}, middleware.After) +} + +func addOpListReportsForReportGroupValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListReportsForReportGroup{}, middleware.After) +} + +func addOpListSandboxesForProjectValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListSandboxesForProject{}, middleware.After) +} + +func addOpPutResourcePolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutResourcePolicy{}, middleware.After) +} + +func addOpStartBuildBatchValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStartBuildBatch{}, middleware.After) +} + +func addOpStartBuildValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStartBuild{}, middleware.After) +} + +func addOpStartCommandExecutionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStartCommandExecution{}, middleware.After) +} + +func addOpStartSandboxConnectionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStartSandboxConnection{}, middleware.After) +} + +func addOpStopBuildBatchValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStopBuildBatch{}, middleware.After) +} + +func addOpStopBuildValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStopBuild{}, middleware.After) +} + +func addOpStopSandboxValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStopSandbox{}, middleware.After) +} + +func addOpUpdateFleetValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateFleet{}, middleware.After) +} + +func addOpUpdateProjectValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateProject{}, middleware.After) +} + +func addOpUpdateProjectVisibilityValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateProjectVisibility{}, middleware.After) +} + +func addOpUpdateReportGroupValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateReportGroup{}, middleware.After) +} + +func addOpUpdateWebhookValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateWebhook{}, middleware.After) +} + +func validateCloudWatchLogsConfig(v *types.CloudWatchLogsConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CloudWatchLogsConfig"} + if len(v.Status) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Status")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateDockerServer(v *types.DockerServer) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DockerServer"} + if len(v.ComputeType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ComputeType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateEnvironmentVariable(v *types.EnvironmentVariable) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "EnvironmentVariable"} + 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 validateEnvironmentVariables(v []types.EnvironmentVariable) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "EnvironmentVariables"} + for i := range v { + if err := validateEnvironmentVariable(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateFilterGroup(v []types.WebhookFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "FilterGroup"} + for i := range v { + if err := validateWebhookFilter(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateFilterGroups(v [][]types.WebhookFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "FilterGroups"} + for i := range v { + if err := validateFilterGroup(v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateFleetProxyRule(v *types.FleetProxyRule) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "FleetProxyRule"} + if len(v.Type) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Type")) + } + if len(v.Effect) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Effect")) + } + if v.Entities == nil { + invalidParams.Add(smithy.NewErrParamRequired("Entities")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateFleetProxyRules(v []types.FleetProxyRule) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "FleetProxyRules"} + for i := range v { + if err := validateFleetProxyRule(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateGitSubmodulesConfig(v *types.GitSubmodulesConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GitSubmodulesConfig"} + if v.FetchSubmodules == nil { + invalidParams.Add(smithy.NewErrParamRequired("FetchSubmodules")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateLogsConfig(v *types.LogsConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "LogsConfig"} + if v.CloudWatchLogs != nil { + if err := validateCloudWatchLogsConfig(v.CloudWatchLogs); err != nil { + invalidParams.AddNested("CloudWatchLogs", err.(smithy.InvalidParamsError)) + } + } + if v.S3Logs != nil { + if err := validateS3LogsConfig(v.S3Logs); err != nil { + invalidParams.AddNested("S3Logs", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateProjectArtifacts(v *types.ProjectArtifacts) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ProjectArtifacts"} + if len(v.Type) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Type")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateProjectArtifactsList(v []types.ProjectArtifacts) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ProjectArtifactsList"} + for i := range v { + if err := validateProjectArtifacts(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateProjectCache(v *types.ProjectCache) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ProjectCache"} + if len(v.Type) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Type")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateProjectEnvironment(v *types.ProjectEnvironment) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ProjectEnvironment"} + if len(v.Type) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Type")) + } + if v.Image == nil { + invalidParams.Add(smithy.NewErrParamRequired("Image")) + } + if len(v.ComputeType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ComputeType")) + } + if v.EnvironmentVariables != nil { + if err := validateEnvironmentVariables(v.EnvironmentVariables); err != nil { + invalidParams.AddNested("EnvironmentVariables", err.(smithy.InvalidParamsError)) + } + } + if v.RegistryCredential != nil { + if err := validateRegistryCredential(v.RegistryCredential); err != nil { + invalidParams.AddNested("RegistryCredential", err.(smithy.InvalidParamsError)) + } + } + if v.DockerServer != nil { + if err := validateDockerServer(v.DockerServer); err != nil { + invalidParams.AddNested("DockerServer", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateProjectSecondarySourceVersions(v []types.ProjectSourceVersion) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ProjectSecondarySourceVersions"} + for i := range v { + if err := validateProjectSourceVersion(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateProjectSource(v *types.ProjectSource) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ProjectSource"} + if len(v.Type) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Type")) + } + if v.GitSubmodulesConfig != nil { + if err := validateGitSubmodulesConfig(v.GitSubmodulesConfig); err != nil { + invalidParams.AddNested("GitSubmodulesConfig", err.(smithy.InvalidParamsError)) + } + } + if v.Auth != nil { + if err := validateSourceAuth(v.Auth); err != nil { + invalidParams.AddNested("Auth", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateProjectSources(v []types.ProjectSource) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ProjectSources"} + for i := range v { + if err := validateProjectSource(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateProjectSourceVersion(v *types.ProjectSourceVersion) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ProjectSourceVersion"} + if v.SourceIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("SourceIdentifier")) + } + if v.SourceVersion == nil { + invalidParams.Add(smithy.NewErrParamRequired("SourceVersion")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateProxyConfiguration(v *types.ProxyConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ProxyConfiguration"} + if v.OrderedProxyRules != nil { + if err := validateFleetProxyRules(v.OrderedProxyRules); err != nil { + invalidParams.AddNested("OrderedProxyRules", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validatePullRequestBuildPolicy(v *types.PullRequestBuildPolicy) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PullRequestBuildPolicy"} + if len(v.RequiresCommentApproval) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("RequiresCommentApproval")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRegistryCredential(v *types.RegistryCredential) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RegistryCredential"} + if v.Credential == nil { + invalidParams.Add(smithy.NewErrParamRequired("Credential")) + } + if len(v.CredentialProvider) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("CredentialProvider")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateS3LogsConfig(v *types.S3LogsConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "S3LogsConfig"} + if len(v.Status) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Status")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateScopeConfiguration(v *types.ScopeConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ScopeConfiguration"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if len(v.Scope) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Scope")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateSourceAuth(v *types.SourceAuth) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SourceAuth"} + if len(v.Type) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Type")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateWebhookFilter(v *types.WebhookFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "WebhookFilter"} + if len(v.Type) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Type")) + } + if v.Pattern == nil { + invalidParams.Add(smithy.NewErrParamRequired("Pattern")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpBatchDeleteBuildsInput(v *BatchDeleteBuildsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "BatchDeleteBuildsInput"} + if v.Ids == nil { + invalidParams.Add(smithy.NewErrParamRequired("Ids")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpBatchGetBuildBatchesInput(v *BatchGetBuildBatchesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "BatchGetBuildBatchesInput"} + if v.Ids == nil { + invalidParams.Add(smithy.NewErrParamRequired("Ids")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpBatchGetBuildsInput(v *BatchGetBuildsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "BatchGetBuildsInput"} + if v.Ids == nil { + invalidParams.Add(smithy.NewErrParamRequired("Ids")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpBatchGetCommandExecutionsInput(v *BatchGetCommandExecutionsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "BatchGetCommandExecutionsInput"} + if v.SandboxId == nil { + invalidParams.Add(smithy.NewErrParamRequired("SandboxId")) + } + if v.CommandExecutionIds == nil { + invalidParams.Add(smithy.NewErrParamRequired("CommandExecutionIds")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpBatchGetFleetsInput(v *BatchGetFleetsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "BatchGetFleetsInput"} + if v.Names == nil { + invalidParams.Add(smithy.NewErrParamRequired("Names")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpBatchGetProjectsInput(v *BatchGetProjectsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "BatchGetProjectsInput"} + if v.Names == nil { + invalidParams.Add(smithy.NewErrParamRequired("Names")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpBatchGetReportGroupsInput(v *BatchGetReportGroupsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "BatchGetReportGroupsInput"} + if v.ReportGroupArns == nil { + invalidParams.Add(smithy.NewErrParamRequired("ReportGroupArns")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpBatchGetReportsInput(v *BatchGetReportsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "BatchGetReportsInput"} + if v.ReportArns == nil { + invalidParams.Add(smithy.NewErrParamRequired("ReportArns")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpBatchGetSandboxesInput(v *BatchGetSandboxesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "BatchGetSandboxesInput"} + if v.Ids == nil { + invalidParams.Add(smithy.NewErrParamRequired("Ids")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateFleetInput(v *CreateFleetInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateFleetInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.BaseCapacity == nil { + invalidParams.Add(smithy.NewErrParamRequired("BaseCapacity")) + } + if len(v.EnvironmentType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("EnvironmentType")) + } + if len(v.ComputeType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ComputeType")) + } + if v.ProxyConfiguration != nil { + if err := validateProxyConfiguration(v.ProxyConfiguration); err != nil { + invalidParams.AddNested("ProxyConfiguration", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateProjectInput(v *CreateProjectInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateProjectInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.Source == nil { + invalidParams.Add(smithy.NewErrParamRequired("Source")) + } else if v.Source != nil { + if err := validateProjectSource(v.Source); err != nil { + invalidParams.AddNested("Source", err.(smithy.InvalidParamsError)) + } + } + if v.SecondarySources != nil { + if err := validateProjectSources(v.SecondarySources); err != nil { + invalidParams.AddNested("SecondarySources", err.(smithy.InvalidParamsError)) + } + } + if v.SecondarySourceVersions != nil { + if err := validateProjectSecondarySourceVersions(v.SecondarySourceVersions); err != nil { + invalidParams.AddNested("SecondarySourceVersions", err.(smithy.InvalidParamsError)) + } + } + if v.Artifacts == nil { + invalidParams.Add(smithy.NewErrParamRequired("Artifacts")) + } else if v.Artifacts != nil { + if err := validateProjectArtifacts(v.Artifacts); err != nil { + invalidParams.AddNested("Artifacts", err.(smithy.InvalidParamsError)) + } + } + if v.SecondaryArtifacts != nil { + if err := validateProjectArtifactsList(v.SecondaryArtifacts); err != nil { + invalidParams.AddNested("SecondaryArtifacts", err.(smithy.InvalidParamsError)) + } + } + if v.Cache != nil { + if err := validateProjectCache(v.Cache); err != nil { + invalidParams.AddNested("Cache", err.(smithy.InvalidParamsError)) + } + } + if v.Environment == nil { + invalidParams.Add(smithy.NewErrParamRequired("Environment")) + } else if v.Environment != nil { + if err := validateProjectEnvironment(v.Environment); err != nil { + invalidParams.AddNested("Environment", err.(smithy.InvalidParamsError)) + } + } + if v.ServiceRole == nil { + invalidParams.Add(smithy.NewErrParamRequired("ServiceRole")) + } + if v.LogsConfig != nil { + if err := validateLogsConfig(v.LogsConfig); err != nil { + invalidParams.AddNested("LogsConfig", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateReportGroupInput(v *CreateReportGroupInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateReportGroupInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if len(v.Type) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Type")) + } + if v.ExportConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("ExportConfig")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateWebhookInput(v *CreateWebhookInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateWebhookInput"} + if v.ProjectName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ProjectName")) + } + if v.FilterGroups != nil { + if err := validateFilterGroups(v.FilterGroups); err != nil { + invalidParams.AddNested("FilterGroups", err.(smithy.InvalidParamsError)) + } + } + if v.ScopeConfiguration != nil { + if err := validateScopeConfiguration(v.ScopeConfiguration); err != nil { + invalidParams.AddNested("ScopeConfiguration", err.(smithy.InvalidParamsError)) + } + } + if v.PullRequestBuildPolicy != nil { + if err := validatePullRequestBuildPolicy(v.PullRequestBuildPolicy); err != nil { + invalidParams.AddNested("PullRequestBuildPolicy", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteBuildBatchInput(v *DeleteBuildBatchInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteBuildBatchInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteFleetInput(v *DeleteFleetInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteFleetInput"} + if v.Arn == nil { + invalidParams.Add(smithy.NewErrParamRequired("Arn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteProjectInput(v *DeleteProjectInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteProjectInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteReportGroupInput(v *DeleteReportGroupInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteReportGroupInput"} + if v.Arn == nil { + invalidParams.Add(smithy.NewErrParamRequired("Arn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteReportInput(v *DeleteReportInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteReportInput"} + if v.Arn == nil { + invalidParams.Add(smithy.NewErrParamRequired("Arn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteResourcePolicyInput(v *DeleteResourcePolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteResourcePolicyInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteSourceCredentialsInput(v *DeleteSourceCredentialsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteSourceCredentialsInput"} + if v.Arn == nil { + invalidParams.Add(smithy.NewErrParamRequired("Arn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteWebhookInput(v *DeleteWebhookInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteWebhookInput"} + if v.ProjectName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ProjectName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeCodeCoveragesInput(v *DescribeCodeCoveragesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeCodeCoveragesInput"} + if v.ReportArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ReportArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeTestCasesInput(v *DescribeTestCasesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeTestCasesInput"} + if v.ReportArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ReportArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetReportGroupTrendInput(v *GetReportGroupTrendInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetReportGroupTrendInput"} + if v.ReportGroupArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ReportGroupArn")) + } + if len(v.TrendField) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("TrendField")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetResourcePolicyInput(v *GetResourcePolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetResourcePolicyInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpImportSourceCredentialsInput(v *ImportSourceCredentialsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ImportSourceCredentialsInput"} + if v.Token == nil { + invalidParams.Add(smithy.NewErrParamRequired("Token")) + } + if len(v.ServerType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ServerType")) + } + if len(v.AuthType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("AuthType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpInvalidateProjectCacheInput(v *InvalidateProjectCacheInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "InvalidateProjectCacheInput"} + if v.ProjectName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ProjectName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListBuildsForProjectInput(v *ListBuildsForProjectInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListBuildsForProjectInput"} + if v.ProjectName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ProjectName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListCommandExecutionsForSandboxInput(v *ListCommandExecutionsForSandboxInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListCommandExecutionsForSandboxInput"} + if v.SandboxId == nil { + invalidParams.Add(smithy.NewErrParamRequired("SandboxId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListReportsForReportGroupInput(v *ListReportsForReportGroupInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListReportsForReportGroupInput"} + if v.ReportGroupArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ReportGroupArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListSandboxesForProjectInput(v *ListSandboxesForProjectInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListSandboxesForProjectInput"} + if v.ProjectName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ProjectName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpPutResourcePolicyInput(v *PutResourcePolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutResourcePolicyInput"} + if v.Policy == nil { + invalidParams.Add(smithy.NewErrParamRequired("Policy")) + } + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpStartBuildBatchInput(v *StartBuildBatchInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StartBuildBatchInput"} + if v.ProjectName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ProjectName")) + } + if v.SecondarySourcesOverride != nil { + if err := validateProjectSources(v.SecondarySourcesOverride); err != nil { + invalidParams.AddNested("SecondarySourcesOverride", err.(smithy.InvalidParamsError)) + } + } + if v.SecondarySourcesVersionOverride != nil { + if err := validateProjectSecondarySourceVersions(v.SecondarySourcesVersionOverride); err != nil { + invalidParams.AddNested("SecondarySourcesVersionOverride", err.(smithy.InvalidParamsError)) + } + } + if v.ArtifactsOverride != nil { + if err := validateProjectArtifacts(v.ArtifactsOverride); err != nil { + invalidParams.AddNested("ArtifactsOverride", err.(smithy.InvalidParamsError)) + } + } + if v.SecondaryArtifactsOverride != nil { + if err := validateProjectArtifactsList(v.SecondaryArtifactsOverride); err != nil { + invalidParams.AddNested("SecondaryArtifactsOverride", err.(smithy.InvalidParamsError)) + } + } + if v.EnvironmentVariablesOverride != nil { + if err := validateEnvironmentVariables(v.EnvironmentVariablesOverride); err != nil { + invalidParams.AddNested("EnvironmentVariablesOverride", err.(smithy.InvalidParamsError)) + } + } + if v.SourceAuthOverride != nil { + if err := validateSourceAuth(v.SourceAuthOverride); err != nil { + invalidParams.AddNested("SourceAuthOverride", err.(smithy.InvalidParamsError)) + } + } + if v.GitSubmodulesConfigOverride != nil { + if err := validateGitSubmodulesConfig(v.GitSubmodulesConfigOverride); err != nil { + invalidParams.AddNested("GitSubmodulesConfigOverride", err.(smithy.InvalidParamsError)) + } + } + if v.CacheOverride != nil { + if err := validateProjectCache(v.CacheOverride); err != nil { + invalidParams.AddNested("CacheOverride", err.(smithy.InvalidParamsError)) + } + } + if v.LogsConfigOverride != nil { + if err := validateLogsConfig(v.LogsConfigOverride); err != nil { + invalidParams.AddNested("LogsConfigOverride", err.(smithy.InvalidParamsError)) + } + } + if v.RegistryCredentialOverride != nil { + if err := validateRegistryCredential(v.RegistryCredentialOverride); err != nil { + invalidParams.AddNested("RegistryCredentialOverride", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpStartBuildInput(v *StartBuildInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StartBuildInput"} + if v.ProjectName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ProjectName")) + } + if v.SecondarySourcesOverride != nil { + if err := validateProjectSources(v.SecondarySourcesOverride); err != nil { + invalidParams.AddNested("SecondarySourcesOverride", err.(smithy.InvalidParamsError)) + } + } + if v.SecondarySourcesVersionOverride != nil { + if err := validateProjectSecondarySourceVersions(v.SecondarySourcesVersionOverride); err != nil { + invalidParams.AddNested("SecondarySourcesVersionOverride", err.(smithy.InvalidParamsError)) + } + } + if v.ArtifactsOverride != nil { + if err := validateProjectArtifacts(v.ArtifactsOverride); err != nil { + invalidParams.AddNested("ArtifactsOverride", err.(smithy.InvalidParamsError)) + } + } + if v.SecondaryArtifactsOverride != nil { + if err := validateProjectArtifactsList(v.SecondaryArtifactsOverride); err != nil { + invalidParams.AddNested("SecondaryArtifactsOverride", err.(smithy.InvalidParamsError)) + } + } + if v.EnvironmentVariablesOverride != nil { + if err := validateEnvironmentVariables(v.EnvironmentVariablesOverride); err != nil { + invalidParams.AddNested("EnvironmentVariablesOverride", err.(smithy.InvalidParamsError)) + } + } + if v.SourceAuthOverride != nil { + if err := validateSourceAuth(v.SourceAuthOverride); err != nil { + invalidParams.AddNested("SourceAuthOverride", err.(smithy.InvalidParamsError)) + } + } + if v.GitSubmodulesConfigOverride != nil { + if err := validateGitSubmodulesConfig(v.GitSubmodulesConfigOverride); err != nil { + invalidParams.AddNested("GitSubmodulesConfigOverride", err.(smithy.InvalidParamsError)) + } + } + if v.CacheOverride != nil { + if err := validateProjectCache(v.CacheOverride); err != nil { + invalidParams.AddNested("CacheOverride", err.(smithy.InvalidParamsError)) + } + } + if v.LogsConfigOverride != nil { + if err := validateLogsConfig(v.LogsConfigOverride); err != nil { + invalidParams.AddNested("LogsConfigOverride", err.(smithy.InvalidParamsError)) + } + } + if v.RegistryCredentialOverride != nil { + if err := validateRegistryCredential(v.RegistryCredentialOverride); err != nil { + invalidParams.AddNested("RegistryCredentialOverride", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpStartCommandExecutionInput(v *StartCommandExecutionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StartCommandExecutionInput"} + if v.SandboxId == nil { + invalidParams.Add(smithy.NewErrParamRequired("SandboxId")) + } + if v.Command == nil { + invalidParams.Add(smithy.NewErrParamRequired("Command")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpStartSandboxConnectionInput(v *StartSandboxConnectionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StartSandboxConnectionInput"} + if v.SandboxId == nil { + invalidParams.Add(smithy.NewErrParamRequired("SandboxId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpStopBuildBatchInput(v *StopBuildBatchInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StopBuildBatchInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpStopBuildInput(v *StopBuildInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StopBuildInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpStopSandboxInput(v *StopSandboxInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StopSandboxInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateFleetInput(v *UpdateFleetInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateFleetInput"} + if v.Arn == nil { + invalidParams.Add(smithy.NewErrParamRequired("Arn")) + } + if v.ProxyConfiguration != nil { + if err := validateProxyConfiguration(v.ProxyConfiguration); err != nil { + invalidParams.AddNested("ProxyConfiguration", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateProjectInput(v *UpdateProjectInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateProjectInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.Source != nil { + if err := validateProjectSource(v.Source); err != nil { + invalidParams.AddNested("Source", err.(smithy.InvalidParamsError)) + } + } + if v.SecondarySources != nil { + if err := validateProjectSources(v.SecondarySources); err != nil { + invalidParams.AddNested("SecondarySources", err.(smithy.InvalidParamsError)) + } + } + if v.SecondarySourceVersions != nil { + if err := validateProjectSecondarySourceVersions(v.SecondarySourceVersions); err != nil { + invalidParams.AddNested("SecondarySourceVersions", err.(smithy.InvalidParamsError)) + } + } + if v.Artifacts != nil { + if err := validateProjectArtifacts(v.Artifacts); err != nil { + invalidParams.AddNested("Artifacts", err.(smithy.InvalidParamsError)) + } + } + if v.SecondaryArtifacts != nil { + if err := validateProjectArtifactsList(v.SecondaryArtifacts); err != nil { + invalidParams.AddNested("SecondaryArtifacts", err.(smithy.InvalidParamsError)) + } + } + if v.Cache != nil { + if err := validateProjectCache(v.Cache); err != nil { + invalidParams.AddNested("Cache", err.(smithy.InvalidParamsError)) + } + } + if v.Environment != nil { + if err := validateProjectEnvironment(v.Environment); err != nil { + invalidParams.AddNested("Environment", err.(smithy.InvalidParamsError)) + } + } + if v.LogsConfig != nil { + if err := validateLogsConfig(v.LogsConfig); err != nil { + invalidParams.AddNested("LogsConfig", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateProjectVisibilityInput(v *UpdateProjectVisibilityInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateProjectVisibilityInput"} + if v.ProjectArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ProjectArn")) + } + if len(v.ProjectVisibility) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ProjectVisibility")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateReportGroupInput(v *UpdateReportGroupInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateReportGroupInput"} + if v.Arn == nil { + invalidParams.Add(smithy.NewErrParamRequired("Arn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateWebhookInput(v *UpdateWebhookInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateWebhookInput"} + if v.ProjectName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ProjectName")) + } + if v.FilterGroups != nil { + if err := validateFilterGroups(v.FilterGroups); err != nil { + invalidParams.AddNested("FilterGroups", err.(smithy.InvalidParamsError)) + } + } + if v.PullRequestBuildPolicy != nil { + if err := validatePullRequestBuildPolicy(v.PullRequestBuildPolicy); err != nil { + invalidParams.AddNested("PullRequestBuildPolicy", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} diff --git a/vendor/github.com/aws/smithy-go/CHANGELOG.md b/vendor/github.com/aws/smithy-go/CHANGELOG.md index de39171cf09..27fc881232a 100644 --- a/vendor/github.com/aws/smithy-go/CHANGELOG.md +++ b/vendor/github.com/aws/smithy-go/CHANGELOG.md @@ -1,3 +1,86 @@ +# Release (2026-02-27) + +## General Highlights +* **Dependency Update**: Updated to the latest SDK module versions + +# Release (2026-02-20) + +## General Highlights +* **Dependency Update**: Updated to the latest SDK module versions + +## Module Highlights +* `github.com/aws/smithy-go`: v1.24.1 + * **Feature**: Add new middleware functions to get event stream output from middleware + +# Release (2025-12-01) + +## General Highlights +* **Dependency Update**: Updated to the latest SDK module versions + +## Module Highlights +* `github.com/aws/smithy-go`: v1.24.0 + * **Feature**: Improve allocation footprint of the middleware stack. This should convey a ~10% reduction in allocations per SDK request. + +# Release (2025-11-03) + +## General Highlights +* **Dependency Update**: Updated to the latest SDK module versions + +## Module Highlights +* `github.com/aws/smithy-go`: v1.23.2 + * **Bug Fix**: Adjust the initial sizes of each middleware phase to avoid some unnecessary reallocation. + * **Bug Fix**: Avoid unnecessary allocation overhead from the metrics system when not in use. + +# Release (2025-10-15) + +## General Highlights +* **Dependency Update**: Bump minimum go version to 1.23. +* **Dependency Update**: Updated to the latest SDK module versions + +# Release (2025-09-18) + +## Module Highlights +* `github.com/aws/smithy-go/aws-http-auth`: [v1.1.0](aws-http-auth/CHANGELOG.md#v110-2025-09-18) + * **Feature**: Added support for SIG4/SIGV4A querystring authentication. + +# Release (2025-08-27) + +## General Highlights +* **Dependency Update**: Updated to the latest SDK module versions + +## Module Highlights +* `github.com/aws/smithy-go`: v1.23.0 + * **Feature**: Sort map keys in JSON Document types. + +# Release (2025-07-24) + +## General Highlights +* **Dependency Update**: Updated to the latest SDK module versions + +## Module Highlights +* `github.com/aws/smithy-go`: v1.22.5 + * **Feature**: Add HTTP interceptors. + +# Release (2025-06-16) + +## General Highlights +* **Dependency Update**: Updated to the latest SDK module versions + +## Module Highlights +* `github.com/aws/smithy-go`: v1.22.4 + * **Bug Fix**: Fix CBOR serd empty check for string and enum fields + * **Bug Fix**: Fix HTTP metrics data race. + * **Bug Fix**: Replace usages of deprecated ioutil package. + +# Release (2025-02-17) + +## General Highlights +* **Dependency Update**: Updated to the latest SDK module versions + +## Module Highlights +* `github.com/aws/smithy-go`: v1.22.3 + * **Dependency Update**: Bump minimum Go version to 1.22 per our language support policy. + # Release (2025-01-21) ## General Highlights diff --git a/vendor/github.com/aws/smithy-go/Makefile b/vendor/github.com/aws/smithy-go/Makefile index a3c2cf173de..a12b124d505 100644 --- a/vendor/github.com/aws/smithy-go/Makefile +++ b/vendor/github.com/aws/smithy-go/Makefile @@ -13,6 +13,7 @@ REPOTOOLS_CMD_GENERATE_CHANGELOG = ${REPOTOOLS_MODULE}/cmd/generatechangelog@${R REPOTOOLS_CMD_CHANGELOG = ${REPOTOOLS_MODULE}/cmd/changelog@${REPOTOOLS_VERSION} REPOTOOLS_CMD_TAG_RELEASE = ${REPOTOOLS_MODULE}/cmd/tagrelease@${REPOTOOLS_VERSION} REPOTOOLS_CMD_MODULE_VERSION = ${REPOTOOLS_MODULE}/cmd/moduleversion@${REPOTOOLS_VERSION} +REPOTOOLS_CMD_EACHMODULE = ${REPOTOOLS_MODULE}/cmd/eachmodule@${REPOTOOLS_VERSION} UNIT_TEST_TAGS= BUILD_TAGS= @@ -30,6 +31,24 @@ smithy-build: smithy-clean: cd codegen && ./gradlew clean +GRADLE_RETRIES := 3 +GRADLE_SLEEP := 2 + +# We're making a call to ./gradlew to trigger downloading Gradle and +# starting the daemon. Any call works, so using `./gradlew help` +ensure-gradle-up: + @cd codegen && for i in $(shell seq 1 $(GRADLE_RETRIES)); do \ + echo "Checking if Gradle daemon is up, attempt $$i..."; \ + if ./gradlew help; then \ + echo "Gradle daemon is up!"; \ + exit 0; \ + fi; \ + echo "Failed to start Gradle, retrying in $(GRADLE_SLEEP) seconds..."; \ + sleep $(GRADLE_SLEEP); \ + done; \ + echo "Failed to start Gradle after $(GRADLE_RETRIES) attempts."; \ + exit 1 + ################## # Linting/Verify # ################## @@ -37,8 +56,11 @@ smithy-clean: verify: vet -vet: - go vet ${BUILD_TAGS} --all ./... +vet: vet-modules-. + +vet-modules-%: + go run ${REPOTOOLS_CMD_EACHMODULE} -p $(subst vet-modules-,,$@) \ + "go vet ${BUILD_TAGS} --all ./..." cover: go test ${BUILD_TAGS} -coverprofile c.out ./... @@ -48,23 +70,22 @@ cover: ################ # Unit Testing # ################ -.PHONY: unit unit-race unit-test unit-race-test +.PHONY: test unit unit-race + +test: unit-race + +unit: verify unit-modules-. -unit: verify - go vet ${BUILD_TAGS} --all ./... && \ - go test ${BUILD_TAGS} ${RUN_NONE} ./... && \ - go test -timeout=1m ${UNIT_TEST_TAGS} ./... +unit-modules-%: + go run ${REPOTOOLS_CMD_EACHMODULE} -p $(subst unit-modules-,,$@) \ + "go test -timeout=1m ${UNIT_TEST_TAGS} ./..." -unit-race: verify - go vet ${BUILD_TAGS} --all ./... && \ - go test ${BUILD_TAGS} ${RUN_NONE} ./... && \ - go test -timeout=1m ${UNIT_TEST_TAGS} -race -cpu=4 ./... +unit-race: verify unit-race-modules-. -unit-test: verify - go test -timeout=1m ${UNIT_TEST_TAGS} ./... +unit-race-modules-%: + go run ${REPOTOOLS_CMD_EACHMODULE} -p $(subst unit-race-modules-,,$@) \ + "go test -timeout=1m ${UNIT_TEST_TAGS} -race -cpu=4 ./..." -unit-race-test: verify - go test -timeout=1m ${UNIT_TEST_TAGS} -race -cpu=4 ./... ##################### # Release Process # diff --git a/vendor/github.com/aws/smithy-go/README.md b/vendor/github.com/aws/smithy-go/README.md index 08df74589a8..a413ff3d87d 100644 --- a/vendor/github.com/aws/smithy-go/README.md +++ b/vendor/github.com/aws/smithy-go/README.md @@ -4,19 +4,21 @@ [Smithy](https://smithy.io/) code generators for Go and the accompanying smithy-go runtime. -The smithy-go runtime requires a minimum version of Go 1.20. +The smithy-go runtime requires a minimum version of Go 1.24. **WARNING: All interfaces are subject to change.** -## Can I use the code generators? +## :no_entry_sign: DO NOT use the code generators in this repository + +**The code generators in this repository do not generate working clients at +this time.** In order to generate a usable smithy client you must provide a [protocol definition](https://github.com/aws/smithy-go/blob/main/codegen/smithy-go-codegen/src/main/java/software/amazon/smithy/go/codegen/integration/ProtocolGenerator.java), such as [AWS restJson1](https://smithy.io/2.0/aws/protocols/aws-restjson1-protocol.html), in order to generate transport mechanisms and serialization/deserialization code ("serde") accordingly. -The code generator does not currently support any protocols out of the box other than the new `smithy.protocols#rpcv2Cbor`, -therefore the useability of this project on its own is currently limited. +The code generator does not currently support any protocols out of the box. Support for all [AWS protocols](https://smithy.io/2.0/aws/protocols/index.html) exists in [aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2). We are tracking the movement of those out of the SDK into smithy-go in @@ -31,6 +33,7 @@ This repository implements the following Smithy build plugins: |----|------------|-------------| | `go-codegen` | `software.amazon.smithy.go:smithy-go-codegen` | Implements Go client code generation for Smithy models. | | `go-server-codegen` | `software.amazon.smithy.go:smithy-go-codegen` | Implements Go server code generation for Smithy models. | +| `go-shape-codegen` | `software.amazon.smithy.go:smithy-go-codegen` | Implements Go shape code generation (types only) for Smithy models. | **NOTE: Build plugins are not currently published to mavenCentral. You must publish to mavenLocal to make the build plugins visible to the Smithy CLI. The artifact version is currently fixed at 0.1.0.** @@ -77,7 +80,7 @@ example created from `smithy init`: "service": "example.weather#Weather", "module": "github.com/example/weather", "generateGoMod": true, - "goDirective": "1.20" + "goDirective": "1.24" } } } @@ -87,6 +90,10 @@ example created from `smithy init`: This plugin is a work-in-progress and is currently undocumented. +## `go-shape-codegen` + +This plugin is a work-in-progress and is currently undocumented. + ## License This project is licensed under the Apache-2.0 License. diff --git a/vendor/github.com/aws/smithy-go/endpoints/endpoint.go b/vendor/github.com/aws/smithy-go/endpoints/endpoint.go index a9352839748..f778272be30 100644 --- a/vendor/github.com/aws/smithy-go/endpoints/endpoint.go +++ b/vendor/github.com/aws/smithy-go/endpoints/endpoint.go @@ -9,7 +9,7 @@ import ( // Endpoint is the endpoint object returned by Endpoint resolution V2 type Endpoint struct { - // The complete URL minimally specfiying the scheme and host. + // The complete URL minimally specifying the scheme and host. // May optionally specify the port and base path component. URI url.URL diff --git a/vendor/github.com/aws/smithy-go/go_module_metadata.go b/vendor/github.com/aws/smithy-go/go_module_metadata.go index a51ceca4ce0..dc9dfd0d86d 100644 --- a/vendor/github.com/aws/smithy-go/go_module_metadata.go +++ b/vendor/github.com/aws/smithy-go/go_module_metadata.go @@ -3,4 +3,4 @@ package smithy // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.22.2" +const goModuleVersion = "1.24.2" diff --git a/vendor/github.com/aws/smithy-go/metrics/nop.go b/vendor/github.com/aws/smithy-go/metrics/nop.go index fb374e1fb85..444126df5a0 100644 --- a/vendor/github.com/aws/smithy-go/metrics/nop.go +++ b/vendor/github.com/aws/smithy-go/metrics/nop.go @@ -9,54 +9,82 @@ var _ MeterProvider = (*NopMeterProvider)(nil) // Meter returns a meter which creates no-op instruments. func (NopMeterProvider) Meter(string, ...MeterOption) Meter { - return nopMeter{} + return NopMeter{} } -type nopMeter struct{} +// NopMeter creates no-op instruments. +type NopMeter struct{} -var _ Meter = (*nopMeter)(nil) +var _ Meter = (*NopMeter)(nil) -func (nopMeter) Int64Counter(string, ...InstrumentOption) (Int64Counter, error) { - return nopInstrument[int64]{}, nil +// Int64Counter creates a no-op instrument. +func (NopMeter) Int64Counter(string, ...InstrumentOption) (Int64Counter, error) { + return nopInstrumentInt64, nil } -func (nopMeter) Int64UpDownCounter(string, ...InstrumentOption) (Int64UpDownCounter, error) { - return nopInstrument[int64]{}, nil + +// Int64UpDownCounter creates a no-op instrument. +func (NopMeter) Int64UpDownCounter(string, ...InstrumentOption) (Int64UpDownCounter, error) { + return nopInstrumentInt64, nil } -func (nopMeter) Int64Gauge(string, ...InstrumentOption) (Int64Gauge, error) { - return nopInstrument[int64]{}, nil + +// Int64Gauge creates a no-op instrument. +func (NopMeter) Int64Gauge(string, ...InstrumentOption) (Int64Gauge, error) { + return nopInstrumentInt64, nil } -func (nopMeter) Int64Histogram(string, ...InstrumentOption) (Int64Histogram, error) { - return nopInstrument[int64]{}, nil + +// Int64Histogram creates a no-op instrument. +func (NopMeter) Int64Histogram(string, ...InstrumentOption) (Int64Histogram, error) { + return nopInstrumentInt64, nil } -func (nopMeter) Int64AsyncCounter(string, Int64Callback, ...InstrumentOption) (AsyncInstrument, error) { - return nopInstrument[int64]{}, nil + +// Int64AsyncCounter creates a no-op instrument. +func (NopMeter) Int64AsyncCounter(string, Int64Callback, ...InstrumentOption) (AsyncInstrument, error) { + return nopInstrumentInt64, nil } -func (nopMeter) Int64AsyncUpDownCounter(string, Int64Callback, ...InstrumentOption) (AsyncInstrument, error) { - return nopInstrument[int64]{}, nil + +// Int64AsyncUpDownCounter creates a no-op instrument. +func (NopMeter) Int64AsyncUpDownCounter(string, Int64Callback, ...InstrumentOption) (AsyncInstrument, error) { + return nopInstrumentInt64, nil } -func (nopMeter) Int64AsyncGauge(string, Int64Callback, ...InstrumentOption) (AsyncInstrument, error) { - return nopInstrument[int64]{}, nil + +// Int64AsyncGauge creates a no-op instrument. +func (NopMeter) Int64AsyncGauge(string, Int64Callback, ...InstrumentOption) (AsyncInstrument, error) { + return nopInstrumentInt64, nil } -func (nopMeter) Float64Counter(string, ...InstrumentOption) (Float64Counter, error) { - return nopInstrument[float64]{}, nil + +// Float64Counter creates a no-op instrument. +func (NopMeter) Float64Counter(string, ...InstrumentOption) (Float64Counter, error) { + return nopInstrumentFloat64, nil } -func (nopMeter) Float64UpDownCounter(string, ...InstrumentOption) (Float64UpDownCounter, error) { - return nopInstrument[float64]{}, nil + +// Float64UpDownCounter creates a no-op instrument. +func (NopMeter) Float64UpDownCounter(string, ...InstrumentOption) (Float64UpDownCounter, error) { + return nopInstrumentFloat64, nil } -func (nopMeter) Float64Gauge(string, ...InstrumentOption) (Float64Gauge, error) { - return nopInstrument[float64]{}, nil + +// Float64Gauge creates a no-op instrument. +func (NopMeter) Float64Gauge(string, ...InstrumentOption) (Float64Gauge, error) { + return nopInstrumentFloat64, nil } -func (nopMeter) Float64Histogram(string, ...InstrumentOption) (Float64Histogram, error) { - return nopInstrument[float64]{}, nil + +// Float64Histogram creates a no-op instrument. +func (NopMeter) Float64Histogram(string, ...InstrumentOption) (Float64Histogram, error) { + return nopInstrumentFloat64, nil } -func (nopMeter) Float64AsyncCounter(string, Float64Callback, ...InstrumentOption) (AsyncInstrument, error) { - return nopInstrument[float64]{}, nil + +// Float64AsyncCounter creates a no-op instrument. +func (NopMeter) Float64AsyncCounter(string, Float64Callback, ...InstrumentOption) (AsyncInstrument, error) { + return nopInstrumentFloat64, nil } -func (nopMeter) Float64AsyncUpDownCounter(string, Float64Callback, ...InstrumentOption) (AsyncInstrument, error) { - return nopInstrument[float64]{}, nil + +// Float64AsyncUpDownCounter creates a no-op instrument. +func (NopMeter) Float64AsyncUpDownCounter(string, Float64Callback, ...InstrumentOption) (AsyncInstrument, error) { + return nopInstrumentFloat64, nil } -func (nopMeter) Float64AsyncGauge(string, Float64Callback, ...InstrumentOption) (AsyncInstrument, error) { - return nopInstrument[float64]{}, nil + +// Float64AsyncGauge creates a no-op instrument. +func (NopMeter) Float64AsyncGauge(string, Float64Callback, ...InstrumentOption) (AsyncInstrument, error) { + return nopInstrumentFloat64, nil } type nopInstrument[N any] struct{} @@ -65,3 +93,6 @@ func (nopInstrument[N]) Add(context.Context, N, ...RecordMetricOption) {} func (nopInstrument[N]) Sample(context.Context, N, ...RecordMetricOption) {} func (nopInstrument[N]) Record(context.Context, N, ...RecordMetricOption) {} func (nopInstrument[_]) Stop() {} + +var nopInstrumentInt64 = nopInstrument[int64]{} +var nopInstrumentFloat64 = nopInstrument[float64]{} diff --git a/vendor/github.com/aws/smithy-go/middleware/eventstream_middleware.go b/vendor/github.com/aws/smithy-go/middleware/eventstream_middleware.go new file mode 100644 index 00000000000..ce523d98a30 --- /dev/null +++ b/vendor/github.com/aws/smithy-go/middleware/eventstream_middleware.go @@ -0,0 +1,21 @@ +package middleware + +type eventStreamOutputKey struct{} + +func AddEventStreamOutputToMetadata(metadata *Metadata, output any) { + metadata.Set(eventStreamOutputKey{}, output) +} + +func GetEventStreamOutputToMetadata[T any](metadata *Metadata) (*T, bool) { + val := metadata.Get(eventStreamOutputKey{}) + // not found + if val == nil { + return nil, false + } + // wrong type + res, ok := val.(*T) + if !ok { + return nil, false + } + return res, true +} diff --git a/vendor/github.com/aws/smithy-go/middleware/ordered_group.go b/vendor/github.com/aws/smithy-go/middleware/ordered_group.go index 4b195308c59..daf90136e96 100644 --- a/vendor/github.com/aws/smithy-go/middleware/ordered_group.go +++ b/vendor/github.com/aws/smithy-go/middleware/ordered_group.go @@ -23,12 +23,14 @@ type orderedIDs struct { items map[string]ider } -const baseOrderedItems = 5 +// selected based on the general upper bound of # of middlewares in each step +// in the downstream aws-sdk-go-v2 +const baseOrderedItems = 8 -func newOrderedIDs() *orderedIDs { +func newOrderedIDs(cap int) *orderedIDs { return &orderedIDs{ - order: newRelativeOrder(), - items: make(map[string]ider, baseOrderedItems), + order: newRelativeOrder(cap), + items: make(map[string]ider, cap), } } @@ -141,9 +143,9 @@ type relativeOrder struct { order []string } -func newRelativeOrder() *relativeOrder { +func newRelativeOrder(cap int) *relativeOrder { return &relativeOrder{ - order: make([]string, 0, baseOrderedItems), + order: make([]string, 0, cap), } } diff --git a/vendor/github.com/aws/smithy-go/middleware/step_build.go b/vendor/github.com/aws/smithy-go/middleware/step_build.go index 7e1d94caeef..db8c26715cb 100644 --- a/vendor/github.com/aws/smithy-go/middleware/step_build.go +++ b/vendor/github.com/aws/smithy-go/middleware/step_build.go @@ -1,7 +1,9 @@ +// Code generated by smithy-go/middleware/generate.go DO NOT EDIT. package middleware import ( "context" + "fmt" ) // BuildInput provides the input parameters for the BuildMiddleware to consume. @@ -25,14 +27,14 @@ type BuildHandler interface { } // BuildMiddleware provides the interface for middleware specific to the -// serialize step. Delegates to the next BuildHandler for further +// build step. Delegates to the next BuildHandler for further // processing. type BuildMiddleware interface { - // Unique ID for the middleware in theBuildStep. The step does not allow - // duplicate IDs. + // ID returns a unique ID for the middleware in the BuildStep. The step does not + // allow duplicate IDs. ID() string - // Invokes the middleware behavior which must delegate to the next handler + // HandleBuild invokes the middleware behavior which must delegate to the next handler // for the middleware chain to continue. The method must return a result or // error to its caller. HandleBuild(ctx context.Context, in BuildInput, next BuildHandler) ( @@ -54,7 +56,9 @@ type buildMiddlewareFunc struct { id string // Middleware function to be called. - fn func(context.Context, BuildInput, BuildHandler) (BuildOutput, Metadata, error) + fn func(context.Context, BuildInput, BuildHandler) ( + BuildOutput, Metadata, error, + ) } // ID returns the unique ID for the middleware. @@ -69,23 +73,22 @@ func (s buildMiddlewareFunc) HandleBuild(ctx context.Context, in BuildInput, nex var _ BuildMiddleware = (buildMiddlewareFunc{}) -// BuildStep provides the ordered grouping of BuildMiddleware to be invoked on -// a handler. +// BuildStep provides the ordered grouping of BuildMiddleware to be +// invoked on a handler. type BuildStep struct { - ids *orderedIDs + head *decoratedBuildHandler + tail *decoratedBuildHandler } -// NewBuildStep returns a BuildStep ready to have middleware for -// initialization added to it. +// NewBuildStep returns an BuildStep ready to have middleware for +// build added to it. func NewBuildStep() *BuildStep { - return &BuildStep{ - ids: newOrderedIDs(), - } + return &BuildStep{} } var _ Middleware = (*BuildStep)(nil) -// ID returns the unique name of the step as a middleware. +// ID returns the unique ID of the step as a middleware. func (s *BuildStep) ID() string { return "Build stack step" } @@ -97,77 +100,161 @@ func (s *BuildStep) ID() string { func (s *BuildStep) HandleMiddleware(ctx context.Context, in interface{}, next Handler) ( out interface{}, metadata Metadata, err error, ) { - order := s.ids.GetOrder() - - var h BuildHandler = buildWrapHandler{Next: next} - for i := len(order) - 1; i >= 0; i-- { - h = decoratedBuildHandler{ - Next: h, - With: order[i].(BuildMiddleware), - } - } - sIn := BuildInput{ Request: in, } - res, metadata, err := h.HandleBuild(ctx, sIn) + wh := &buildWrapHandler{next} + if s.head == nil { + res, metadata, err := wh.HandleBuild(ctx, sIn) + return res.Result, metadata, err + } + + s.tail.Next = wh + res, metadata, err := s.head.HandleBuild(ctx, sIn) return res.Result, metadata, err } // Get retrieves the middleware identified by id. If the middleware is not present, returns false. func (s *BuildStep) Get(id string) (BuildMiddleware, bool) { - get, ok := s.ids.Get(id) - if !ok { + found, _ := s.get(id) + if found == nil { return nil, false } - return get.(BuildMiddleware), ok + + return found.With, true } // Add injects the middleware to the relative position of the middleware group. -// Returns an error if the middleware already exists. +// +// Add never returns an error. It used to for duplicate phases but this +// behavior has since been removed as part of a performance optimization. The +// return value from Add can be ignored. func (s *BuildStep) Add(m BuildMiddleware, pos RelativePosition) error { - return s.ids.Add(m, pos) + if s.head == nil { + s.head = &decoratedBuildHandler{nil, m} + s.tail = s.head + return nil + } + + if pos == Before { + s.head = &decoratedBuildHandler{s.head, m} + } else { + tail := &decoratedBuildHandler{nil, m} + s.tail.Next = tail + s.tail = tail + } + + return nil } -// Insert injects the middleware relative to an existing middleware id. -// Returns an error if the original middleware does not exist, or the middleware +// Insert injects the middleware relative to an existing middleware ID. +// Returns error if the original middleware does not exist, or the middleware // being added already exists. func (s *BuildStep) Insert(m BuildMiddleware, relativeTo string, pos RelativePosition) error { - return s.ids.Insert(m, relativeTo, pos) + found, prev := s.get(relativeTo) + if found == nil { + return fmt.Errorf("not found: %s", m.ID()) + } + + if pos == Before { + if prev == nil { // at the front + s.head = &decoratedBuildHandler{s.head, m} + } else { // somewhere in the middle + prev.Next = &decoratedBuildHandler{found, m} + } + } else { + if found.Next == nil { // at the end + tail := &decoratedBuildHandler{nil, m} + s.tail.Next = tail + s.tail = tail + } else { // somewhere in the middle + found.Next = &decoratedBuildHandler{found.Next, m} + } + } + + return nil } // Swap removes the middleware by id, replacing it with the new middleware. -// Returns the middleware removed, or an error if the middleware to be removed +// Returns the middleware removed, or error if the middleware to be removed // doesn't exist. func (s *BuildStep) Swap(id string, m BuildMiddleware) (BuildMiddleware, error) { - removed, err := s.ids.Swap(id, m) - if err != nil { - return nil, err + found, _ := s.get(id) + if found == nil { + return nil, fmt.Errorf("not found: %s", m.ID()) } - return removed.(BuildMiddleware), nil + swapped := found.With + found.With = m + return swapped, nil } // Remove removes the middleware by id. Returns error if the middleware // doesn't exist. func (s *BuildStep) Remove(id string) (BuildMiddleware, error) { - removed, err := s.ids.Remove(id) - if err != nil { - return nil, err + found, prev := s.get(id) + if found == nil { + return nil, fmt.Errorf("not found: %s", id) } - return removed.(BuildMiddleware), nil + if s.head == s.tail { // it's the only one + s.head = nil + s.tail = nil + } else if found == s.head { // at the front + s.head = s.head.Next.(*decoratedBuildHandler) + } else if found == s.tail { // at the end + prev.Next = nil + s.tail = prev + } else { + prev.Next = found.Next // somewhere in the middle + } + + return found.With, nil } // List returns a list of the middleware in the step. func (s *BuildStep) List() []string { - return s.ids.List() + var ids []string + for h := s.head; h != nil; { + ids = append(ids, h.With.ID()) + if h.Next == nil { + break + } + + // once executed, tail.Next of the list will be set to an + // *buildWrapHandler, make sure to check for that + if hnext, ok := h.Next.(*decoratedBuildHandler); ok { + h = hnext + } else { + break + } + } + return ids } // Clear removes all middleware in the step. func (s *BuildStep) Clear() { - s.ids.Clear() + s.head = nil + s.tail = nil +} + +func (s *BuildStep) get(id string) (found, prev *decoratedBuildHandler) { + for h := s.head; h != nil; { + if h.With.ID() == id { + found = h + return + } + prev = h + if h.Next == nil { + return + } + + // once executed, tail.Next of the list will be set to an + // *buildWrapHandler + h, _ = h.Next.(*decoratedBuildHandler) + } + return } type buildWrapHandler struct { @@ -176,7 +263,7 @@ type buildWrapHandler struct { var _ BuildHandler = (*buildWrapHandler)(nil) -// Implements BuildHandler, converts types and delegates to underlying +// HandleBuild implements BuildHandler, converts types and delegates to underlying // generic handler. func (w buildWrapHandler) HandleBuild(ctx context.Context, in BuildInput) ( out BuildOutput, metadata Metadata, err error, @@ -200,12 +287,12 @@ func (h decoratedBuildHandler) HandleBuild(ctx context.Context, in BuildInput) ( return h.With.HandleBuild(ctx, in, h.Next) } -// BuildHandlerFunc provides a wrapper around a function to be used as a build middleware handler. +// BuildHandlerFunc provides a wrapper around a function to be used as buildMiddleware. type BuildHandlerFunc func(context.Context, BuildInput) (BuildOutput, Metadata, error) -// HandleBuild invokes the wrapped function with the provided arguments. -func (b BuildHandlerFunc) HandleBuild(ctx context.Context, in BuildInput) (BuildOutput, Metadata, error) { - return b(ctx, in) +// HandleBuild calls the wrapped function with the provided arguments. +func (f BuildHandlerFunc) HandleBuild(ctx context.Context, in BuildInput) (BuildOutput, Metadata, error) { + return f(ctx, in) } var _ BuildHandler = BuildHandlerFunc(nil) diff --git a/vendor/github.com/aws/smithy-go/middleware/step_deserialize.go b/vendor/github.com/aws/smithy-go/middleware/step_deserialize.go index 44860721571..1f337f2dbc9 100644 --- a/vendor/github.com/aws/smithy-go/middleware/step_deserialize.go +++ b/vendor/github.com/aws/smithy-go/middleware/step_deserialize.go @@ -1,7 +1,9 @@ +// Code generated by smithy-go/middleware/generate.go DO NOT EDIT. package middleware import ( "context" + "fmt" ) // DeserializeInput provides the input parameters for the DeserializeInput to @@ -11,10 +13,7 @@ type DeserializeInput struct { Request interface{} } -// DeserializeOutput provides the result returned by the next -// DeserializeHandler. The DeserializeMiddleware should deserialize the -// RawResponse into a Result that can be consumed by middleware higher up in -// the stack. +// DeserializeOutput provides the result returned by the next DeserializeHandler. type DeserializeOutput struct { RawResponse interface{} Result interface{} @@ -29,7 +28,7 @@ type DeserializeHandler interface { } // DeserializeMiddleware provides the interface for middleware specific to the -// serialize step. Delegates to the next DeserializeHandler for further +// deserialize step. Delegates to the next DeserializeHandler for further // processing. type DeserializeMiddleware interface { // ID returns a unique ID for the middleware in the DeserializeStep. The step does not @@ -44,8 +43,8 @@ type DeserializeMiddleware interface { ) } -// DeserializeMiddlewareFunc returns a DeserializeMiddleware with the unique ID -// provided, and the func to be invoked. +// DeserializeMiddlewareFunc returns a DeserializeMiddleware with the unique ID provided, +// and the func to be invoked. func DeserializeMiddlewareFunc(id string, fn func(context.Context, DeserializeInput, DeserializeHandler) (DeserializeOutput, Metadata, error)) DeserializeMiddleware { return deserializeMiddlewareFunc{ id: id, @@ -78,15 +77,14 @@ var _ DeserializeMiddleware = (deserializeMiddlewareFunc{}) // DeserializeStep provides the ordered grouping of DeserializeMiddleware to be // invoked on a handler. type DeserializeStep struct { - ids *orderedIDs + head *decoratedDeserializeHandler + tail *decoratedDeserializeHandler } -// NewDeserializeStep returns a DeserializeStep ready to have middleware for -// initialization added to it. +// NewDeserializeStep returns an DeserializeStep ready to have middleware for +// deserialize added to it. func NewDeserializeStep() *DeserializeStep { - return &DeserializeStep{ - ids: newOrderedIDs(), - } + return &DeserializeStep{} } var _ Middleware = (*DeserializeStep)(nil) @@ -103,77 +101,161 @@ func (s *DeserializeStep) ID() string { func (s *DeserializeStep) HandleMiddleware(ctx context.Context, in interface{}, next Handler) ( out interface{}, metadata Metadata, err error, ) { - order := s.ids.GetOrder() - - var h DeserializeHandler = deserializeWrapHandler{Next: next} - for i := len(order) - 1; i >= 0; i-- { - h = decoratedDeserializeHandler{ - Next: h, - With: order[i].(DeserializeMiddleware), - } - } - sIn := DeserializeInput{ Request: in, } - res, metadata, err := h.HandleDeserialize(ctx, sIn) + wh := &deserializeWrapHandler{next} + if s.head == nil { + res, metadata, err := wh.HandleDeserialize(ctx, sIn) + return res.Result, metadata, err + } + + s.tail.Next = wh + res, metadata, err := s.head.HandleDeserialize(ctx, sIn) return res.Result, metadata, err } // Get retrieves the middleware identified by id. If the middleware is not present, returns false. func (s *DeserializeStep) Get(id string) (DeserializeMiddleware, bool) { - get, ok := s.ids.Get(id) - if !ok { + found, _ := s.get(id) + if found == nil { return nil, false } - return get.(DeserializeMiddleware), ok + + return found.With, true } // Add injects the middleware to the relative position of the middleware group. -// Returns an error if the middleware already exists. +// +// Add never returns an error. It used to for duplicate phases but this +// behavior has since been removed as part of a performance optimization. The +// return value from Add can be ignored. func (s *DeserializeStep) Add(m DeserializeMiddleware, pos RelativePosition) error { - return s.ids.Add(m, pos) + if s.head == nil { + s.head = &decoratedDeserializeHandler{nil, m} + s.tail = s.head + return nil + } + + if pos == Before { + s.head = &decoratedDeserializeHandler{s.head, m} + } else { + tail := &decoratedDeserializeHandler{nil, m} + s.tail.Next = tail + s.tail = tail + } + + return nil } // Insert injects the middleware relative to an existing middleware ID. // Returns error if the original middleware does not exist, or the middleware // being added already exists. func (s *DeserializeStep) Insert(m DeserializeMiddleware, relativeTo string, pos RelativePosition) error { - return s.ids.Insert(m, relativeTo, pos) + found, prev := s.get(relativeTo) + if found == nil { + return fmt.Errorf("not found: %s", m.ID()) + } + + if pos == Before { + if prev == nil { // at the front + s.head = &decoratedDeserializeHandler{s.head, m} + } else { // somewhere in the middle + prev.Next = &decoratedDeserializeHandler{found, m} + } + } else { + if found.Next == nil { // at the end + tail := &decoratedDeserializeHandler{nil, m} + s.tail.Next = tail + s.tail = tail + } else { // somewhere in the middle + found.Next = &decoratedDeserializeHandler{found.Next, m} + } + } + + return nil } // Swap removes the middleware by id, replacing it with the new middleware. // Returns the middleware removed, or error if the middleware to be removed // doesn't exist. func (s *DeserializeStep) Swap(id string, m DeserializeMiddleware) (DeserializeMiddleware, error) { - removed, err := s.ids.Swap(id, m) - if err != nil { - return nil, err + found, _ := s.get(id) + if found == nil { + return nil, fmt.Errorf("not found: %s", m.ID()) } - return removed.(DeserializeMiddleware), nil + swapped := found.With + found.With = m + return swapped, nil } // Remove removes the middleware by id. Returns error if the middleware // doesn't exist. func (s *DeserializeStep) Remove(id string) (DeserializeMiddleware, error) { - removed, err := s.ids.Remove(id) - if err != nil { - return nil, err + found, prev := s.get(id) + if found == nil { + return nil, fmt.Errorf("not found: %s", id) + } + + if s.head == s.tail { // it's the only one + s.head = nil + s.tail = nil + } else if found == s.head { // at the front + s.head = s.head.Next.(*decoratedDeserializeHandler) + } else if found == s.tail { // at the end + prev.Next = nil + s.tail = prev + } else { + prev.Next = found.Next // somewhere in the middle } - return removed.(DeserializeMiddleware), nil + return found.With, nil } // List returns a list of the middleware in the step. func (s *DeserializeStep) List() []string { - return s.ids.List() + var ids []string + for h := s.head; h != nil; { + ids = append(ids, h.With.ID()) + if h.Next == nil { + break + } + + // once executed, tail.Next of the list will be set to an + // *deserializeWrapHandler, make sure to check for that + if hnext, ok := h.Next.(*decoratedDeserializeHandler); ok { + h = hnext + } else { + break + } + } + return ids } // Clear removes all middleware in the step. func (s *DeserializeStep) Clear() { - s.ids.Clear() + s.head = nil + s.tail = nil +} + +func (s *DeserializeStep) get(id string) (found, prev *decoratedDeserializeHandler) { + for h := s.head; h != nil; { + if h.With.ID() == id { + found = h + return + } + prev = h + if h.Next == nil { + return + } + + // once executed, tail.Next of the list will be set to an + // *deserializeWrapHandler + h, _ = h.Next.(*decoratedDeserializeHandler) + } + return } type deserializeWrapHandler struct { @@ -187,9 +269,10 @@ var _ DeserializeHandler = (*deserializeWrapHandler)(nil) func (w deserializeWrapHandler) HandleDeserialize(ctx context.Context, in DeserializeInput) ( out DeserializeOutput, metadata Metadata, err error, ) { - resp, metadata, err := w.Next.Handle(ctx, in.Request) + res, metadata, err := w.Next.Handle(ctx, in.Request) return DeserializeOutput{ - RawResponse: resp, + RawResponse: res, + Result: nil, }, metadata, err } @@ -206,12 +289,12 @@ func (h decoratedDeserializeHandler) HandleDeserialize(ctx context.Context, in D return h.With.HandleDeserialize(ctx, in, h.Next) } -// DeserializeHandlerFunc provides a wrapper around a function to be used as a deserialize middleware handler. +// DeserializeHandlerFunc provides a wrapper around a function to be used as deserializeMiddleware. type DeserializeHandlerFunc func(context.Context, DeserializeInput) (DeserializeOutput, Metadata, error) -// HandleDeserialize invokes the wrapped function with the given arguments. -func (d DeserializeHandlerFunc) HandleDeserialize(ctx context.Context, in DeserializeInput) (DeserializeOutput, Metadata, error) { - return d(ctx, in) +// HandleDeserialize calls the wrapped function with the provided arguments. +func (f DeserializeHandlerFunc) HandleDeserialize(ctx context.Context, in DeserializeInput) (DeserializeOutput, Metadata, error) { + return f(ctx, in) } var _ DeserializeHandler = DeserializeHandlerFunc(nil) diff --git a/vendor/github.com/aws/smithy-go/middleware/step_finalize.go b/vendor/github.com/aws/smithy-go/middleware/step_finalize.go index 065e3885de9..1a0ad9fb88b 100644 --- a/vendor/github.com/aws/smithy-go/middleware/step_finalize.go +++ b/vendor/github.com/aws/smithy-go/middleware/step_finalize.go @@ -1,6 +1,10 @@ +// Code generated by smithy-go/middleware/generate.go DO NOT EDIT. package middleware -import "context" +import ( + "context" + "fmt" +) // FinalizeInput provides the input parameters for the FinalizeMiddleware to // consume. FinalizeMiddleware may modify the Request value before forwarding @@ -23,7 +27,7 @@ type FinalizeHandler interface { } // FinalizeMiddleware provides the interface for middleware specific to the -// serialize step. Delegates to the next FinalizeHandler for further +// finalize step. Delegates to the next FinalizeHandler for further // processing. type FinalizeMiddleware interface { // ID returns a unique ID for the middleware in the FinalizeStep. The step does not @@ -38,8 +42,8 @@ type FinalizeMiddleware interface { ) } -// FinalizeMiddlewareFunc returns a FinalizeMiddleware with the unique ID -// provided, and the func to be invoked. +// FinalizeMiddlewareFunc returns a FinalizeMiddleware with the unique ID provided, +// and the func to be invoked. func FinalizeMiddlewareFunc(id string, fn func(context.Context, FinalizeInput, FinalizeHandler) (FinalizeOutput, Metadata, error)) FinalizeMiddleware { return finalizeMiddlewareFunc{ id: id, @@ -72,20 +76,19 @@ var _ FinalizeMiddleware = (finalizeMiddlewareFunc{}) // FinalizeStep provides the ordered grouping of FinalizeMiddleware to be // invoked on a handler. type FinalizeStep struct { - ids *orderedIDs + head *decoratedFinalizeHandler + tail *decoratedFinalizeHandler } -// NewFinalizeStep returns a FinalizeStep ready to have middleware for -// initialization added to it. +// NewFinalizeStep returns an FinalizeStep ready to have middleware for +// finalize added to it. func NewFinalizeStep() *FinalizeStep { - return &FinalizeStep{ - ids: newOrderedIDs(), - } + return &FinalizeStep{} } var _ Middleware = (*FinalizeStep)(nil) -// ID returns the unique id of the step as a middleware. +// ID returns the unique ID of the step as a middleware. func (s *FinalizeStep) ID() string { return "Finalize stack step" } @@ -97,77 +100,161 @@ func (s *FinalizeStep) ID() string { func (s *FinalizeStep) HandleMiddleware(ctx context.Context, in interface{}, next Handler) ( out interface{}, metadata Metadata, err error, ) { - order := s.ids.GetOrder() - - var h FinalizeHandler = finalizeWrapHandler{Next: next} - for i := len(order) - 1; i >= 0; i-- { - h = decoratedFinalizeHandler{ - Next: h, - With: order[i].(FinalizeMiddleware), - } - } - sIn := FinalizeInput{ Request: in, } - res, metadata, err := h.HandleFinalize(ctx, sIn) + wh := &finalizeWrapHandler{next} + if s.head == nil { + res, metadata, err := wh.HandleFinalize(ctx, sIn) + return res.Result, metadata, err + } + + s.tail.Next = wh + res, metadata, err := s.head.HandleFinalize(ctx, sIn) return res.Result, metadata, err } // Get retrieves the middleware identified by id. If the middleware is not present, returns false. func (s *FinalizeStep) Get(id string) (FinalizeMiddleware, bool) { - get, ok := s.ids.Get(id) - if !ok { + found, _ := s.get(id) + if found == nil { return nil, false } - return get.(FinalizeMiddleware), ok + + return found.With, true } // Add injects the middleware to the relative position of the middleware group. -// Returns an error if the middleware already exists. +// +// Add never returns an error. It used to for duplicate phases but this +// behavior has since been removed as part of a performance optimization. The +// return value from Add can be ignored. func (s *FinalizeStep) Add(m FinalizeMiddleware, pos RelativePosition) error { - return s.ids.Add(m, pos) + if s.head == nil { + s.head = &decoratedFinalizeHandler{nil, m} + s.tail = s.head + return nil + } + + if pos == Before { + s.head = &decoratedFinalizeHandler{s.head, m} + } else { + tail := &decoratedFinalizeHandler{nil, m} + s.tail.Next = tail + s.tail = tail + } + + return nil } // Insert injects the middleware relative to an existing middleware ID. // Returns error if the original middleware does not exist, or the middleware // being added already exists. func (s *FinalizeStep) Insert(m FinalizeMiddleware, relativeTo string, pos RelativePosition) error { - return s.ids.Insert(m, relativeTo, pos) + found, prev := s.get(relativeTo) + if found == nil { + return fmt.Errorf("not found: %s", m.ID()) + } + + if pos == Before { + if prev == nil { // at the front + s.head = &decoratedFinalizeHandler{s.head, m} + } else { // somewhere in the middle + prev.Next = &decoratedFinalizeHandler{found, m} + } + } else { + if found.Next == nil { // at the end + tail := &decoratedFinalizeHandler{nil, m} + s.tail.Next = tail + s.tail = tail + } else { // somewhere in the middle + found.Next = &decoratedFinalizeHandler{found.Next, m} + } + } + + return nil } // Swap removes the middleware by id, replacing it with the new middleware. // Returns the middleware removed, or error if the middleware to be removed // doesn't exist. func (s *FinalizeStep) Swap(id string, m FinalizeMiddleware) (FinalizeMiddleware, error) { - removed, err := s.ids.Swap(id, m) - if err != nil { - return nil, err + found, _ := s.get(id) + if found == nil { + return nil, fmt.Errorf("not found: %s", m.ID()) } - return removed.(FinalizeMiddleware), nil + swapped := found.With + found.With = m + return swapped, nil } // Remove removes the middleware by id. Returns error if the middleware // doesn't exist. func (s *FinalizeStep) Remove(id string) (FinalizeMiddleware, error) { - removed, err := s.ids.Remove(id) - if err != nil { - return nil, err + found, prev := s.get(id) + if found == nil { + return nil, fmt.Errorf("not found: %s", id) + } + + if s.head == s.tail { // it's the only one + s.head = nil + s.tail = nil + } else if found == s.head { // at the front + s.head = s.head.Next.(*decoratedFinalizeHandler) + } else if found == s.tail { // at the end + prev.Next = nil + s.tail = prev + } else { + prev.Next = found.Next // somewhere in the middle } - return removed.(FinalizeMiddleware), nil + return found.With, nil } // List returns a list of the middleware in the step. func (s *FinalizeStep) List() []string { - return s.ids.List() + var ids []string + for h := s.head; h != nil; { + ids = append(ids, h.With.ID()) + if h.Next == nil { + break + } + + // once executed, tail.Next of the list will be set to an + // *finalizeWrapHandler, make sure to check for that + if hnext, ok := h.Next.(*decoratedFinalizeHandler); ok { + h = hnext + } else { + break + } + } + return ids } // Clear removes all middleware in the step. func (s *FinalizeStep) Clear() { - s.ids.Clear() + s.head = nil + s.tail = nil +} + +func (s *FinalizeStep) get(id string) (found, prev *decoratedFinalizeHandler) { + for h := s.head; h != nil; { + if h.With.ID() == id { + found = h + return + } + prev = h + if h.Next == nil { + return + } + + // once executed, tail.Next of the list will be set to an + // *finalizeWrapHandler + h, _ = h.Next.(*decoratedFinalizeHandler) + } + return } type finalizeWrapHandler struct { @@ -200,10 +287,10 @@ func (h decoratedFinalizeHandler) HandleFinalize(ctx context.Context, in Finaliz return h.With.HandleFinalize(ctx, in, h.Next) } -// FinalizeHandlerFunc provides a wrapper around a function to be used as a finalize middleware handler. +// FinalizeHandlerFunc provides a wrapper around a function to be used as finalizeMiddleware. type FinalizeHandlerFunc func(context.Context, FinalizeInput) (FinalizeOutput, Metadata, error) -// HandleFinalize invokes the wrapped function with the given arguments. +// HandleFinalize calls the wrapped function with the provided arguments. func (f FinalizeHandlerFunc) HandleFinalize(ctx context.Context, in FinalizeInput) (FinalizeOutput, Metadata, error) { return f(ctx, in) } diff --git a/vendor/github.com/aws/smithy-go/middleware/step_initialize.go b/vendor/github.com/aws/smithy-go/middleware/step_initialize.go index fe359144d24..446f3b7bb9c 100644 --- a/vendor/github.com/aws/smithy-go/middleware/step_initialize.go +++ b/vendor/github.com/aws/smithy-go/middleware/step_initialize.go @@ -1,10 +1,15 @@ +// Code generated by smithy-go/middleware/generate.go DO NOT EDIT. package middleware -import "context" +import ( + "context" + "fmt" +) // InitializeInput wraps the input parameters for the InitializeMiddlewares to // consume. InitializeMiddleware may modify the parameter value before // forwarding it along to the next InitializeHandler. + type InitializeInput struct { Parameters interface{} } @@ -72,15 +77,14 @@ var _ InitializeMiddleware = (initializeMiddlewareFunc{}) // InitializeStep provides the ordered grouping of InitializeMiddleware to be // invoked on a handler. type InitializeStep struct { - ids *orderedIDs + head *decoratedInitializeHandler + tail *decoratedInitializeHandler } // NewInitializeStep returns an InitializeStep ready to have middleware for -// initialization added to it. +// initialize added to it. func NewInitializeStep() *InitializeStep { - return &InitializeStep{ - ids: newOrderedIDs(), - } + return &InitializeStep{} } var _ Middleware = (*InitializeStep)(nil) @@ -97,77 +101,161 @@ func (s *InitializeStep) ID() string { func (s *InitializeStep) HandleMiddleware(ctx context.Context, in interface{}, next Handler) ( out interface{}, metadata Metadata, err error, ) { - order := s.ids.GetOrder() - - var h InitializeHandler = initializeWrapHandler{Next: next} - for i := len(order) - 1; i >= 0; i-- { - h = decoratedInitializeHandler{ - Next: h, - With: order[i].(InitializeMiddleware), - } - } - sIn := InitializeInput{ Parameters: in, } - res, metadata, err := h.HandleInitialize(ctx, sIn) + wh := &initializeWrapHandler{next} + if s.head == nil { + res, metadata, err := wh.HandleInitialize(ctx, sIn) + return res.Result, metadata, err + } + + s.tail.Next = wh + res, metadata, err := s.head.HandleInitialize(ctx, sIn) return res.Result, metadata, err } // Get retrieves the middleware identified by id. If the middleware is not present, returns false. func (s *InitializeStep) Get(id string) (InitializeMiddleware, bool) { - get, ok := s.ids.Get(id) - if !ok { + found, _ := s.get(id) + if found == nil { return nil, false } - return get.(InitializeMiddleware), ok + + return found.With, true } // Add injects the middleware to the relative position of the middleware group. -// Returns an error if the middleware already exists. +// +// Add never returns an error. It used to for duplicate phases but this +// behavior has since been removed as part of a performance optimization. The +// return value from Add can be ignored. func (s *InitializeStep) Add(m InitializeMiddleware, pos RelativePosition) error { - return s.ids.Add(m, pos) + if s.head == nil { + s.head = &decoratedInitializeHandler{nil, m} + s.tail = s.head + return nil + } + + if pos == Before { + s.head = &decoratedInitializeHandler{s.head, m} + } else { + tail := &decoratedInitializeHandler{nil, m} + s.tail.Next = tail + s.tail = tail + } + + return nil } // Insert injects the middleware relative to an existing middleware ID. // Returns error if the original middleware does not exist, or the middleware // being added already exists. func (s *InitializeStep) Insert(m InitializeMiddleware, relativeTo string, pos RelativePosition) error { - return s.ids.Insert(m, relativeTo, pos) + found, prev := s.get(relativeTo) + if found == nil { + return fmt.Errorf("not found: %s", m.ID()) + } + + if pos == Before { + if prev == nil { // at the front + s.head = &decoratedInitializeHandler{s.head, m} + } else { // somewhere in the middle + prev.Next = &decoratedInitializeHandler{found, m} + } + } else { + if found.Next == nil { // at the end + tail := &decoratedInitializeHandler{nil, m} + s.tail.Next = tail + s.tail = tail + } else { // somewhere in the middle + found.Next = &decoratedInitializeHandler{found.Next, m} + } + } + + return nil } // Swap removes the middleware by id, replacing it with the new middleware. // Returns the middleware removed, or error if the middleware to be removed // doesn't exist. func (s *InitializeStep) Swap(id string, m InitializeMiddleware) (InitializeMiddleware, error) { - removed, err := s.ids.Swap(id, m) - if err != nil { - return nil, err + found, _ := s.get(id) + if found == nil { + return nil, fmt.Errorf("not found: %s", m.ID()) } - return removed.(InitializeMiddleware), nil + swapped := found.With + found.With = m + return swapped, nil } // Remove removes the middleware by id. Returns error if the middleware // doesn't exist. func (s *InitializeStep) Remove(id string) (InitializeMiddleware, error) { - removed, err := s.ids.Remove(id) - if err != nil { - return nil, err + found, prev := s.get(id) + if found == nil { + return nil, fmt.Errorf("not found: %s", id) } - return removed.(InitializeMiddleware), nil + if s.head == s.tail { // it's the only one + s.head = nil + s.tail = nil + } else if found == s.head { // at the front + s.head = s.head.Next.(*decoratedInitializeHandler) + } else if found == s.tail { // at the end + prev.Next = nil + s.tail = prev + } else { + prev.Next = found.Next // somewhere in the middle + } + + return found.With, nil } // List returns a list of the middleware in the step. func (s *InitializeStep) List() []string { - return s.ids.List() + var ids []string + for h := s.head; h != nil; { + ids = append(ids, h.With.ID()) + if h.Next == nil { + break + } + + // once executed, tail.Next of the list will be set to an + // *initializeWrapHandler, make sure to check for that + if hnext, ok := h.Next.(*decoratedInitializeHandler); ok { + h = hnext + } else { + break + } + } + return ids } // Clear removes all middleware in the step. func (s *InitializeStep) Clear() { - s.ids.Clear() + s.head = nil + s.tail = nil +} + +func (s *InitializeStep) get(id string) (found, prev *decoratedInitializeHandler) { + for h := s.head; h != nil; { + if h.With.ID() == id { + found = h + return + } + prev = h + if h.Next == nil { + return + } + + // once executed, tail.Next of the list will be set to an + // *initializeWrapHandler + h, _ = h.Next.(*decoratedInitializeHandler) + } + return } type initializeWrapHandler struct { @@ -200,12 +288,12 @@ func (h decoratedInitializeHandler) HandleInitialize(ctx context.Context, in Ini return h.With.HandleInitialize(ctx, in, h.Next) } -// InitializeHandlerFunc provides a wrapper around a function to be used as an initialize middleware handler. +// InitializeHandlerFunc provides a wrapper around a function to be used as initializeMiddleware. type InitializeHandlerFunc func(context.Context, InitializeInput) (InitializeOutput, Metadata, error) // HandleInitialize calls the wrapped function with the provided arguments. -func (i InitializeHandlerFunc) HandleInitialize(ctx context.Context, in InitializeInput) (InitializeOutput, Metadata, error) { - return i(ctx, in) +func (f InitializeHandlerFunc) HandleInitialize(ctx context.Context, in InitializeInput) (InitializeOutput, Metadata, error) { + return f(ctx, in) } var _ InitializeHandler = InitializeHandlerFunc(nil) diff --git a/vendor/github.com/aws/smithy-go/middleware/step_serialize.go b/vendor/github.com/aws/smithy-go/middleware/step_serialize.go index 114bafcedea..942ebb4f3e7 100644 --- a/vendor/github.com/aws/smithy-go/middleware/step_serialize.go +++ b/vendor/github.com/aws/smithy-go/middleware/step_serialize.go @@ -1,6 +1,10 @@ +// Code generated by smithy-go/middleware/generate.go DO NOT EDIT. package middleware -import "context" +import ( + "context" + "fmt" +) // SerializeInput provides the input parameters for the SerializeMiddleware to // consume. SerializeMiddleware may modify the Request value before forwarding @@ -41,8 +45,8 @@ type SerializeMiddleware interface { ) } -// SerializeMiddlewareFunc returns a SerializeMiddleware with the unique ID -// provided, and the func to be invoked. +// SerializeMiddlewareFunc returns a SerializeMiddleware with the unique ID provided, +// and the func to be invoked. func SerializeMiddlewareFunc(id string, fn func(context.Context, SerializeInput, SerializeHandler) (SerializeOutput, Metadata, error)) SerializeMiddleware { return serializeMiddlewareFunc{ id: id, @@ -75,17 +79,15 @@ var _ SerializeMiddleware = (serializeMiddlewareFunc{}) // SerializeStep provides the ordered grouping of SerializeMiddleware to be // invoked on a handler. type SerializeStep struct { + head *decoratedSerializeHandler + tail *decoratedSerializeHandler newRequest func() interface{} - ids *orderedIDs } -// NewSerializeStep returns a SerializeStep ready to have middleware for -// initialization added to it. The newRequest func parameter is used to -// initialize the transport specific request for the stack SerializeStep to -// serialize the input parameters into. +// NewSerializeStep returns an SerializeStep ready to have middleware for +// serialize added to it. func NewSerializeStep(newRequest func() interface{}) *SerializeStep { return &SerializeStep{ - ids: newOrderedIDs(), newRequest: newRequest, } } @@ -104,78 +106,162 @@ func (s *SerializeStep) ID() string { func (s *SerializeStep) HandleMiddleware(ctx context.Context, in interface{}, next Handler) ( out interface{}, metadata Metadata, err error, ) { - order := s.ids.GetOrder() - - var h SerializeHandler = serializeWrapHandler{Next: next} - for i := len(order) - 1; i >= 0; i-- { - h = decoratedSerializeHandler{ - Next: h, - With: order[i].(SerializeMiddleware), - } - } - sIn := SerializeInput{ Parameters: in, Request: s.newRequest(), } - res, metadata, err := h.HandleSerialize(ctx, sIn) + wh := &serializeWrapHandler{next} + if s.head == nil { + res, metadata, err := wh.HandleSerialize(ctx, sIn) + return res.Result, metadata, err + } + + s.tail.Next = wh + res, metadata, err := s.head.HandleSerialize(ctx, sIn) return res.Result, metadata, err } // Get retrieves the middleware identified by id. If the middleware is not present, returns false. func (s *SerializeStep) Get(id string) (SerializeMiddleware, bool) { - get, ok := s.ids.Get(id) - if !ok { + found, _ := s.get(id) + if found == nil { return nil, false } - return get.(SerializeMiddleware), ok + + return found.With, true } // Add injects the middleware to the relative position of the middleware group. -// Returns an error if the middleware already exists. +// +// Add never returns an error. It used to for duplicate phases but this +// behavior has since been removed as part of a performance optimization. The +// return value from Add can be ignored. func (s *SerializeStep) Add(m SerializeMiddleware, pos RelativePosition) error { - return s.ids.Add(m, pos) + if s.head == nil { + s.head = &decoratedSerializeHandler{nil, m} + s.tail = s.head + return nil + } + + if pos == Before { + s.head = &decoratedSerializeHandler{s.head, m} + } else { + tail := &decoratedSerializeHandler{nil, m} + s.tail.Next = tail + s.tail = tail + } + + return nil } // Insert injects the middleware relative to an existing middleware ID. // Returns error if the original middleware does not exist, or the middleware // being added already exists. func (s *SerializeStep) Insert(m SerializeMiddleware, relativeTo string, pos RelativePosition) error { - return s.ids.Insert(m, relativeTo, pos) + found, prev := s.get(relativeTo) + if found == nil { + return fmt.Errorf("not found: %s", m.ID()) + } + + if pos == Before { + if prev == nil { // at the front + s.head = &decoratedSerializeHandler{s.head, m} + } else { // somewhere in the middle + prev.Next = &decoratedSerializeHandler{found, m} + } + } else { + if found.Next == nil { // at the end + tail := &decoratedSerializeHandler{nil, m} + s.tail.Next = tail + s.tail = tail + } else { // somewhere in the middle + found.Next = &decoratedSerializeHandler{found.Next, m} + } + } + + return nil } // Swap removes the middleware by id, replacing it with the new middleware. // Returns the middleware removed, or error if the middleware to be removed // doesn't exist. func (s *SerializeStep) Swap(id string, m SerializeMiddleware) (SerializeMiddleware, error) { - removed, err := s.ids.Swap(id, m) - if err != nil { - return nil, err + found, _ := s.get(id) + if found == nil { + return nil, fmt.Errorf("not found: %s", m.ID()) } - return removed.(SerializeMiddleware), nil + swapped := found.With + found.With = m + return swapped, nil } // Remove removes the middleware by id. Returns error if the middleware // doesn't exist. func (s *SerializeStep) Remove(id string) (SerializeMiddleware, error) { - removed, err := s.ids.Remove(id) - if err != nil { - return nil, err + found, prev := s.get(id) + if found == nil { + return nil, fmt.Errorf("not found: %s", id) + } + + if s.head == s.tail { // it's the only one + s.head = nil + s.tail = nil + } else if found == s.head { // at the front + s.head = s.head.Next.(*decoratedSerializeHandler) + } else if found == s.tail { // at the end + prev.Next = nil + s.tail = prev + } else { + prev.Next = found.Next // somewhere in the middle } - return removed.(SerializeMiddleware), nil + return found.With, nil } // List returns a list of the middleware in the step. func (s *SerializeStep) List() []string { - return s.ids.List() + var ids []string + for h := s.head; h != nil; { + ids = append(ids, h.With.ID()) + if h.Next == nil { + break + } + + // once executed, tail.Next of the list will be set to an + // *serializeWrapHandler, make sure to check for that + if hnext, ok := h.Next.(*decoratedSerializeHandler); ok { + h = hnext + } else { + break + } + } + return ids } // Clear removes all middleware in the step. func (s *SerializeStep) Clear() { - s.ids.Clear() + s.head = nil + s.tail = nil +} + +func (s *SerializeStep) get(id string) (found, prev *decoratedSerializeHandler) { + for h := s.head; h != nil; { + if h.With.ID() == id { + found = h + return + } + prev = h + if h.Next == nil { + return + } + + // once executed, tail.Next of the list will be set to an + // *serializeWrapHandler + h, _ = h.Next.(*decoratedSerializeHandler) + } + return } type serializeWrapHandler struct { @@ -184,7 +270,7 @@ type serializeWrapHandler struct { var _ SerializeHandler = (*serializeWrapHandler)(nil) -// Implements SerializeHandler, converts types and delegates to underlying +// HandleSerialize implements SerializeHandler, converts types and delegates to underlying // generic handler. func (w serializeWrapHandler) HandleSerialize(ctx context.Context, in SerializeInput) ( out SerializeOutput, metadata Metadata, err error, @@ -208,12 +294,12 @@ func (h decoratedSerializeHandler) HandleSerialize(ctx context.Context, in Seria return h.With.HandleSerialize(ctx, in, h.Next) } -// SerializeHandlerFunc provides a wrapper around a function to be used as a serialize middleware handler. +// SerializeHandlerFunc provides a wrapper around a function to be used as serializeMiddleware. type SerializeHandlerFunc func(context.Context, SerializeInput) (SerializeOutput, Metadata, error) // HandleSerialize calls the wrapped function with the provided arguments. -func (s SerializeHandlerFunc) HandleSerialize(ctx context.Context, in SerializeInput) (SerializeOutput, Metadata, error) { - return s(ctx, in) +func (f SerializeHandlerFunc) HandleSerialize(ctx context.Context, in SerializeInput) (SerializeOutput, Metadata, error) { + return f(ctx, in) } var _ SerializeHandler = SerializeHandlerFunc(nil) diff --git a/vendor/github.com/aws/smithy-go/modman.toml b/vendor/github.com/aws/smithy-go/modman.toml index 9d94b7cbd0a..aac582fa2ce 100644 --- a/vendor/github.com/aws/smithy-go/modman.toml +++ b/vendor/github.com/aws/smithy-go/modman.toml @@ -1,5 +1,4 @@ [dependencies] - "github.com/jmespath/go-jmespath" = "v0.4.0" [modules] diff --git a/vendor/github.com/aws/smithy-go/transport/http/interceptor.go b/vendor/github.com/aws/smithy-go/transport/http/interceptor.go new file mode 100644 index 00000000000..e21f2632a6e --- /dev/null +++ b/vendor/github.com/aws/smithy-go/transport/http/interceptor.go @@ -0,0 +1,321 @@ +package http + +import ( + "context" +) + +func icopy[T any](v []T) []T { + s := make([]T, len(v)) + copy(s, v) + return s +} + +// InterceptorContext is all the information available in different +// interceptors. +// +// Not all information is available in each interceptor, see each interface +// definition for more details. +type InterceptorContext struct { + Input any + Request *Request + + Output any + Response *Response +} + +// InterceptorRegistry holds a list of operation interceptors. +// +// Interceptors allow callers to insert custom behavior at well-defined points +// within a client's operation lifecycle. +// +// # Interceptor context +// +// All interceptors are invoked with a context object that contains input and +// output containers for the operation. The individual fields that are +// available will depend on what the interceptor is and, in certain +// interceptors, how far the operation was able to progress. See the +// documentation for each interface definition for more information about field +// availability. +// +// Implementations MUST NOT directly mutate the values of the fields in the +// interceptor context. They are free to mutate the existing values _pointed +// to_ by those fields, however. +// +// # Returning errors +// +// All interceptors can return errors. If an interceptor returns an error +// _before_ the client's retry loop, the operation will fail immediately. If +// one returns an error _within_ the retry loop, the error WILL be considered +// according to the client's retry policy. +// +// # Adding interceptors +// +// Idiomatically you will simply use one of the Add() receiver methods to +// register interceptors as desired. However, the list for each interface is +// exported on the registry struct and the caller is free to manipulate it +// directly, for example, to register a number of interceptors all at once, or +// to remove one that was previously registered. +// +// The base SDK client WILL NOT add any interceptors. SDK operations and +// customizations are implemented in terms of middleware. +// +// Modifications to the registry will not persist across operation calls when +// using per-operation functional options. This means you can register +// interceptors on a per-operation basis without affecting other operations. +type InterceptorRegistry struct { + BeforeExecution []BeforeExecutionInterceptor + BeforeSerialization []BeforeSerializationInterceptor + AfterSerialization []AfterSerializationInterceptor + BeforeRetryLoop []BeforeRetryLoopInterceptor + BeforeAttempt []BeforeAttemptInterceptor + BeforeSigning []BeforeSigningInterceptor + AfterSigning []AfterSigningInterceptor + BeforeTransmit []BeforeTransmitInterceptor + AfterTransmit []AfterTransmitInterceptor + BeforeDeserialization []BeforeDeserializationInterceptor + AfterDeserialization []AfterDeserializationInterceptor + AfterAttempt []AfterAttemptInterceptor + AfterExecution []AfterExecutionInterceptor +} + +// Copy returns a deep copy of the registry. This is used by SDK clients on +// each operation call in order to prevent per-op config mutation from +// persisting. +func (i *InterceptorRegistry) Copy() InterceptorRegistry { + return InterceptorRegistry{ + BeforeExecution: icopy(i.BeforeExecution), + BeforeSerialization: icopy(i.BeforeSerialization), + AfterSerialization: icopy(i.AfterSerialization), + BeforeRetryLoop: icopy(i.BeforeRetryLoop), + BeforeAttempt: icopy(i.BeforeAttempt), + BeforeSigning: icopy(i.BeforeSigning), + AfterSigning: icopy(i.AfterSigning), + BeforeTransmit: icopy(i.BeforeTransmit), + AfterTransmit: icopy(i.AfterTransmit), + BeforeDeserialization: icopy(i.BeforeDeserialization), + AfterDeserialization: icopy(i.AfterDeserialization), + AfterAttempt: icopy(i.AfterAttempt), + AfterExecution: icopy(i.AfterExecution), + } +} + +// AddBeforeExecution registers the provided BeforeExecutionInterceptor. +func (i *InterceptorRegistry) AddBeforeExecution(v BeforeExecutionInterceptor) { + i.BeforeExecution = append(i.BeforeExecution, v) +} + +// AddBeforeSerialization registers the provided BeforeSerializationInterceptor. +func (i *InterceptorRegistry) AddBeforeSerialization(v BeforeSerializationInterceptor) { + i.BeforeSerialization = append(i.BeforeSerialization, v) +} + +// AddAfterSerialization registers the provided AfterSerializationInterceptor. +func (i *InterceptorRegistry) AddAfterSerialization(v AfterSerializationInterceptor) { + i.AfterSerialization = append(i.AfterSerialization, v) +} + +// AddBeforeRetryLoop registers the provided BeforeRetryLoopInterceptor. +func (i *InterceptorRegistry) AddBeforeRetryLoop(v BeforeRetryLoopInterceptor) { + i.BeforeRetryLoop = append(i.BeforeRetryLoop, v) +} + +// AddBeforeAttempt registers the provided BeforeAttemptInterceptor. +func (i *InterceptorRegistry) AddBeforeAttempt(v BeforeAttemptInterceptor) { + i.BeforeAttempt = append(i.BeforeAttempt, v) +} + +// AddBeforeSigning registers the provided BeforeSigningInterceptor. +func (i *InterceptorRegistry) AddBeforeSigning(v BeforeSigningInterceptor) { + i.BeforeSigning = append(i.BeforeSigning, v) +} + +// AddAfterSigning registers the provided AfterSigningInterceptor. +func (i *InterceptorRegistry) AddAfterSigning(v AfterSigningInterceptor) { + i.AfterSigning = append(i.AfterSigning, v) +} + +// AddBeforeTransmit registers the provided BeforeTransmitInterceptor. +func (i *InterceptorRegistry) AddBeforeTransmit(v BeforeTransmitInterceptor) { + i.BeforeTransmit = append(i.BeforeTransmit, v) +} + +// AddAfterTransmit registers the provided AfterTransmitInterceptor. +func (i *InterceptorRegistry) AddAfterTransmit(v AfterTransmitInterceptor) { + i.AfterTransmit = append(i.AfterTransmit, v) +} + +// AddBeforeDeserialization registers the provided BeforeDeserializationInterceptor. +func (i *InterceptorRegistry) AddBeforeDeserialization(v BeforeDeserializationInterceptor) { + i.BeforeDeserialization = append(i.BeforeDeserialization, v) +} + +// AddAfterDeserialization registers the provided AfterDeserializationInterceptor. +func (i *InterceptorRegistry) AddAfterDeserialization(v AfterDeserializationInterceptor) { + i.AfterDeserialization = append(i.AfterDeserialization, v) +} + +// AddAfterAttempt registers the provided AfterAttemptInterceptor. +func (i *InterceptorRegistry) AddAfterAttempt(v AfterAttemptInterceptor) { + i.AfterAttempt = append(i.AfterAttempt, v) +} + +// AddAfterExecution registers the provided AfterExecutionInterceptor. +func (i *InterceptorRegistry) AddAfterExecution(v AfterExecutionInterceptor) { + i.AfterExecution = append(i.AfterExecution, v) +} + +// BeforeExecutionInterceptor runs before anything else in the operation +// lifecycle. +// +// Available InterceptorContext fields: +// - Input +type BeforeExecutionInterceptor interface { + BeforeExecution(ctx context.Context, in *InterceptorContext) error +} + +// BeforeSerializationInterceptor runs before the operation input is serialized +// into its transport request. +// +// Serialization occurs before the operation's retry loop. +// +// Available InterceptorContext fields: +// - Input +type BeforeSerializationInterceptor interface { + BeforeSerialization(ctx context.Context, in *InterceptorContext) error +} + +// AfterSerializationInterceptor runs after the operation input is serialized +// into its transport request. +// +// Available InterceptorContext fields: +// - Input +// - Request +type AfterSerializationInterceptor interface { + AfterSerialization(ctx context.Context, in *InterceptorContext) error +} + +// BeforeRetryLoopInterceptor runs right before the operation enters the retry loop. +// +// Available InterceptorContext fields: +// - Input +// - Request +type BeforeRetryLoopInterceptor interface { + BeforeRetryLoop(ctx context.Context, in *InterceptorContext) error +} + +// BeforeAttemptInterceptor runs right before every attempt in the retry loop. +// +// If this interceptor returns an error, AfterAttempt interceptors WILL NOT be +// invoked. +// +// Available InterceptorContext fields: +// - Input +// - Request +type BeforeAttemptInterceptor interface { + BeforeAttempt(ctx context.Context, in *InterceptorContext) error +} + +// BeforeSigningInterceptor runs right before the request is signed. +// +// Signing occurs within the operation's retry loop. +// +// Available InterceptorContext fields: +// - Input +// - Request +type BeforeSigningInterceptor interface { + BeforeSigning(ctx context.Context, in *InterceptorContext) error +} + +// AfterSigningInterceptor runs right after the request is signed. +// +// It is unsafe to modify the outgoing HTTP request at or past this hook, since +// doing so may invalidate the signature of the request. +// +// Available InterceptorContext fields: +// - Input +// - Request +type AfterSigningInterceptor interface { + AfterSigning(ctx context.Context, in *InterceptorContext) error +} + +// BeforeTransmitInterceptor runs right before the HTTP request is sent. +// +// HTTP transmit occurs within the operation's retry loop. +// +// Available InterceptorContext fields: +// - Input +// - Request +type BeforeTransmitInterceptor interface { + BeforeTransmit(ctx context.Context, in *InterceptorContext) error +} + +// AfterTransmitInterceptor runs right after the HTTP response is received. +// +// It will always be invoked when a response is received, regardless of its +// status code. Conversely, it WILL NOT be invoked if the HTTP round-trip was +// not successful, e.g. because of a DNS resolution error +// +// Available InterceptorContext fields: +// - Input +// - Request +// - Response +type AfterTransmitInterceptor interface { + AfterTransmit(ctx context.Context, in *InterceptorContext) error +} + +// BeforeDeserializationInterceptor runs right before the incoming HTTP response +// is deserialized. +// +// This interceptor IS NOT invoked if the HTTP round-trip was not successful. +// +// Deserialization occurs within the operation's retry loop. +// +// Available InterceptorContext fields: +// - Input +// - Request +// - Response +type BeforeDeserializationInterceptor interface { + BeforeDeserialization(ctx context.Context, in *InterceptorContext) error +} + +// AfterDeserializationInterceptor runs right after the incoming HTTP response +// is deserialized. This hook is invoked regardless of whether the deserialized +// result was an error. +// +// This interceptor IS NOT invoked if the HTTP round-trip was not successful. +// +// Available InterceptorContext fields: +// - Input +// - Output (IF the operation had a success-level response) +// - Request +// - Response +type AfterDeserializationInterceptor interface { + AfterDeserialization(ctx context.Context, in *InterceptorContext) error +} + +// AfterAttemptInterceptor runs right after the incoming HTTP response +// is deserialized. This hook is invoked regardless of whether the deserialized +// result was an error, or if another interceptor within the retry loop +// returned an error. +// +// Available InterceptorContext fields: +// - Input +// - Output (IF the operation had a success-level response) +// - Request (IF the operation did not return an error during serialization) +// - Response (IF the operation was able to transmit the HTTP request) +type AfterAttemptInterceptor interface { + AfterAttempt(ctx context.Context, in *InterceptorContext) error +} + +// AfterExecutionInterceptor runs after everything else. It runs regardless of +// how far the operation progressed in its lifecycle, and regardless of whether +// the operation succeeded or failed. +// +// Available InterceptorContext fields: +// - Input +// - Output (IF the operation had a success-level response) +// - Request (IF the operation did not return an error during serialization) +// - Response (IF the operation was able to transmit the HTTP request) +type AfterExecutionInterceptor interface { + AfterExecution(ctx context.Context, in *InterceptorContext) error +} diff --git a/vendor/github.com/aws/smithy-go/transport/http/interceptor_middleware.go b/vendor/github.com/aws/smithy-go/transport/http/interceptor_middleware.go new file mode 100644 index 00000000000..2cc4b57f894 --- /dev/null +++ b/vendor/github.com/aws/smithy-go/transport/http/interceptor_middleware.go @@ -0,0 +1,325 @@ +package http + +import ( + "context" + "errors" + + "github.com/aws/smithy-go/middleware" +) + +type ictxKey struct{} + +func withIctx(ctx context.Context) context.Context { + return middleware.WithStackValue(ctx, ictxKey{}, &InterceptorContext{}) +} + +func getIctx(ctx context.Context) *InterceptorContext { + return middleware.GetStackValue(ctx, ictxKey{}).(*InterceptorContext) +} + +// InterceptExecution runs Before/AfterExecutionInterceptors. +type InterceptExecution struct { + BeforeExecution []BeforeExecutionInterceptor + AfterExecution []AfterExecutionInterceptor +} + +// ID identifies the middleware. +func (m *InterceptExecution) ID() string { + return "InterceptExecution" +} + +// HandleInitialize runs the interceptors. +func (m *InterceptExecution) HandleInitialize( + ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, +) ( + out middleware.InitializeOutput, md middleware.Metadata, err error, +) { + ctx = withIctx(ctx) + getIctx(ctx).Input = in.Parameters + + for _, i := range m.BeforeExecution { + if err := i.BeforeExecution(ctx, getIctx(ctx)); err != nil { + return out, md, err + } + } + + out, md, err = next.HandleInitialize(ctx, in) + + for _, i := range m.AfterExecution { + if err := i.AfterExecution(ctx, getIctx(ctx)); err != nil { + return out, md, err + } + } + + return out, md, err +} + +// InterceptBeforeSerialization runs BeforeSerializationInterceptors. +type InterceptBeforeSerialization struct { + Interceptors []BeforeSerializationInterceptor +} + +// ID identifies the middleware. +func (m *InterceptBeforeSerialization) ID() string { + return "InterceptBeforeSerialization" +} + +// HandleSerialize runs the interceptors. +func (m *InterceptBeforeSerialization) HandleSerialize( + ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler, +) ( + out middleware.SerializeOutput, md middleware.Metadata, err error, +) { + for _, i := range m.Interceptors { + if err := i.BeforeSerialization(ctx, getIctx(ctx)); err != nil { + return out, md, err + } + } + + return next.HandleSerialize(ctx, in) +} + +// InterceptAfterSerialization runs AfterSerializationInterceptors. +type InterceptAfterSerialization struct { + Interceptors []AfterSerializationInterceptor +} + +// ID identifies the middleware. +func (m *InterceptAfterSerialization) ID() string { + return "InterceptAfterSerialization" +} + +// HandleSerialize runs the interceptors. +func (m *InterceptAfterSerialization) HandleSerialize( + ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler, +) ( + out middleware.SerializeOutput, md middleware.Metadata, err error, +) { + getIctx(ctx).Request = in.Request.(*Request) + + for _, i := range m.Interceptors { + if err := i.AfterSerialization(ctx, getIctx(ctx)); err != nil { + return out, md, err + } + } + + return next.HandleSerialize(ctx, in) +} + +// InterceptBeforeRetryLoop runs BeforeRetryLoopInterceptors. +type InterceptBeforeRetryLoop struct { + Interceptors []BeforeRetryLoopInterceptor +} + +// ID identifies the middleware. +func (m *InterceptBeforeRetryLoop) ID() string { + return "InterceptBeforeRetryLoop" +} + +// HandleFinalize runs the interceptors. +func (m *InterceptBeforeRetryLoop) HandleFinalize( + ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler, +) ( + out middleware.FinalizeOutput, md middleware.Metadata, err error, +) { + for _, i := range m.Interceptors { + if err := i.BeforeRetryLoop(ctx, getIctx(ctx)); err != nil { + return out, md, err + } + } + + return next.HandleFinalize(ctx, in) +} + +// InterceptBeforeSigning runs BeforeSigningInterceptors. +type InterceptBeforeSigning struct { + Interceptors []BeforeSigningInterceptor +} + +// ID identifies the middleware. +func (m *InterceptBeforeSigning) ID() string { + return "InterceptBeforeSigning" +} + +// HandleFinalize runs the interceptors. +func (m *InterceptBeforeSigning) HandleFinalize( + ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler, +) ( + out middleware.FinalizeOutput, md middleware.Metadata, err error, +) { + for _, i := range m.Interceptors { + if err := i.BeforeSigning(ctx, getIctx(ctx)); err != nil { + return out, md, err + } + } + + return next.HandleFinalize(ctx, in) +} + +// InterceptAfterSigning runs AfterSigningInterceptors. +type InterceptAfterSigning struct { + Interceptors []AfterSigningInterceptor +} + +// ID identifies the middleware. +func (m *InterceptAfterSigning) ID() string { + return "InterceptAfterSigning" +} + +// HandleFinalize runs the interceptors. +func (m *InterceptAfterSigning) HandleFinalize( + ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler, +) ( + out middleware.FinalizeOutput, md middleware.Metadata, err error, +) { + for _, i := range m.Interceptors { + if err := i.AfterSigning(ctx, getIctx(ctx)); err != nil { + return out, md, err + } + } + + return next.HandleFinalize(ctx, in) +} + +// InterceptTransmit runs BeforeTransmitInterceptors and AfterTransmitInterceptors. +type InterceptTransmit struct { + BeforeTransmit []BeforeTransmitInterceptor + AfterTransmit []AfterTransmitInterceptor +} + +// ID identifies the middleware. +func (m *InterceptTransmit) ID() string { + return "InterceptTransmit" +} + +// HandleDeserialize runs the interceptors. +func (m *InterceptTransmit) HandleDeserialize( + ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler, +) ( + out middleware.DeserializeOutput, md middleware.Metadata, err error, +) { + for _, i := range m.BeforeTransmit { + if err := i.BeforeTransmit(ctx, getIctx(ctx)); err != nil { + return out, md, err + } + } + + out, md, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, md, err + } + + // the root of the decorated middleware guarantees this will be here + // (client.go: ClientHandler.Handle) + getIctx(ctx).Response = out.RawResponse.(*Response) + + for _, i := range m.AfterTransmit { + if err := i.AfterTransmit(ctx, getIctx(ctx)); err != nil { + return out, md, err + } + } + + return out, md, err +} + +// InterceptBeforeDeserialization runs BeforeDeserializationInterceptors. +type InterceptBeforeDeserialization struct { + Interceptors []BeforeDeserializationInterceptor +} + +// ID identifies the middleware. +func (m *InterceptBeforeDeserialization) ID() string { + return "InterceptBeforeDeserialization" +} + +// HandleDeserialize runs the interceptors. +func (m *InterceptBeforeDeserialization) HandleDeserialize( + ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler, +) ( + out middleware.DeserializeOutput, md middleware.Metadata, err error, +) { + out, md, err = next.HandleDeserialize(ctx, in) + if err != nil { + var terr *RequestSendError + if errors.As(err, &terr) { + return out, md, err + } + } + + for _, i := range m.Interceptors { + if err := i.BeforeDeserialization(ctx, getIctx(ctx)); err != nil { + return out, md, err + } + } + + return out, md, err +} + +// InterceptAfterDeserialization runs AfterDeserializationInterceptors. +type InterceptAfterDeserialization struct { + Interceptors []AfterDeserializationInterceptor +} + +// ID identifies the middleware. +func (m *InterceptAfterDeserialization) ID() string { + return "InterceptAfterDeserialization" +} + +// HandleDeserialize runs the interceptors. +func (m *InterceptAfterDeserialization) HandleDeserialize( + ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler, +) ( + out middleware.DeserializeOutput, md middleware.Metadata, err error, +) { + out, md, err = next.HandleDeserialize(ctx, in) + if err != nil { + var terr *RequestSendError + if errors.As(err, &terr) { + return out, md, err + } + } + + getIctx(ctx).Output = out.Result + + for _, i := range m.Interceptors { + if err := i.AfterDeserialization(ctx, getIctx(ctx)); err != nil { + return out, md, err + } + } + + return out, md, err +} + +// InterceptAttempt runs AfterAttemptInterceptors. +type InterceptAttempt struct { + BeforeAttempt []BeforeAttemptInterceptor + AfterAttempt []AfterAttemptInterceptor +} + +// ID identifies the middleware. +func (m *InterceptAttempt) ID() string { + return "InterceptAttempt" +} + +// HandleFinalize runs the interceptors. +func (m *InterceptAttempt) HandleFinalize( + ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler, +) ( + out middleware.FinalizeOutput, md middleware.Metadata, err error, +) { + for _, i := range m.BeforeAttempt { + if err := i.BeforeAttempt(ctx, getIctx(ctx)); err != nil { + return out, md, err + } + } + + out, md, err = next.HandleFinalize(ctx, in) + + for _, i := range m.AfterAttempt { + if err := i.AfterAttempt(ctx, getIctx(ctx)); err != nil { + return out, md, err + } + } + + return out, md, err +} diff --git a/vendor/github.com/aws/smithy-go/transport/http/metrics.go b/vendor/github.com/aws/smithy-go/transport/http/metrics.go index d1beaa595d9..b4cd4a47e36 100644 --- a/vendor/github.com/aws/smithy-go/transport/http/metrics.go +++ b/vendor/github.com/aws/smithy-go/transport/http/metrics.go @@ -17,6 +17,12 @@ var now = time.Now func withMetrics(parent context.Context, client ClientDo, meter metrics.Meter) ( context.Context, ClientDo, error, ) { + // WithClientTrace is an expensive operation - avoid calling it if we're + // not actually using a metrics sink. + if _, ok := meter.(metrics.NopMeter); ok { + return parent, client, nil + } + hm, err := newHTTPMetrics(meter) if err != nil { return nil, nil, err diff --git a/vendor/github.com/google/go-cmp/cmp/report_compare.go b/vendor/github.com/google/go-cmp/cmp/report_compare.go index df579297cc3..2050bf6b46b 100644 --- a/vendor/github.com/google/go-cmp/cmp/report_compare.go +++ b/vendor/github.com/google/go-cmp/cmp/report_compare.go @@ -63,9 +63,7 @@ func (opts formatOptions) WithTypeMode(t typeMode) formatOptions { } func (opts formatOptions) WithVerbosity(level int) formatOptions { opts.VerbosityLevel = level - // WE PATCH VENDORED CODE - // IF YOU SEE THIS AFTER `go mod vendor` PLEASE RUN 'make vendor' - opts.LimitVerbosity = false + opts.LimitVerbosity = true return opts } func (opts formatOptions) verbosity() uint { diff --git a/vendor/github.com/google/go-cmp/cmp/report_reflect.go b/vendor/github.com/google/go-cmp/cmp/report_reflect.go index c51c7a37e03..e39f42284ee 100644 --- a/vendor/github.com/google/go-cmp/cmp/report_reflect.go +++ b/vendor/github.com/google/go-cmp/cmp/report_reflect.go @@ -364,7 +364,7 @@ func formatMapKey(v reflect.Value, disambiguate bool, ptrs *pointerReferences) s opts.AvoidStringer = disambiguate opts.QualifiedNames = disambiguate opts.VerbosityLevel = maxVerbosityPreset - opts.LimitVerbosity = false + opts.LimitVerbosity = true s := opts.FormatValue(v, reflect.Map, ptrs).String() return strings.TrimSpace(s) } diff --git a/vendor/modules.txt b/vendor/modules.txt index 5a712fa97bb..00be2e7aa66 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -285,8 +285,8 @@ github.com/aws/aws-sdk-go/service/sso/ssoiface github.com/aws/aws-sdk-go/service/ssooidc github.com/aws/aws-sdk-go/service/sts github.com/aws/aws-sdk-go/service/sts/stsiface -# github.com/aws/aws-sdk-go-v2 v1.36.3 -## explicit; go 1.22 +# github.com/aws/aws-sdk-go-v2 v1.41.5 +## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/aws github.com/aws/aws-sdk-go-v2/aws/arn github.com/aws/aws-sdk-go-v2/aws/defaults @@ -314,8 +314,8 @@ github.com/aws/aws-sdk-go-v2/internal/shareddefaults github.com/aws/aws-sdk-go-v2/internal/strings github.com/aws/aws-sdk-go-v2/internal/sync/singleflight github.com/aws/aws-sdk-go-v2/internal/timeconv -# github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.7 -## explicit; go 1.21 +# github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.8 +## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/eventstreamapi # github.com/aws/aws-sdk-go-v2/config v1.29.14 @@ -337,11 +337,11 @@ github.com/aws/aws-sdk-go-v2/feature/ec2/imds/internal/config # github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.10 ## explicit; go 1.20 github.com/aws/aws-sdk-go-v2/feature/s3/manager -# github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34 -## explicit; go 1.22 +# github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.21 +## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/internal/configsources -# github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34 -## explicit; go 1.22 +# github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.21 +## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 # github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 ## explicit; go 1.22 @@ -356,6 +356,16 @@ github.com/aws/aws-sdk-go-v2/internal/v4a/internal/v4 github.com/aws/aws-sdk-go-v2/service/cloudformation github.com/aws/aws-sdk-go-v2/service/cloudformation/internal/endpoints github.com/aws/aws-sdk-go-v2/service/cloudformation/types +# github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.68.0 +## explicit; go 1.24 +github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs +github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/internal/endpoints +github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs/types +# github.com/aws/aws-sdk-go-v2/service/codebuild v1.68.13 +## explicit; go 1.24 +github.com/aws/aws-sdk-go-v2/service/codebuild +github.com/aws/aws-sdk-go-v2/service/codebuild/internal/endpoints +github.com/aws/aws-sdk-go-v2/service/codebuild/types # github.com/aws/aws-sdk-go-v2/service/ec2 v1.194.0 ## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/service/ec2 @@ -397,8 +407,8 @@ github.com/aws/aws-sdk-go-v2/service/ssooidc/types github.com/aws/aws-sdk-go-v2/service/sts github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints github.com/aws/aws-sdk-go-v2/service/sts/types -# github.com/aws/smithy-go v1.22.2 -## explicit; go 1.21 +# github.com/aws/smithy-go v1.24.2 +## explicit; go 1.24 github.com/aws/smithy-go github.com/aws/smithy-go/auth github.com/aws/smithy-go/auth/bearer