diff --git a/go.mod b/go.mod index 32dadf9c..1a7d0c6c 100644 --- a/go.mod +++ b/go.mod @@ -1,18 +1,18 @@ module github.com/conductorone/baton-databricks -go 1.23 +go 1.23.4 -toolchain go1.23.6 +toolchain go1.24.2 require ( - github.com/conductorone/baton-sdk v0.2.67 + github.com/conductorone/baton-sdk v0.3.9 github.com/ennyjfrick/ruleguard-logfatal v0.0.2 github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 github.com/quasilyte/go-ruleguard/dsl v0.3.22 github.com/spf13/viper v1.19.0 go.uber.org/zap v1.27.0 - golang.org/x/oauth2 v0.25.0 - google.golang.org/protobuf v1.36.4 + golang.org/x/oauth2 v0.26.0 + google.golang.org/protobuf v1.36.5 ) require ( @@ -20,25 +20,27 @@ require ( filippo.io/edwards25519 v1.1.0 // indirect github.com/deckarep/golang-set/v2 v2.7.0 // indirect github.com/ncruces/go-strftime v0.1.9 // indirect - go.opentelemetry.io/otel v1.34.0 // indirect - go.opentelemetry.io/otel/metric v1.34.0 // indirect + go.opentelemetry.io/otel v1.35.0 // indirect + go.opentelemetry.io/otel/metric v1.35.0 // indirect ) require ( - github.com/aws/aws-sdk-go-v2 v1.34.0 // indirect - github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.8 // indirect + github.com/aws/aws-lambda-go v1.47.0 // indirect + github.com/aws/aws-sdk-go-v2 v1.36.3 // indirect + github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.10 // indirect github.com/aws/aws-sdk-go-v2/config v1.29.2 // indirect github.com/aws/aws-sdk-go-v2/credentials v1.17.55 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.25 // indirect github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.55 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.29 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.29 // 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/ini v1.8.2 // indirect github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.29 // indirect github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.2 // indirect github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.5.3 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.10 // indirect github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.10 // indirect + github.com/aws/aws-sdk-go-v2/service/lambda v1.71.0 // indirect github.com/aws/aws-sdk-go-v2/service/s3 v1.75.0 // indirect github.com/aws/aws-sdk-go-v2/service/sso v1.24.12 // indirect github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.11 // indirect @@ -46,6 +48,9 @@ require ( github.com/aws/smithy-go v1.22.2 // indirect github.com/benbjohnson/clock v1.3.5 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect + github.com/conductorone/dpop v0.2.3 // indirect + github.com/conductorone/dpop/integrations/dpop_grpc v0.2.3 // indirect + github.com/conductorone/dpop/integrations/dpop_oauth2 v0.2.3 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/dolthub/maphash v0.1.0 // indirect github.com/doug-martin/goqu/v9 v9.19.0 // indirect @@ -54,15 +59,16 @@ require ( github.com/fsnotify/fsnotify v1.8.0 // indirect github.com/gammazero/deque v1.0.0 // indirect github.com/glebarez/go-sqlite v1.22.0 // indirect - github.com/go-jose/go-jose/v4 v4.0.4 // indirect + github.com/go-jose/go-jose/v4 v4.0.5 // indirect github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.3.0 // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.1 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/jellydator/ttlcache/v3 v3.3.0 // indirect github.com/klauspost/compress v1.17.11 // indirect github.com/lufia/plan9stats v0.0.0-20240909124753-873cd0166683 // indirect github.com/magiconair/properties v1.8.9 // indirect @@ -72,7 +78,9 @@ require ( github.com/pelletier/go-toml/v2 v2.2.3 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect + github.com/pquerna/cachecontrol v0.2.0 // indirect github.com/pquerna/xjwt v0.3.0 // indirect + github.com/pquerna/xjwt/xkeyset v0.0.0-20241217022915-10fc997b2a9f // indirect github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect github.com/sagikazarmark/locafero v0.7.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect @@ -90,23 +98,27 @@ require ( github.com/tklauser/numcpus v0.9.0 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opentelemetry.io/auto/sdk v1.1.0 // indirect + go.opentelemetry.io/contrib/bridges/otelzap v0.10.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.59.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.11.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0 // indirect - go.opentelemetry.io/otel/sdk v1.34.0 // indirect - go.opentelemetry.io/otel/trace v1.34.0 // indirect + go.opentelemetry.io/otel/log v0.11.0 // indirect + go.opentelemetry.io/otel/sdk v1.35.0 // indirect + go.opentelemetry.io/otel/sdk/log v0.11.0 // indirect + go.opentelemetry.io/otel/trace v1.35.0 // indirect go.opentelemetry.io/proto/otlp v1.5.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/ratelimit v0.3.1 // indirect - golang.org/x/crypto v0.32.0 // indirect + golang.org/x/crypto v0.34.0 // indirect golang.org/x/exp v0.0.0-20250128182459-e0ece0dbea4c // indirect - golang.org/x/net v0.34.0 // indirect + golang.org/x/net v0.35.0 // indirect golang.org/x/sync v0.11.0 // indirect - golang.org/x/sys v0.29.0 // indirect - golang.org/x/text v0.21.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20250127172529-29210b9bc287 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250127172529-29210b9bc287 // indirect - google.golang.org/grpc v1.70.0 // indirect + golang.org/x/sys v0.30.0 // indirect + golang.org/x/text v0.22.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20250218202821-56aae31c358a // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20250219182151-9fdb1cabc7b2 // indirect + google.golang.org/grpc v1.71.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index 2802b3d3..3c99c432 100644 --- a/go.sum +++ b/go.sum @@ -8,10 +8,12 @@ filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4 github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60= github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= -github.com/aws/aws-sdk-go-v2 v1.34.0 h1:9iyL+cjifckRGEVpRKZP3eIxVlL06Qk1Tk13vreaVQU= -github.com/aws/aws-sdk-go-v2 v1.34.0/go.mod h1:JgstGg0JjWU1KpVJjD5H0y0yyAIpSdKEq556EI6yOOM= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.8 h1:zAxi9p3wsZMIaVCdoiQp2uZ9k1LsZvmAnoTBeZPXom0= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.8/go.mod h1:3XkePX5dSaxveLAYY7nsbsZZrKxCyEuE5pM4ziFxyGg= +github.com/aws/aws-lambda-go v1.47.0 h1:0H8s0vumYx/YKs4sE7YM0ktwL2eWse+kfopsRI1sXVI= +github.com/aws/aws-lambda-go v1.47.0/go.mod h1:dpMpZgvWx5vuQJfBt0zqBha60q7Dd7RfgJv23DymV8A= +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.10 h1:zAybnyUQXIZ5mok5Jqwlf58/TFE7uvd3IAsa1aF9cXs= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.10/go.mod h1:qqvMj6gHLR/EXWZw4ZbqlPbQUyenf4h82UQUlKc+l14= github.com/aws/aws-sdk-go-v2/config v1.29.2 h1:JuIxOEPcSKpMB0J+khMjznG9LIhIBdmqNiEcPclnwqc= github.com/aws/aws-sdk-go-v2/config v1.29.2/go.mod h1:HktTHregOZwNSM/e7WTfVSu9RCX+3eOv+6ij27PtaYs= github.com/aws/aws-sdk-go-v2/credentials v1.17.55 h1:CDhKnDEaGkLA5ZszV/qw5uwN5M8rbv9Cl0JRN+PRsaM= @@ -20,10 +22,10 @@ github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.25 h1:kU7tmXNaJ07LsyN3BUgGqA github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.25/go.mod h1:OiC8+OiqrURb1wrwmr/UbOVLFSWEGxjinj5C299VQdo= github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.55 h1:yfz56qEKO2MqTV0m81KtZS7swlP335FMrmoC1GBgU5k= github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.55/go.mod h1:O/fEJxrOLSCbhA8jL1xHwo8gzbN/iNcT+y7aq7c6KHE= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.29 h1:Ej0Rf3GMv50Qh4G4852j2djtoDb7AzQ7MuQeFHa3D70= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.29/go.mod h1:oeNTC7PwJNoM5AznVr23wxhLnuJv0ZDe5v7w0wqIs9M= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.29 h1:6e8a71X+9GfghragVevC5bZqvATtc3mAMgxpSNbgzF0= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.29/go.mod h1:c4jkZiQ+BWpNqq7VtrxjwISrLrt/VvPq3XiopkUIolI= +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/ini v1.8.2 h1:Pg9URiobXy85kgFev3og2CuOZ8JZUBENF+dcgWBaYNk= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.2/go.mod h1:FbtygfRFze9usAadmnGJNc8KsP346kEe+y2/oyhGAGc= github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.29 h1:g9OUETuxA8i/Www5Cby0R3WSTe7ppFTZXHVLNskNS4w= @@ -36,6 +38,8 @@ github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.10 h1:hN4yJBGs github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.10/go.mod h1:TsxON4fEZXyrKY+D+3d2gSTyJkGORexIYab9PTf56DA= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.10 h1:fXoWC2gi7tdJYNTPnnlSGzEVwewUchOi8xVq/dkg8Qs= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.10/go.mod h1:cvzBApD5dVazHU8C2rbBQzzzsKc8m5+wNJ9mCRZLKPc= +github.com/aws/aws-sdk-go-v2/service/lambda v1.71.0 h1:8PjrcaqDZKar6ivI8c6vwNADOURebrRZQms3SxggRgU= +github.com/aws/aws-sdk-go-v2/service/lambda v1.71.0/go.mod h1:c27kk10S36lBYgbG1jR3opn4OAS5Y/4wjJa1GiHK/X4= github.com/aws/aws-sdk-go-v2/service/s3 v1.75.0 h1:UPQJDyqUXICUt60X4PwbiEf+2QQ4VfXUhDk8OEiGtik= github.com/aws/aws-sdk-go-v2/service/s3 v1.75.0/go.mod h1:hHnELVnIHltd8EOF3YzahVX6F6y2C6dNqpRj1IMkS5I= github.com/aws/aws-sdk-go-v2/service/sso v1.24.12 h1:kznaW4f81mNMlREkU9w3jUuJvU5g/KsqDV43ab7Rp6s= @@ -54,8 +58,14 @@ github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyY github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/conductorone/baton-sdk v0.2.67 h1:LuG5pFIafIKmAy1XNiPTJ3b/bRMkXLd5f/IkizvyAhU= -github.com/conductorone/baton-sdk v0.2.67/go.mod h1:u7XcOOr1K28wKX08tHWCWtXEqwEC0U1p+XVOXgxZSIs= +github.com/conductorone/baton-sdk v0.3.9 h1:D0YiYtRkpRByYsctlREqNG9pb5QAU5DW7sBlccAd3tI= +github.com/conductorone/baton-sdk v0.3.9/go.mod h1:lWZHgu025Rsgs5jvBrhilGti0zWF2+YfaFY/bWOS/g0= +github.com/conductorone/dpop v0.2.3 h1:s91U3845GHQ6P6FWrdNr2SEOy1ES/jcFs1JtKSl2S+o= +github.com/conductorone/dpop v0.2.3/go.mod h1:gyo8TtzB9SCFCsjsICH4IaLZ7y64CcrDXMOPBwfq/3s= +github.com/conductorone/dpop/integrations/dpop_grpc v0.2.3 h1:kLMCNIh0Mo2vbvvkCmJ3ixsPbXEJ6HPcW53Ku9yje3s= +github.com/conductorone/dpop/integrations/dpop_grpc v0.2.3/go.mod h1:LYNoUc1lkvozk9HBio+xI2w8YyfYy0v2cAJtIgrkj8o= +github.com/conductorone/dpop/integrations/dpop_oauth2 v0.2.3 h1:KhFaxiTzj9FteI9IE2tIGdSjJKyFW5ZcUF2SrgLnA28= +github.com/conductorone/dpop/integrations/dpop_oauth2 v0.2.3/go.mod h1:2eI0qv+XaEhoCw0GKFF1yH4X8Mp4KLVEVnQKRFEy4zs= github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -86,8 +96,8 @@ github.com/gammazero/deque v1.0.0 h1:LTmimT8H7bXkkCy6gZX7zNLtkbz4NdS2z8LZuor3j34 github.com/gammazero/deque v1.0.0/go.mod h1:iflpYvtGfM3U8S8j+sZEKIak3SAKYpA5/SQewgfXDKo= github.com/glebarez/go-sqlite v1.22.0 h1:uAcMJhaA6r3LHMTFgP0SifzgXg46yJkgxqyuyec+ruQ= github.com/glebarez/go-sqlite v1.22.0/go.mod h1:PlBIdHe0+aUEFn+r2/uthrWq4FxbzugL0L8Li6yQJbc= -github.com/go-jose/go-jose/v4 v4.0.4 h1:VsjPI33J0SB9vQM6PLmNjoHqMQNGPiZ0rHL7Ni7Q6/E= -github.com/go-jose/go-jose/v4 v4.0.4/go.mod h1:NKb5HO1EZccyMpiZNbdUw/14tiXNyUJh188dfnMCAfc= +github.com/go-jose/go-jose/v4 v4.0.5 h1:M6T8+mKZl/+fNNuFHvGIzDz7BTLQPIounk/b9dw3AaE= +github.com/go-jose/go-jose/v4 v4.0.5/go.mod h1:s3P1lRrkT8igV8D9OjyL4WRyHvjB6a4JSllnOrmmBOA= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= @@ -115,20 +125,23 @@ github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaW github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/pprof v0.0.0-20240409012703-83162a5b38cd h1:gbpYu9NMq8jhDVbvlGkMFWCjLFlqqEZjEmObmhUy6Vo= github.com/google/pprof v0.0.0-20240409012703-83162a5b38cd/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.0 h1:VD1gqscl4nYs1YxVuSdemTrSgTKrwOWDK0FVFMqm+Cg= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.0/go.mod h1:4EgsQoS4TOhJizV+JTFg40qx1Ofh3XmXEQNBpgvNT40= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.1 h1:e9Rjr40Z98/clHv5Yg79Is0NtosR5LXRvdr7o/6NwbA= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.1/go.mod h1:tIxuGz/9mpox++sgp9fJjHO0+q1X9/UOWd798aAm22M= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/jellydator/ttlcache/v3 v3.3.0 h1:BdoC9cE81qXfrxeb9eoJi9dWrdhSuwXMAnHTbnBm4Wc= +github.com/jellydator/ttlcache/v3 v3.3.0/go.mod h1:bj2/e0l4jRnQdrnSTaGTsh4GSXvMjQcy41i7th0GVGw= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc= @@ -167,8 +180,12 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRI github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU= github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= +github.com/pquerna/cachecontrol v0.2.0 h1:vBXSNuE5MYP9IJ5kjsdo8uq+w41jSPgvba2DEnkRx9k= +github.com/pquerna/cachecontrol v0.2.0/go.mod h1:NrUG3Z7Rdu85UNR3vm7SOsl1nFIeSiQnrHV5K9mBcUI= github.com/pquerna/xjwt v0.3.0 h1:Ij21n2sUdDA1+ybybB1CAxLhSNmhsKhBnZ+UXUV+ytM= github.com/pquerna/xjwt v0.3.0/go.mod h1:Gb5PNug9MopYlFiYubUuIYPGobzVsDUKtdkJcCxEzIw= +github.com/pquerna/xjwt/xkeyset v0.0.0-20241217022915-10fc997b2a9f h1:FIJuoMcz7dutr9TC0wSrWNA4lvn7lZJhc2L5NXuk71s= +github.com/pquerna/xjwt/xkeyset v0.0.0-20241217022915-10fc997b2a9f/go.mod h1:zLKgl1t/lY3NuaQmDQknoP2wpDSuoWrnYo3SG4ry0do= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/quasilyte/go-ruleguard v0.4.4 h1:53DncefIeLX3qEpjzlS1lyUmQoUEeOWPFWqaTJq9eAQ= github.com/quasilyte/go-ruleguard v0.4.4/go.mod h1:Vl05zJ538vcEEwu16V/Hdu7IYZWyKSwIy4c88Ro1kRE= @@ -216,6 +233,7 @@ github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= @@ -231,24 +249,32 @@ github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= +go.opentelemetry.io/contrib/bridges/otelzap v0.10.0 h1:ojdSRDvjrnm30beHOmwsSvLpoRF40MlwNCA+Oo93kXU= +go.opentelemetry.io/contrib/bridges/otelzap v0.10.0/go.mod h1:oTTm4g7NEtHSV2i/0FeVdPaPgUIZPfQkFbq0vbzqnv0= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.59.0 h1:rgMkmiGfix9vFJDcDi1PK8WEQP4FLQwLDfhp5ZLpFeE= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.59.0/go.mod h1:ijPqXp5P6IRRByFVVg9DY8P5HkxkHE5ARIa+86aXPf4= -go.opentelemetry.io/otel v1.34.0 h1:zRLXxLCgL1WyKsPVrgbSdMN4c0FMkDAskSTQP+0hdUY= -go.opentelemetry.io/otel v1.34.0/go.mod h1:OWFPOQ+h4G8xpyjgqo4SxJYdDQ/qmRH+wivy7zzx9oI= +go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ= +go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y= +go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.11.0 h1:HMUytBT3uGhPKYY/u/G5MR9itrlSO2SMOsSD3Tk3k7A= +go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.11.0/go.mod h1:hdDXsiNLmdW/9BF2jQpnHHlhFajpWCEYfM6e5m2OAZg= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0 h1:OeNbIYk/2C15ckl7glBlOBp5+WlYsOElzTNmiPW/x60= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0/go.mod h1:7Bept48yIeqxP2OZ9/AqIpYS94h2or0aB4FypJTc8ZM= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0 h1:tgJ0uaNS4c98WRNUEx5U3aDlrDOI5Rs+1Vifcw4DJ8U= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0/go.mod h1:U7HYyW0zt/a9x5J1Kjs+r1f/d4ZHnYFclhYY2+YbeoE= go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.27.0 h1:/jlt1Y8gXWiHG9FBx6cJaIC5hYx5Fe64nC8w5Cylt/0= go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.27.0/go.mod h1:bmToOGOBZ4hA9ghphIc1PAf66VA8KOtsuy3+ScStG20= -go.opentelemetry.io/otel/metric v1.34.0 h1:+eTR3U0MyfWjRDhmFMxe2SsW64QrZ84AOhvqS7Y+PoQ= -go.opentelemetry.io/otel/metric v1.34.0/go.mod h1:CEDrp0fy2D0MvkXE+dPV7cMi8tWZwX3dmaIhwPOaqHE= -go.opentelemetry.io/otel/sdk v1.34.0 h1:95zS4k/2GOy069d321O8jWgYsW3MzVV+KuSPKp7Wr1A= -go.opentelemetry.io/otel/sdk v1.34.0/go.mod h1:0e/pNiaMAqaykJGKbi+tSjWfNNHMTxoC9qANsCzbyxU= -go.opentelemetry.io/otel/sdk/metric v1.32.0 h1:rZvFnvmvawYb0alrYkjraqJq0Z4ZUJAiyYCU9snn1CU= -go.opentelemetry.io/otel/sdk/metric v1.32.0/go.mod h1:PWeZlq0zt9YkYAp3gjKZ0eicRYvOh1Gd+X99x6GHpCQ= -go.opentelemetry.io/otel/trace v1.34.0 h1:+ouXS2V8Rd4hp4580a8q23bg0azF2nI8cqLYnC8mh/k= -go.opentelemetry.io/otel/trace v1.34.0/go.mod h1:Svm7lSjQD7kG7KJ/MUHPVXSDGz2OX4h0M2jHBhmSfRE= +go.opentelemetry.io/otel/log v0.11.0 h1:c24Hrlk5WJ8JWcwbQxdBqxZdOK7PcP/LFtOtwpDTe3Y= +go.opentelemetry.io/otel/log v0.11.0/go.mod h1:U/sxQ83FPmT29trrifhQg+Zj2lo1/IPN1PF6RTFqdwc= +go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M= +go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE= +go.opentelemetry.io/otel/sdk v1.35.0 h1:iPctf8iprVySXSKJffSS79eOjl9pvxV9ZqOWT0QejKY= +go.opentelemetry.io/otel/sdk v1.35.0/go.mod h1:+ga1bZliga3DxJ3CQGg3updiaAJoNECOgJREo9KHGQg= +go.opentelemetry.io/otel/sdk/log v0.11.0 h1:7bAOpjpGglWhdEzP8z0VXc4jObOiDEwr3IYbhBnjk2c= +go.opentelemetry.io/otel/sdk/log v0.11.0/go.mod h1:dndLTxZbwBstZoqsJB3kGsRPkpAgaJrWfQg3lhlHFFY= +go.opentelemetry.io/otel/sdk/metric v1.34.0 h1:5CeK9ujjbFVL5c1PhLuStg1wxA7vQv7ce1EK0Gyvahk= +go.opentelemetry.io/otel/sdk/metric v1.34.0/go.mod h1:jQ/r8Ze28zRKoNRdkjCZxfs6YvBTG1+YIqyFVFYec5w= +go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs= +go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc= go.opentelemetry.io/proto/otlp v1.5.0 h1:xJvq7gMzB31/d406fB8U5CBdyQGw4P399D1aQWU/3i4= go.opentelemetry.io/proto/otlp v1.5.0/go.mod h1:keN8WnHxOy8PG0rQZjJJ5A2ebUoafqWp0eVQ4yIXvJ4= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= @@ -270,8 +296,8 @@ golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.32.0 h1:euUpcYgM8WcP71gNpTqQCn6rC2t6ULUPiOzfWaXVVfc= -golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc= +golang.org/x/crypto v0.34.0 h1:+/C6tk6rf/+t5DhUketUbD1aNGqiSX3j15Z6xuIDlBA= +golang.org/x/crypto v0.34.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20250128182459-e0ece0dbea4c h1:KL/ZBHXgKGVmuZBZ01Lt57yE5ws8ZPSkkihmEyq7FXc= golang.org/x/exp v0.0.0-20250128182459-e0ece0dbea4c/go.mod h1:tujkw807nyEEAamNbDrEGzRav+ilXA7PCRAd6xsmwiU= @@ -293,11 +319,11 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.34.0 h1:Mb7Mrk043xzHgnRM88suvJFwzVrRfHEHJEl5/71CKw0= -golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k= +golang.org/x/net v0.35.0 h1:T5GQRQb2y08kTAByq9L4/bz8cipCdA8FbRTXewonqY8= +golang.org/x/net v0.35.0/go.mod h1:EglIi67kWsHKlRzzVMUD93VMSWGFOMSZgxFjparz1Qk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.25.0 h1:CY4y7XT9v0cRI9oupztF8AgiIu99L/ksR/Xp/6jrZ70= -golang.org/x/oauth2 v0.25.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.26.0 h1:afQXWNNaeC4nvZ0Ed9XvCCzXM6UHJG7iCg0W4fPqSBE= +golang.org/x/oauth2 v0.26.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -315,14 +341,14 @@ golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU= -golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.28.0 h1:/Ts8HFuMR2E6IP/jlo7QVLZHggjKQbhu/7H0LJFr3Gg= -golang.org/x/term v0.28.0/go.mod h1:Sw/lC2IAUZ92udQNf3WodGtn4k/XoLyZoh8v/8uiwek= +golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc= +golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU= +golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= -golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= +golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= +golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -343,19 +369,19 @@ google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto/googleapis/api v0.0.0-20250127172529-29210b9bc287 h1:A2ni10G3UlplFrWdCDJTl7D7mJ7GSRm37S+PDimaKRw= -google.golang.org/genproto/googleapis/api v0.0.0-20250127172529-29210b9bc287/go.mod h1:iYONQfRdizDB8JJBybql13nArx91jcUk7zCXEsOofM4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250127172529-29210b9bc287 h1:J1H9f+LEdWAfHcez/4cvaVBox7cOYT+IU6rgqj5x++8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250127172529-29210b9bc287/go.mod h1:8BS3B93F/U1juMFq9+EDk+qOT5CO1R9IzXxG3PTqiRk= +google.golang.org/genproto/googleapis/api v0.0.0-20250218202821-56aae31c358a h1:nwKuGPlUAt+aR+pcrkfFRrTU1BVrSmYyYMxYbUIVHr0= +google.golang.org/genproto/googleapis/api v0.0.0-20250218202821-56aae31c358a/go.mod h1:3kWAYMk1I75K4vykHtKt2ycnOgpA6974V7bREqbsenU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250219182151-9fdb1cabc7b2 h1:DMTIbak9GhdaSxEjvVzAeNZvyc03I61duqNbnm3SU0M= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250219182151-9fdb1cabc7b2/go.mod h1:LuRYeWDFV6WOn90g357N17oMCaxpgCnbi/44qJvDn2I= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.70.0 h1:pWFv03aZoHzlRKHWicjsZytKAiYCtNS0dHbXnIdq7jQ= -google.golang.org/grpc v1.70.0/go.mod h1:ofIJqVKDXx/JiXrwr2IG4/zwdH9txy3IlF40RmcJSQw= -google.golang.org/protobuf v1.36.4 h1:6A3ZDJHn/eNqc1i+IdefRzy/9PokBTPvcqMySR7NNIM= -google.golang.org/protobuf v1.36.4/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/grpc v1.71.0 h1:kF77BGdPTQ4/JZWMlb9VpJ5pa25aqvVqogsxNHHdeBg= +google.golang.org/grpc v1.71.0/go.mod h1:H0GRtasmQOh9LkFoCPDu3ZrwUtD1YGE+b2vYBYd/8Ec= +google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM= +google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= diff --git a/vendor/github.com/aws/aws-lambda-go/LICENSE b/vendor/github.com/aws/aws-lambda-go/LICENSE new file mode 100644 index 00000000..6b0b1270 --- /dev/null +++ b/vendor/github.com/aws/aws-lambda-go/LICENSE @@ -0,0 +1,203 @@ + + 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-lambda-go/LICENSE-LAMBDACODE b/vendor/github.com/aws/aws-lambda-go/LICENSE-LAMBDACODE new file mode 100644 index 00000000..11f98088 --- /dev/null +++ b/vendor/github.com/aws/aws-lambda-go/LICENSE-LAMBDACODE @@ -0,0 +1,15 @@ +MIT No Attribution + +Permission is hereby granted, free of charge, to any person obtaining a copy of this +software and associated documentation files (the "Software"), to deal in the Software +without restriction, including without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/vendor/github.com/aws/aws-lambda-go/LICENSE-SUMMARY b/vendor/github.com/aws/aws-lambda-go/LICENSE-SUMMARY new file mode 100644 index 00000000..cd56e29e --- /dev/null +++ b/vendor/github.com/aws/aws-lambda-go/LICENSE-SUMMARY @@ -0,0 +1,7 @@ +Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +Lambda functions are made available under a modified MIT license. +See LICENSE-LAMBDACODE for details. + +The remainder of the project is made available under the terms of the +Apache License, version 2.0. See LICENSE for details. diff --git a/vendor/github.com/aws/aws-lambda-go/lambda/README.md b/vendor/github.com/aws/aws-lambda-go/lambda/README.md new file mode 100644 index 00000000..dcaca6d1 --- /dev/null +++ b/vendor/github.com/aws/aws-lambda-go/lambda/README.md @@ -0,0 +1,3 @@ +# Overview + +[](https://pkg.go.dev/github.com/aws/aws-lambda-go/lambda) diff --git a/vendor/github.com/aws/aws-lambda-go/lambda/entry.go b/vendor/github.com/aws/aws-lambda-go/lambda/entry.go new file mode 100644 index 00000000..da82fab4 --- /dev/null +++ b/vendor/github.com/aws/aws-lambda-go/lambda/entry.go @@ -0,0 +1,113 @@ +// Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +package lambda + +import ( + "context" + "log" + "os" +) + +// Start takes a handler and talks to an internal Lambda endpoint to pass requests to the handler. If the +// handler does not match one of the supported types an appropriate error message will be returned to the caller. +// Start blocks, and does not return after being called. +// +// Rules: +// +// - handler must be a function +// - handler may take between 0 and two arguments. +// - if there are two arguments, the first argument must satisfy the "context.Context" interface. +// - handler may return between 0 and two values. +// - if there are two return values, the second return value must be an error. +// - if there is one return value it must be an error. +// +// Valid function signatures: +// +// func () +// func (TIn) +// func () error +// func (TIn) error +// func () (TOut, error) +// func (TIn) (TOut, error) +// func (context.Context) +// func (context.Context) error +// func (context.Context) (TOut, error) +// func (context.Context, TIn) +// func (context.Context, TIn) error +// func (context.Context, TIn) (TOut, error) +// +// Where "TIn" and "TOut" are types compatible with the "encoding/json" standard library. +// See https://golang.org/pkg/encoding/json/#Unmarshal for how deserialization behaves +// +// "TOut" may also implement the io.Reader interface. +// If "TOut" is both json serializable and implements io.Reader, then the json serialization is used. +func Start(handler interface{}) { + StartWithOptions(handler) +} + +// StartWithContext is the same as Start except sets the base context for the function. +// +// Deprecated: use lambda.StartWithOptions(handler, lambda.WithContext(ctx)) instead +func StartWithContext(ctx context.Context, handler interface{}) { + StartWithOptions(handler, WithContext(ctx)) +} + +// StartHandler takes in a Handler wrapper interface which can be implemented either by a +// custom function or a struct. +// +// Handler implementation requires a single "Invoke()" function: +// +// func Invoke(context.Context, []byte) ([]byte, error) +// +// Deprecated: use lambda.Start(handler) instead +func StartHandler(handler Handler) { + StartWithOptions(handler) +} + +// StartWithOptions is the same as Start after the application of any handler options specified +func StartWithOptions(handler interface{}, options ...Option) { + start(newHandler(handler, options...)) +} + +type startFunction struct { + env string + f func(envValue string, handler Handler) error +} + +var ( + runtimeAPIStartFunction = &startFunction{ + env: "AWS_LAMBDA_RUNTIME_API", + f: startRuntimeAPILoop, + } + startFunctions = []*startFunction{runtimeAPIStartFunction} + + // This allows end to end testing of the Start functions, by tests overwriting this function to keep the program alive + logFatalf = log.Fatalf +) + +// StartHandlerWithContext is the same as StartHandler except sets the base context for the function. +// +// Handler implementation requires a single "Invoke()" function: +// +// func Invoke(context.Context, []byte) ([]byte, error) +// +// Deprecated: use lambda.StartWithOptions(handler, lambda.WithContext(ctx)) instead +func StartHandlerWithContext(ctx context.Context, handler Handler) { + StartWithOptions(handler, WithContext(ctx)) +} + +func start(handler *handlerOptions) { + var keys []string + for _, start := range startFunctions { + config := os.Getenv(start.env) + if config != "" { + // in normal operation, the start function never returns + // if it does, exit!, this triggers a restart of the lambda function + err := start.f(config, handler) + logFatalf("%v", err) + } + keys = append(keys, start.env) + } + logFatalf("expected AWS Lambda environment variables %s are not defined", keys) + +} diff --git a/vendor/github.com/aws/aws-lambda-go/lambda/entry_generic.go b/vendor/github.com/aws/aws-lambda-go/lambda/entry_generic.go new file mode 100644 index 00000000..29708385 --- /dev/null +++ b/vendor/github.com/aws/aws-lambda-go/lambda/entry_generic.go @@ -0,0 +1,21 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved + +package lambda + +import ( + "context" +) + +// HandlerFunc represents a valid input with two arguments and two returns as described by Start +type HandlerFunc[TIn, TOut any] interface { + func(context.Context, TIn) (TOut, error) +} + +// StartHandlerFunc is the same as StartWithOptions except that it takes a generic input +// so that the function signature can be validated at compile time. +func StartHandlerFunc[TIn any, TOut any, H HandlerFunc[TIn, TOut]](handler H, options ...Option) { + start(newHandler(handler, options...)) +} diff --git a/vendor/github.com/aws/aws-lambda-go/lambda/errors.go b/vendor/github.com/aws/aws-lambda-go/lambda/errors.go new file mode 100644 index 00000000..5d482d04 --- /dev/null +++ b/vendor/github.com/aws/aws-lambda-go/lambda/errors.go @@ -0,0 +1,46 @@ +// Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved + +package lambda + +import ( + "reflect" + + "github.com/aws/aws-lambda-go/lambda/messages" +) + +func getErrorType(err interface{}) string { + errorType := reflect.TypeOf(err) + if errorType.Kind() == reflect.Ptr { + return errorType.Elem().Name() + } + return errorType.Name() +} + +func lambdaErrorResponse(invokeError error) *messages.InvokeResponse_Error { + if ive, ok := invokeError.(messages.InvokeResponse_Error); ok { + return &ive + } + var errorName string + if errorType := reflect.TypeOf(invokeError); errorType.Kind() == reflect.Ptr { + errorName = errorType.Elem().Name() + } else { + errorName = errorType.Name() + } + return &messages.InvokeResponse_Error{ + Message: invokeError.Error(), + Type: errorName, + } +} + +func lambdaPanicResponse(err interface{}) *messages.InvokeResponse_Error { + if ive, ok := err.(messages.InvokeResponse_Error); ok { + return &ive + } + panicInfo := getPanicInfo(err) + return &messages.InvokeResponse_Error{ + Message: panicInfo.Message, + Type: getErrorType(err), + StackTrace: panicInfo.StackTrace, + ShouldExit: true, + } +} diff --git a/vendor/github.com/aws/aws-lambda-go/lambda/extensions_api_client.go b/vendor/github.com/aws/aws-lambda-go/lambda/extensions_api_client.go new file mode 100644 index 00000000..c9703891 --- /dev/null +++ b/vendor/github.com/aws/aws-lambda-go/lambda/extensions_api_client.go @@ -0,0 +1,90 @@ +package lambda + +import ( + "bytes" + "encoding/json" + "fmt" + "io" + "io/ioutil" //nolint: staticcheck + "net/http" +) + +const ( + headerExtensionName = "Lambda-Extension-Name" + headerExtensionIdentifier = "Lambda-Extension-Identifier" + extensionAPIVersion = "2020-01-01" +) + +type extensionAPIEventType string + +const ( + extensionInvokeEvent extensionAPIEventType = "INVOKE" //nolint:deadcode,unused,varcheck + extensionShutdownEvent extensionAPIEventType = "SHUTDOWN" //nolint:deadcode,unused,varcheck +) + +type extensionAPIClient struct { + baseURL string + httpClient *http.Client +} + +func newExtensionAPIClient(address string) *extensionAPIClient { + client := &http.Client{ + Timeout: 0, // connections to the extensions API are never expected to time out + } + endpoint := "http://" + address + "/" + extensionAPIVersion + "/extension/" + return &extensionAPIClient{ + baseURL: endpoint, + httpClient: client, + } +} + +func (c *extensionAPIClient) register(name string, events ...extensionAPIEventType) (string, error) { + url := c.baseURL + "register" + body, _ := json.Marshal(struct { + Events []extensionAPIEventType `json:"events"` + }{ + Events: events, + }) + + req, _ := http.NewRequest(http.MethodPost, url, bytes.NewReader(body)) + req.Header.Add(headerExtensionName, name) + res, err := c.httpClient.Do(req) + if err != nil { + return "", fmt.Errorf("failed to register extension: %v", err) + } + defer res.Body.Close() + _, _ = io.Copy(ioutil.Discard, res.Body) + + if res.StatusCode != http.StatusOK { + return "", fmt.Errorf("failed to register extension, got response status: %d %s", res.StatusCode, http.StatusText(res.StatusCode)) + } + + return res.Header.Get(headerExtensionIdentifier), nil +} + +type extensionEventResponse struct { + EventType extensionAPIEventType + // ... the rest not implemented +} + +func (c *extensionAPIClient) next(id string) (response extensionEventResponse, err error) { + url := c.baseURL + "event/next" + + req, _ := http.NewRequest(http.MethodGet, url, nil) + req.Header.Add(headerExtensionIdentifier, id) + res, err := c.httpClient.Do(req) + if err != nil { + err = fmt.Errorf("failed to get extension event: %v", err) + return + } + defer res.Body.Close() + _, _ = io.Copy(ioutil.Discard, res.Body) + + if res.StatusCode != http.StatusOK { + err = fmt.Errorf("failed to register extension, got response status: %d %s", res.StatusCode, http.StatusText(res.StatusCode)) + return + } + + err = json.NewDecoder(res.Body).Decode(&response) + return +} diff --git a/vendor/github.com/aws/aws-lambda-go/lambda/handler.go b/vendor/github.com/aws/aws-lambda-go/lambda/handler.go new file mode 100644 index 00000000..c455656d --- /dev/null +++ b/vendor/github.com/aws/aws-lambda-go/lambda/handler.go @@ -0,0 +1,395 @@ +// Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +package lambda + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "io/ioutil" // nolint:staticcheck + "reflect" + "strings" + + "github.com/aws/aws-lambda-go/lambda/handlertrace" +) + +type Handler interface { + Invoke(ctx context.Context, payload []byte) ([]byte, error) +} + +type handlerOptions struct { + handlerFunc + baseContext context.Context + contextValues map[interface{}]interface{} + jsonRequestUseNumber bool + jsonRequestDisallowUnknownFields bool + jsonResponseEscapeHTML bool + jsonResponseIndentPrefix string + jsonResponseIndentValue string + enableSIGTERM bool + sigtermCallbacks []func() +} + +type Option func(*handlerOptions) + +// WithContext is a HandlerOption that sets the base context for all invocations of the handler. +// +// Usage: +// +// lambda.StartWithOptions( +// func (ctx context.Context) (string, error) { +// return ctx.Value("foo"), nil +// }, +// lambda.WithContext(context.WithValue(context.Background(), "foo", "bar")) +// ) +func WithContext(ctx context.Context) Option { + return Option(func(h *handlerOptions) { + h.baseContext = ctx + }) +} + +// WithContextValue adds a value to the handler context. +// If a base context was set using WithContext, that base is used as the parent. +// +// Usage: +// +// lambda.StartWithOptions( +// func (ctx context.Context) (string, error) { +// return ctx.Value("foo"), nil +// }, +// lambda.WithContextValue("foo", "bar") +// ) +func WithContextValue(key interface{}, value interface{}) Option { + return Option(func(h *handlerOptions) { + h.contextValues[key] = value + }) +} + +// WithSetEscapeHTML sets the SetEscapeHTML argument on the underlying json encoder +// +// Usage: +// +// lambda.StartWithOptions( +// func () (string, error) { +// return "
hello!>", nil +// }, +// lambda.WithSetEscapeHTML(true), +// ) +func WithSetEscapeHTML(escapeHTML bool) Option { + return Option(func(h *handlerOptions) { + h.jsonResponseEscapeHTML = escapeHTML + }) +} + +// WithSetIndent sets the SetIndent argument on the underling json encoder +// +// Usage: +// +// lambda.StartWithOptions( +// func (event any) (any, error) { +// return event, nil +// }, +// lambda.WithSetIndent(">"," "), +// ) +func WithSetIndent(prefix, indent string) Option { + return Option(func(h *handlerOptions) { + h.jsonResponseIndentPrefix = prefix + h.jsonResponseIndentValue = indent + }) +} + +// WithUseNumber sets the UseNumber option on the underlying json decoder +// +// Usage: +// +// lambda.StartWithOptions( +// func (event any) (any, error) { +// return event, nil +// }, +// lambda.WithUseNumber(true) +// ) +func WithUseNumber(useNumber bool) Option { + return Option(func(h *handlerOptions) { + h.jsonRequestUseNumber = useNumber + }) +} + +// WithUseNumber sets the DisallowUnknownFields option on the underlying json decoder +// +// Usage: +// +// lambda.StartWithOptions( +// func (event any) (any, error) { +// return event, nil +// }, +// lambda.WithDisallowUnknownFields(true) +// ) +func WithDisallowUnknownFields(disallowUnknownFields bool) Option { + return Option(func(h *handlerOptions) { + h.jsonRequestDisallowUnknownFields = disallowUnknownFields + }) +} + +// WithEnableSIGTERM enables SIGTERM behavior within the Lambda platform on container spindown. +// SIGKILL will occur ~500ms after SIGTERM. +// Optionally, an array of callback functions to run on SIGTERM may be provided. +// +// Usage: +// +// lambda.StartWithOptions( +// func (event any) (any, error) { +// return event, nil +// }, +// lambda.WithEnableSIGTERM(func() { +// log.Print("function container shutting down...") +// }) +// ) +func WithEnableSIGTERM(callbacks ...func()) Option { + return Option(func(h *handlerOptions) { + h.sigtermCallbacks = append(h.sigtermCallbacks, callbacks...) + h.enableSIGTERM = true + }) +} + +// handlerTakesContext returns whether the handler takes a context.Context as its first argument. +func handlerTakesContext(handler reflect.Type) (bool, error) { + switch handler.NumIn() { + case 0: + return false, nil + case 1: + contextType := reflect.TypeOf((*context.Context)(nil)).Elem() + argumentType := handler.In(0) + if argumentType.Kind() != reflect.Interface { + return false, nil + } + + // handlers like func(event any) are valid. + if argumentType.NumMethod() == 0 { + return false, nil + } + + if !contextType.Implements(argumentType) || !argumentType.Implements(contextType) { + return false, fmt.Errorf("handler takes an interface, but it is not context.Context: %q", argumentType.Name()) + } + return true, nil + case 2: + contextType := reflect.TypeOf((*context.Context)(nil)).Elem() + argumentType := handler.In(0) + if argumentType.Kind() != reflect.Interface || !contextType.Implements(argumentType) || !argumentType.Implements(contextType) { + return false, fmt.Errorf("handler takes two arguments, but the first is not Context. got %s", argumentType.Kind()) + } + return true, nil + } + return false, fmt.Errorf("handlers may not take more than two arguments, but handler takes %d", handler.NumIn()) +} + +func validateReturns(handler reflect.Type) error { + errorType := reflect.TypeOf((*error)(nil)).Elem() + + switch n := handler.NumOut(); { + case n > 2: + return fmt.Errorf("handler may not return more than two values") + case n > 1: + if !handler.Out(1).Implements(errorType) { + return fmt.Errorf("handler returns two values, but the second does not implement error") + } + case n == 1: + if !handler.Out(0).Implements(errorType) { + return fmt.Errorf("handler returns a single value, but it does not implement error") + } + } + + return nil +} + +// NewHandler creates a base lambda handler from the given handler function. The +// returned Handler performs JSON serialization and deserialization, and +// delegates to the input handler function. The handler function parameter must +// satisfy the rules documented by Start. If handlerFunc is not a valid +// handler, the returned Handler simply reports the validation error. +func NewHandler(handlerFunc interface{}) Handler { + return NewHandlerWithOptions(handlerFunc) +} + +// NewHandlerWithOptions creates a base lambda handler from the given handler function. The +// returned Handler performs JSON serialization and deserialization, and +// delegates to the input handler function. The handler function parameter must +// satisfy the rules documented by Start. If handlerFunc is not a valid +// handler, the returned Handler simply reports the validation error. +func NewHandlerWithOptions(handlerFunc interface{}, options ...Option) Handler { + return newHandler(handlerFunc, options...) +} + +func newHandler(handlerFunc interface{}, options ...Option) *handlerOptions { + if h, ok := handlerFunc.(*handlerOptions); ok { + return h + } + h := &handlerOptions{ + baseContext: context.Background(), + contextValues: map[interface{}]interface{}{}, + jsonResponseEscapeHTML: false, + jsonResponseIndentPrefix: "", + jsonResponseIndentValue: "", + } + for _, option := range options { + option(h) + } + for k, v := range h.contextValues { + h.baseContext = context.WithValue(h.baseContext, k, v) + } + if h.enableSIGTERM { + enableSIGTERM(h.sigtermCallbacks) + } + h.handlerFunc = reflectHandler(handlerFunc, h) + return h +} + +type handlerFunc func(context.Context, []byte) (io.Reader, error) + +// back-compat for the rpc mode +func (h handlerFunc) Invoke(ctx context.Context, payload []byte) ([]byte, error) { + response, err := h(ctx, payload) + if err != nil { + return nil, err + } + // if the response needs to be closed (ex: net.Conn, os.File), ensure it's closed before the next invoke to prevent a resource leak + if response, ok := response.(io.Closer); ok { + defer response.Close() + } + // optimization: if the response is a *bytes.Buffer, a copy can be eliminated + switch response := response.(type) { + case *jsonOutBuffer: + return response.Bytes(), nil + case *bytes.Buffer: + return response.Bytes(), nil + } + b, err := ioutil.ReadAll(response) + if err != nil { + return nil, err + } + return b, nil +} + +func errorHandler(err error) handlerFunc { + return func(_ context.Context, _ []byte) (io.Reader, error) { + return nil, err + } +} + +type jsonOutBuffer struct { + *bytes.Buffer +} + +func (j *jsonOutBuffer) ContentType() string { + return contentTypeJSON +} + +func reflectHandler(f interface{}, h *handlerOptions) handlerFunc { + if f == nil { + return errorHandler(errors.New("handler is nil")) + } + + // back-compat: types with reciever `Invoke(context.Context, []byte) ([]byte, error)` need the return bytes wrapped + if handler, ok := f.(Handler); ok { + return func(ctx context.Context, payload []byte) (io.Reader, error) { + b, err := handler.Invoke(ctx, payload) + if err != nil { + return nil, err + } + return bytes.NewBuffer(b), nil + } + } + + handler := reflect.ValueOf(f) + handlerType := reflect.TypeOf(f) + if handlerType.Kind() != reflect.Func { + return errorHandler(fmt.Errorf("handler kind %s is not %s", handlerType.Kind(), reflect.Func)) + } + + takesContext, err := handlerTakesContext(handlerType) + if err != nil { + return errorHandler(err) + } + + if err := validateReturns(handlerType); err != nil { + return errorHandler(err) + } + + out := &jsonOutBuffer{bytes.NewBuffer(nil)} + return func(ctx context.Context, payload []byte) (io.Reader, error) { + out.Reset() + in := bytes.NewBuffer(payload) + decoder := json.NewDecoder(in) + if h.jsonRequestUseNumber { + decoder.UseNumber() + } + if h.jsonRequestDisallowUnknownFields { + decoder.DisallowUnknownFields() + } + encoder := json.NewEncoder(out) + encoder.SetEscapeHTML(h.jsonResponseEscapeHTML) + encoder.SetIndent(h.jsonResponseIndentPrefix, h.jsonResponseIndentValue) + + trace := handlertrace.FromContext(ctx) + + // construct arguments + var args []reflect.Value + if takesContext { + args = append(args, reflect.ValueOf(ctx)) + } + if (handlerType.NumIn() == 1 && !takesContext) || handlerType.NumIn() == 2 { + eventType := handlerType.In(handlerType.NumIn() - 1) + event := reflect.New(eventType) + if err := decoder.Decode(event.Interface()); err != nil { + return nil, err + } + if nil != trace.RequestEvent { + trace.RequestEvent(ctx, event.Elem().Interface()) + } + args = append(args, event.Elem()) + } + + response := handler.Call(args) + + // return the error, if any + if len(response) > 0 { + if errVal, ok := response[len(response)-1].Interface().(error); ok && errVal != nil { + return nil, errVal + } + } + // set the response value, if any + var val interface{} + if len(response) > 1 { + val = response[0].Interface() + if nil != trace.ResponseEvent { + trace.ResponseEvent(ctx, val) + } + } + + // encode to JSON + if err := encoder.Encode(val); err != nil { + // if response is not JSON serializable, but the response type is a reader, return it as-is + if reader, ok := val.(io.Reader); ok { + return reader, nil + } + return nil, err + } + + // if response value is an io.Reader, return it as-is + if reader, ok := val.(io.Reader); ok { + // back-compat, don't return the reader if the value serialized to a non-empty json + if strings.HasPrefix(out.String(), "{}") { + return reader, nil + } + } + + // back-compat, strip the encoder's trailing newline unless WithSetIndent was used + if h.jsonResponseIndentValue == "" && h.jsonResponseIndentPrefix == "" { + out.Truncate(out.Len() - 1) + } + return out, nil + } +} diff --git a/vendor/github.com/aws/aws-lambda-go/lambda/handlertrace/trace.go b/vendor/github.com/aws/aws-lambda-go/lambda/handlertrace/trace.go new file mode 100644 index 00000000..cdd452ff --- /dev/null +++ b/vendor/github.com/aws/aws-lambda-go/lambda/handlertrace/trace.go @@ -0,0 +1,44 @@ +// Package handlertrace allows middleware authors using lambda.NewHandler to +// instrument request and response events. +package handlertrace + +import ( + "context" +) + +// HandlerTrace allows handlers which wrap the return value of lambda.NewHandler +// to access to the request and response events. +type HandlerTrace struct { + RequestEvent func(context.Context, interface{}) + ResponseEvent func(context.Context, interface{}) +} + +func callbackCompose(f1, f2 func(context.Context, interface{})) func(context.Context, interface{}) { + return func(ctx context.Context, event interface{}) { + if nil != f1 { + f1(ctx, event) + } + if nil != f2 { + f2(ctx, event) + } + } +} + +type handlerTraceKey struct{} + +// NewContext adds callbacks to the provided context which allows handlers which +// wrap the return value of lambda.NewHandler to access to the request and +// response events. +func NewContext(ctx context.Context, trace HandlerTrace) context.Context { + existing := FromContext(ctx) + return context.WithValue(ctx, handlerTraceKey{}, HandlerTrace{ + RequestEvent: callbackCompose(existing.RequestEvent, trace.RequestEvent), + ResponseEvent: callbackCompose(existing.ResponseEvent, trace.ResponseEvent), + }) +} + +// FromContext returns the HandlerTrace associated with the provided context. +func FromContext(ctx context.Context) HandlerTrace { + trace, _ := ctx.Value(handlerTraceKey{}).(HandlerTrace) + return trace +} diff --git a/vendor/github.com/aws/aws-lambda-go/lambda/invoke_loop.go b/vendor/github.com/aws/aws-lambda-go/lambda/invoke_loop.go new file mode 100644 index 00000000..338237ea --- /dev/null +++ b/vendor/github.com/aws/aws-lambda-go/lambda/invoke_loop.go @@ -0,0 +1,212 @@ +// Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved + +package lambda + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "io" + "log" + "os" + "strconv" + "time" + + "github.com/aws/aws-lambda-go/lambda/messages" + "github.com/aws/aws-lambda-go/lambdacontext" +) + +const ( + msPerS = int64(time.Second / time.Millisecond) + nsPerMS = int64(time.Millisecond / time.Nanosecond) +) + +// TODO: replace with time.UnixMillis after dropping version <1.17 from CI workflows +func unixMS(ms int64) time.Time { + return time.Unix(ms/msPerS, (ms%msPerS)*nsPerMS) +} + +// startRuntimeAPILoop will return an error if handling a particular invoke resulted in a non-recoverable error +func startRuntimeAPILoop(api string, handler Handler) error { + client := newRuntimeAPIClient(api) + h := newHandler(handler) + for { + invoke, err := client.next() + if err != nil { + return err + } + if err = handleInvoke(invoke, h); err != nil { + return err + } + } +} + +// handleInvoke returns an error if the function panics, or some other non-recoverable error occurred +func handleInvoke(invoke *invoke, handler *handlerOptions) error { + // set the deadline + deadline, err := parseDeadline(invoke) + if err != nil { + return reportFailure(invoke, lambdaErrorResponse(err)) + } + ctx, cancel := context.WithDeadline(handler.baseContext, deadline) + defer cancel() + + // set the invoke metadata values + lc := lambdacontext.LambdaContext{ + AwsRequestID: invoke.id, + InvokedFunctionArn: invoke.headers.Get(headerInvokedFunctionARN), + } + if err := parseClientContext(invoke, &lc.ClientContext); err != nil { + return reportFailure(invoke, lambdaErrorResponse(err)) + } + if err := parseCognitoIdentity(invoke, &lc.Identity); err != nil { + return reportFailure(invoke, lambdaErrorResponse(err)) + } + ctx = lambdacontext.NewContext(ctx, &lc) + + // set the trace id + traceID := invoke.headers.Get(headerTraceID) + os.Setenv("_X_AMZN_TRACE_ID", traceID) + // nolint:staticcheck + ctx = context.WithValue(ctx, "x-amzn-trace-id", traceID) + + // call the handler, marshal any returned error + response, invokeErr := callBytesHandlerFunc(ctx, invoke.payload, handler.handlerFunc) + if invokeErr != nil { + if err := reportFailure(invoke, invokeErr); err != nil { + return err + } + if invokeErr.ShouldExit { + return fmt.Errorf("calling the handler function resulted in a panic, the process should exit") + } + return nil + } + // if the response needs to be closed (ex: net.Conn, os.File), ensure it's closed before the next invoke to prevent a resource leak + if response, ok := response.(io.Closer); ok { + defer response.Close() + } + + // if the response defines a content-type, plumb it through + contentType := contentTypeBytes + type ContentType interface{ ContentType() string } + if response, ok := response.(ContentType); ok { + contentType = response.ContentType() + } + + if err := invoke.success(response, contentType); err != nil { + return fmt.Errorf("unexpected error occurred when sending the function functionResponse to the API: %v", err) + } + + return nil +} + +func reportFailure(invoke *invoke, invokeErr *messages.InvokeResponse_Error) error { + errorPayload := safeMarshal(invokeErr) + log.Printf("%s", errorPayload) + + causeForXRay, err := json.Marshal(makeXRayError(invokeErr)) + if err != nil { + return fmt.Errorf("unexpected error occured when serializing the function error cause for X-Ray: %v", err) + } + + if err := invoke.failure(bytes.NewReader(errorPayload), contentTypeJSON, causeForXRay); err != nil { + return fmt.Errorf("unexpected error occurred when sending the function error to the API: %v", err) + } + return nil +} + +func callBytesHandlerFunc(ctx context.Context, payload []byte, handler handlerFunc) (response io.Reader, invokeErr *messages.InvokeResponse_Error) { + defer func() { + if err := recover(); err != nil { + invokeErr = lambdaPanicResponse(err) + } + }() + response, err := handler(ctx, payload) + if err != nil { + return nil, lambdaErrorResponse(err) + } + return response, nil +} + +func parseDeadline(invoke *invoke) (time.Time, error) { + deadlineEpochMS, err := strconv.ParseInt(invoke.headers.Get(headerDeadlineMS), 10, 64) + if err != nil { + return time.Time{}, fmt.Errorf("failed to parse deadline: %v", err) + } + return unixMS(deadlineEpochMS), nil +} + +func parseCognitoIdentity(invoke *invoke, out *lambdacontext.CognitoIdentity) error { + cognitoIdentityJSON := invoke.headers.Get(headerCognitoIdentity) + if cognitoIdentityJSON != "" { + if err := json.Unmarshal([]byte(cognitoIdentityJSON), out); err != nil { + return fmt.Errorf("failed to unmarshal cognito identity json: %v", err) + } + } + return nil +} + +func parseClientContext(invoke *invoke, out *lambdacontext.ClientContext) error { + clientContextJSON := invoke.headers.Get(headerClientContext) + if clientContextJSON != "" { + if err := json.Unmarshal([]byte(clientContextJSON), out); err != nil { + return fmt.Errorf("failed to unmarshal client context json: %v", err) + } + } + return nil +} + +func safeMarshal(v interface{}) []byte { + payload, err := json.Marshal(v) + if err != nil { + v := &messages.InvokeResponse_Error{ + Type: "Runtime.SerializationError", + Message: err.Error(), + } + payload, err := json.Marshal(v) + if err != nil { + panic(err) // never reach + } + return payload + } + return payload +} + +type xrayException struct { + Type string `json:"type"` + Message string `json:"message"` + Stack []*messages.InvokeResponse_Error_StackFrame `json:"stack"` +} + +type xrayError struct { + WorkingDirectory string `json:"working_directory"` + Exceptions []xrayException `json:"exceptions"` + Paths []string `json:"paths"` +} + +func makeXRayError(invokeResponseError *messages.InvokeResponse_Error) *xrayError { + paths := make([]string, 0, len(invokeResponseError.StackTrace)) + visitedPaths := make(map[string]struct{}, len(invokeResponseError.StackTrace)) + for _, frame := range invokeResponseError.StackTrace { + if _, exists := visitedPaths[frame.Path]; !exists { + visitedPaths[frame.Path] = struct{}{} + paths = append(paths, frame.Path) + } + } + + cwd, _ := os.Getwd() + exceptions := []xrayException{{ + Type: invokeResponseError.Type, + Message: invokeResponseError.Message, + Stack: invokeResponseError.StackTrace, + }} + if exceptions[0].Stack == nil { + exceptions[0].Stack = []*messages.InvokeResponse_Error_StackFrame{} + } + return &xrayError{ + WorkingDirectory: cwd, + Paths: paths, + Exceptions: exceptions, + } +} diff --git a/vendor/github.com/aws/aws-lambda-go/lambda/messages/README.md b/vendor/github.com/aws/aws-lambda-go/lambda/messages/README.md new file mode 100644 index 00000000..04eddfad --- /dev/null +++ b/vendor/github.com/aws/aws-lambda-go/lambda/messages/README.md @@ -0,0 +1,3 @@ +# Overview + +[](https://pkg.go.dev/github.com/aws/aws-lambda-go/lambda/messages) diff --git a/vendor/github.com/aws/aws-lambda-go/lambda/messages/messages.go b/vendor/github.com/aws/aws-lambda-go/lambda/messages/messages.go new file mode 100644 index 00000000..ea63001e --- /dev/null +++ b/vendor/github.com/aws/aws-lambda-go/lambda/messages/messages.go @@ -0,0 +1,53 @@ +// Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +package messages + +import "fmt" + +type PingRequest struct { +} + +type PingResponse struct { +} + +//nolint:stylecheck +type InvokeRequest_Timestamp struct { + Seconds int64 + Nanos int64 +} + +//nolint:stylecheck +type InvokeRequest struct { + Payload []byte + RequestId string //nolint:stylecheck + XAmznTraceId string + Deadline InvokeRequest_Timestamp + InvokedFunctionArn string + CognitoIdentityId string //nolint:stylecheck + CognitoIdentityPoolId string //nolint:stylecheck + ClientContext []byte +} + +type InvokeResponse struct { + Payload []byte + Error *InvokeResponse_Error +} + +//nolint:stylecheck +type InvokeResponse_Error struct { + Message string `json:"errorMessage"` + Type string `json:"errorType"` + StackTrace []*InvokeResponse_Error_StackFrame `json:"stackTrace,omitempty"` + ShouldExit bool `json:"-"` +} + +func (e InvokeResponse_Error) Error() string { + return fmt.Sprintf("%#v", e) +} + +//nolint:stylecheck +type InvokeResponse_Error_StackFrame struct { + Path string `json:"path"` + Line int32 `json:"line"` + Label string `json:"label"` +} diff --git a/vendor/github.com/aws/aws-lambda-go/lambda/panic.go b/vendor/github.com/aws/aws-lambda-go/lambda/panic.go new file mode 100644 index 00000000..013d3abd --- /dev/null +++ b/vendor/github.com/aws/aws-lambda-go/lambda/panic.go @@ -0,0 +1,99 @@ +// Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +package lambda + +import ( + "fmt" + "runtime" + "strings" + + "github.com/aws/aws-lambda-go/lambda/messages" +) + +type panicInfo struct { + Message string // Value passed to panic call, converted to string + StackTrace []*messages.InvokeResponse_Error_StackFrame // Stack trace of the panic +} + +func getPanicInfo(value interface{}) panicInfo { + message := getPanicMessage(value) + stack := getPanicStack() + + return panicInfo{Message: message, StackTrace: stack} +} + +func getPanicMessage(value interface{}) string { + return fmt.Sprintf("%v", value) +} + +var defaultErrorFrameCount = 32 + +func getPanicStack() []*messages.InvokeResponse_Error_StackFrame { + s := make([]uintptr, defaultErrorFrameCount) + const framesToHide = 3 // this (getPanicStack) -> getPanicInfo -> handler defer func + n := runtime.Callers(framesToHide, s) + if n == 0 { + return make([]*messages.InvokeResponse_Error_StackFrame, 0) + } + + s = s[:n] + + return convertStack(s) +} + +func convertStack(s []uintptr) []*messages.InvokeResponse_Error_StackFrame { + var converted []*messages.InvokeResponse_Error_StackFrame + frames := runtime.CallersFrames(s) + + for { + frame, more := frames.Next() + + formattedFrame := formatFrame(frame) + converted = append(converted, formattedFrame) + + if !more { + break + } + } + return converted +} + +func formatFrame(inputFrame runtime.Frame) *messages.InvokeResponse_Error_StackFrame { + path := inputFrame.File + line := int32(inputFrame.Line) + label := inputFrame.Function + + // Strip GOPATH from path by counting the number of seperators in label & path + // + // For example given this: + // GOPATH = /home/user + // path = /home/user/src/pkg/sub/file.go + // label = pkg/sub.Type.Method + // + // We want to set: + // path = pkg/sub/file.go + // label = Type.Method + + i := len(path) + for n, g := 0, strings.Count(label, "/")+2; n < g; n++ { + i = strings.LastIndex(path[:i], "/") + if i == -1 { + // Something went wrong and path has less seperators than we expected + // Abort and leave i as -1 to counteract the +1 below + break + } + } + + path = path[i+1:] // Trim the initial / + + // Strip the path from the function name as it's already in the path + label = label[strings.LastIndex(label, "/")+1:] + // Likewise strip the package name + label = label[strings.Index(label, ".")+1:] + + return &messages.InvokeResponse_Error_StackFrame{ + Path: path, + Line: line, + Label: label, + } +} diff --git a/vendor/github.com/aws/aws-lambda-go/lambda/rpc_function.go b/vendor/github.com/aws/aws-lambda-go/lambda/rpc_function.go new file mode 100644 index 00000000..0c8e798e --- /dev/null +++ b/vendor/github.com/aws/aws-lambda-go/lambda/rpc_function.go @@ -0,0 +1,114 @@ +// Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +//go:build !lambda.norpc +// +build !lambda.norpc + +package lambda + +import ( + "context" + "encoding/json" + "errors" + "log" + "net" + "net/rpc" + "os" + "time" + + "github.com/aws/aws-lambda-go/lambda/messages" + "github.com/aws/aws-lambda-go/lambdacontext" +) + +func init() { + // Register `startFunctionRPC` to be run if the _LAMBDA_SERVER_PORT environment variable is set. + // This happens when the runtime for the function is configured as `go1.x`. + // The value of the environment variable will be passed as the first argument to `startFunctionRPC`. + // This allows users to save a little bit of coldstart time in the download, by the dependencies brought in for RPC support. + // The tradeoff is dropping compatibility with the RPC mode of the go1.x runtime. + // To drop the rpc dependencies, compile with `-tags lambda.norpc` + startFunctions = append([]*startFunction{{ + env: "_LAMBDA_SERVER_PORT", + f: startFunctionRPC, + }}, startFunctions...) +} + +func startFunctionRPC(port string, handler Handler) error { + lis, err := net.Listen("tcp", "localhost:"+port) + if err != nil { + log.Fatal(err) + } + err = rpc.Register(NewFunction(handler)) + if err != nil { + log.Fatal("failed to register handler function") + } + rpc.Accept(lis) + return errors.New("accept should not have returned") +} + +// Function struct which wrap the Handler +// +// Deprecated: The Function type is public for the go1.x runtime internal use of the net/rpc package +type Function struct { + handler *handlerOptions +} + +// NewFunction which creates a Function with a given Handler +// +// Deprecated: The Function type is public for the go1.x runtime internal use of the net/rpc package +func NewFunction(handler Handler) *Function { + return &Function{newHandler(handler)} +} + +// Ping method which given a PingRequest and a PingResponse parses the PingResponse +func (fn *Function) Ping(req *messages.PingRequest, response *messages.PingResponse) error { + *response = messages.PingResponse{} + return nil +} + +// Invoke method try to perform a command given an InvokeRequest and an InvokeResponse +func (fn *Function) Invoke(req *messages.InvokeRequest, response *messages.InvokeResponse) error { + defer func() { + if err := recover(); err != nil { + response.Error = lambdaPanicResponse(err) + } + }() + + deadline := time.Unix(req.Deadline.Seconds, req.Deadline.Nanos).UTC() + invokeContext, cancel := context.WithDeadline(fn.baseContext(), deadline) + defer cancel() + + lc := &lambdacontext.LambdaContext{ + AwsRequestID: req.RequestId, + InvokedFunctionArn: req.InvokedFunctionArn, + Identity: lambdacontext.CognitoIdentity{ + CognitoIdentityID: req.CognitoIdentityId, + CognitoIdentityPoolID: req.CognitoIdentityPoolId, + }, + } + if len(req.ClientContext) > 0 { + if err := json.Unmarshal(req.ClientContext, &lc.ClientContext); err != nil { + response.Error = lambdaErrorResponse(err) + return nil + } + } + invokeContext = lambdacontext.NewContext(invokeContext, lc) + + // nolint:staticcheck + invokeContext = context.WithValue(invokeContext, "x-amzn-trace-id", req.XAmznTraceId) + os.Setenv("_X_AMZN_TRACE_ID", req.XAmznTraceId) + + payload, err := fn.handler.Invoke(invokeContext, req.Payload) + if err != nil { + response.Error = lambdaErrorResponse(err) + return nil + } + response.Payload = payload + return nil +} + +func (fn *Function) baseContext() context.Context { + if fn.handler.baseContext != nil { + return fn.handler.baseContext + } + return context.Background() +} diff --git a/vendor/github.com/aws/aws-lambda-go/lambda/runtime_api_client.go b/vendor/github.com/aws/aws-lambda-go/lambda/runtime_api_client.go new file mode 100644 index 00000000..158bd6b4 --- /dev/null +++ b/vendor/github.com/aws/aws-lambda-go/lambda/runtime_api_client.go @@ -0,0 +1,173 @@ +// Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved +// +// Runtime API documentation: https://docs.aws.amazon.com/lambda/latest/dg/runtimes-api.html + +package lambda + +import ( + "bytes" + "encoding/base64" + "fmt" + "io" + "io/ioutil" //nolint: staticcheck + "log" + "net/http" + "runtime" +) + +const ( + headerAWSRequestID = "Lambda-Runtime-Aws-Request-Id" + headerDeadlineMS = "Lambda-Runtime-Deadline-Ms" + headerTraceID = "Lambda-Runtime-Trace-Id" + headerCognitoIdentity = "Lambda-Runtime-Cognito-Identity" + headerClientContext = "Lambda-Runtime-Client-Context" + headerInvokedFunctionARN = "Lambda-Runtime-Invoked-Function-Arn" + headerXRayErrorCause = "Lambda-Runtime-Function-Xray-Error-Cause" + trailerLambdaErrorType = "Lambda-Runtime-Function-Error-Type" + trailerLambdaErrorBody = "Lambda-Runtime-Function-Error-Body" + contentTypeJSON = "application/json" + contentTypeBytes = "application/octet-stream" + apiVersion = "2018-06-01" + xrayErrorCauseMaxSize = 1024 * 1024 +) + +type runtimeAPIClient struct { + baseURL string + userAgent string + httpClient *http.Client + buffer *bytes.Buffer +} + +func newRuntimeAPIClient(address string) *runtimeAPIClient { + client := &http.Client{ + Timeout: 0, // connections to the runtime API are never expected to time out + } + endpoint := "http://" + address + "/" + apiVersion + "/runtime/invocation/" + userAgent := "aws-lambda-go/" + runtime.Version() + return &runtimeAPIClient{endpoint, userAgent, client, bytes.NewBuffer(nil)} +} + +type invoke struct { + id string + payload []byte + headers http.Header + client *runtimeAPIClient +} + +// success sends the response payload for an in-progress invocation. +// Notes: +// - An invoke is not complete until next() is called again! +func (i *invoke) success(body io.Reader, contentType string) error { + url := i.client.baseURL + i.id + "/response" + return i.client.post(url, body, contentType, nil) +} + +// failure sends the payload to the Runtime API. This marks the function's invoke as a failure. +// Notes: +// - The execution of the function process continues, and is billed, until next() is called again! +// - A Lambda Function continues to be re-used for future invokes even after a failure. +// If the error is fatal (panic, unrecoverable state), exit the process immediately after calling failure() +func (i *invoke) failure(body io.Reader, contentType string, causeForXRay []byte) error { + url := i.client.baseURL + i.id + "/error" + return i.client.post(url, body, contentType, causeForXRay) +} + +// next connects to the Runtime API and waits for a new invoke Request to be available. +// Note: After a call to Done() or Error() has been made, a call to next() will complete the in-flight invoke. +func (c *runtimeAPIClient) next() (*invoke, error) { + url := c.baseURL + "next" + req, err := http.NewRequest(http.MethodGet, url, nil) + if err != nil { + return nil, fmt.Errorf("failed to construct GET request to %s: %v", url, err) + } + req.Header.Set("User-Agent", c.userAgent) + + resp, err := c.httpClient.Do(req) + if err != nil { + return nil, fmt.Errorf("failed to get the next invoke: %v", err) + } + defer func() { + if err := resp.Body.Close(); err != nil { + log.Printf("runtime API client failed to close %s response body: %v", url, err) + } + }() + + if resp.StatusCode != http.StatusOK { + return nil, fmt.Errorf("failed to GET %s: got unexpected status code: %d", url, resp.StatusCode) + } + + c.buffer.Reset() + _, err = c.buffer.ReadFrom(resp.Body) + if err != nil { + return nil, fmt.Errorf("failed to read the invoke payload: %v", err) + } + + return &invoke{ + id: resp.Header.Get(headerAWSRequestID), + payload: c.buffer.Bytes(), + headers: resp.Header, + client: c, + }, nil +} + +func (c *runtimeAPIClient) post(url string, body io.Reader, contentType string, xrayErrorCause []byte) error { + b := newErrorCapturingReader(body) + req, err := http.NewRequest(http.MethodPost, url, b) + if err != nil { + return fmt.Errorf("failed to construct POST request to %s: %v", url, err) + } + req.Trailer = b.Trailer + req.Header.Set("User-Agent", c.userAgent) + req.Header.Set("Content-Type", contentType) + + if xrayErrorCause != nil && len(xrayErrorCause) < xrayErrorCauseMaxSize { + req.Header.Set(headerXRayErrorCause, string(xrayErrorCause)) + } + + resp, err := c.httpClient.Do(req) + if err != nil { + return fmt.Errorf("failed to POST to %s: %v", url, err) + } + defer func() { + if err := resp.Body.Close(); err != nil { + log.Printf("runtime API client failed to close %s response body: %v", url, err) + } + }() + if resp.StatusCode != http.StatusAccepted { + return fmt.Errorf("failed to POST to %s: got unexpected status code: %d", url, resp.StatusCode) + } + + _, err = io.Copy(ioutil.Discard, resp.Body) + if err != nil { + return fmt.Errorf("something went wrong reading the POST response from %s: %v", url, err) + } + + return nil +} + +func newErrorCapturingReader(r io.Reader) *errorCapturingReader { + trailer := http.Header{ + trailerLambdaErrorType: nil, + trailerLambdaErrorBody: nil, + } + return &errorCapturingReader{r, trailer} +} + +type errorCapturingReader struct { + reader io.Reader + Trailer http.Header +} + +func (r *errorCapturingReader) Read(p []byte) (int, error) { + if r.reader == nil { + return 0, io.EOF + } + n, err := r.reader.Read(p) + if err != nil && err != io.EOF { + lambdaErr := lambdaErrorResponse(err) + r.Trailer.Set(trailerLambdaErrorType, lambdaErr.Type) + r.Trailer.Set(trailerLambdaErrorBody, base64.StdEncoding.EncodeToString(safeMarshal(lambdaErr))) + return 0, io.EOF + } + return n, err +} diff --git a/vendor/github.com/aws/aws-lambda-go/lambda/sigterm.go b/vendor/github.com/aws/aws-lambda-go/lambda/sigterm.go new file mode 100644 index 00000000..b742e911 --- /dev/null +++ b/vendor/github.com/aws/aws-lambda-go/lambda/sigterm.go @@ -0,0 +1,53 @@ +// Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +package lambda + +import ( + "log" + "os" + "os/signal" + "syscall" +) + +// enableSIGTERM configures an optional list of sigtermHandlers to run on process shutdown. +// This non-default behavior is enabled within Lambda using the extensions API. +func enableSIGTERM(sigtermHandlers []func()) { + // for fun, we'll also optionally register SIGTERM handlers + if len(sigtermHandlers) > 0 { + signaled := make(chan os.Signal, 1) + signal.Notify(signaled, syscall.SIGTERM) + go func() { + <-signaled + for _, f := range sigtermHandlers { + f() + } + }() + } + + // detect if we're actually running within Lambda + endpoint := os.Getenv("AWS_LAMBDA_RUNTIME_API") + if endpoint == "" { + log.Print("WARNING! AWS_LAMBDA_RUNTIME_API environment variable not found. Skipping attempt to register internal extension...") + return + } + + // Now to do the AWS Lambda specific stuff. + // The default Lambda behavior is for functions to get SIGKILL at the end of lifetime, or after a timeout. + // Any use of the Lambda extension register API enables SIGTERM to be sent to the function process before the SIGKILL. + // We'll register an extension that does not listen for any lifecycle events named "GoLangEnableSIGTERM". + // The API will respond with an ID we need to pass in future requests. + client := newExtensionAPIClient(endpoint) + id, err := client.register("GoLangEnableSIGTERM") + if err != nil { + log.Printf("WARNING! Failed to register internal extension! SIGTERM events may not be enabled! err: %v", err) + return + } + + // We didn't actually register for any events, but we need to call /next anyways to let the API know we're done initalizing. + // Because we didn't register for any events, /next will never return, so we'll do this in a go routine that is doomed to stay blocked. + go func() { + _, err := client.next(id) + log.Printf("WARNING! Reached expected unreachable code! Extension /next call expected to block forever! err: %v", err) + }() + +} diff --git a/vendor/github.com/aws/aws-lambda-go/lambdacontext/README.md b/vendor/github.com/aws/aws-lambda-go/lambdacontext/README.md new file mode 100644 index 00000000..e8c22996 --- /dev/null +++ b/vendor/github.com/aws/aws-lambda-go/lambdacontext/README.md @@ -0,0 +1,3 @@ +# Overview + +[](https://pkg.go.dev/github.com/aws/aws-lambda-go/lambdacontext) diff --git a/vendor/github.com/aws/aws-lambda-go/lambdacontext/context.go b/vendor/github.com/aws/aws-lambda-go/lambdacontext/context.go new file mode 100644 index 00000000..bd2e1664 --- /dev/null +++ b/vendor/github.com/aws/aws-lambda-go/lambdacontext/context.go @@ -0,0 +1,89 @@ +// Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +// +// Helpers for accessing context information from an Invoke request. Context information +// is stored in a https://golang.org/pkg/context/#Context. The functions FromContext and NewContext +// are used to retrieving and inserting an instance of LambdaContext. + +package lambdacontext + +import ( + "context" + "os" + "strconv" +) + +// LogGroupName is the name of the log group that contains the log streams of the current Lambda Function +var LogGroupName string + +// LogStreamName name of the log stream that the current Lambda Function's logs will be sent to +var LogStreamName string + +// FunctionName the name of the current Lambda Function +var FunctionName string + +// MemoryLimitInMB is the configured memory limit for the current instance of the Lambda Function +var MemoryLimitInMB int + +// FunctionVersion is the published version of the current instance of the Lambda Function +var FunctionVersion string + +func init() { + LogGroupName = os.Getenv("AWS_LAMBDA_LOG_GROUP_NAME") + LogStreamName = os.Getenv("AWS_LAMBDA_LOG_STREAM_NAME") + FunctionName = os.Getenv("AWS_LAMBDA_FUNCTION_NAME") + if limit, err := strconv.Atoi(os.Getenv("AWS_LAMBDA_FUNCTION_MEMORY_SIZE")); err != nil { + MemoryLimitInMB = 0 + } else { + MemoryLimitInMB = limit + } + FunctionVersion = os.Getenv("AWS_LAMBDA_FUNCTION_VERSION") +} + +// ClientApplication is metadata about the calling application. +type ClientApplication struct { + InstallationID string `json:"installation_id"` + AppTitle string `json:"app_title"` + AppVersionCode string `json:"app_version_code"` + AppPackageName string `json:"app_package_name"` +} + +// ClientContext is information about the client application passed by the calling application. +type ClientContext struct { + Client ClientApplication + Env map[string]string `json:"env"` + Custom map[string]string `json:"custom"` +} + +// CognitoIdentity is the cognito identity used by the calling application. +type CognitoIdentity struct { + CognitoIdentityID string + CognitoIdentityPoolID string +} + +// LambdaContext is the set of metadata that is passed for every Invoke. +type LambdaContext struct { + AwsRequestID string //nolint: stylecheck + InvokedFunctionArn string //nolint: stylecheck + Identity CognitoIdentity + ClientContext ClientContext +} + +// An unexported type to be used as the key for types in this package. +// This prevents collisions with keys defined in other packages. +type key struct{} + +// The key for a LambdaContext in Contexts. +// Users of this package must use lambdacontext.NewContext and lambdacontext.FromContext +// instead of using this key directly. +var contextKey = &key{} + +// NewContext returns a new Context that carries value lc. +func NewContext(parent context.Context, lc *LambdaContext) context.Context { + return context.WithValue(parent, contextKey, lc) +} + +// FromContext returns the LambdaContext value stored in ctx, if any. +func FromContext(ctx context.Context) (*LambdaContext, bool) { + lc, ok := ctx.Value(contextKey).(*LambdaContext) + return lc, ok +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/credential_cache.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/credential_cache.go index 781ac0ae..623890e8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/credential_cache.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/credential_cache.go @@ -172,6 +172,17 @@ func (p *CredentialsCache) getCreds() (Credentials, bool) { return *c, true } +// ProviderSources returns a list of where the underlying credential provider +// has been sourced, if available. Returns empty if the provider doesn't implement +// the interface +func (p *CredentialsCache) ProviderSources() []CredentialSource { + asSource, ok := p.provider.(CredentialProviderSource) + if !ok { + return []CredentialSource{} + } + return asSource.ProviderSources() +} + // Invalidate will invalidate the cached credentials. The next call to Retrieve // will cause the provider's Retrieve method to be called. func (p *CredentialsCache) Invalidate() { 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 98ba7705..4ad2ee44 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 @@ -70,6 +70,56 @@ func (AnonymousCredentials) Retrieve(context.Context) (Credentials, error) { fmt.Errorf("the AnonymousCredentials is not a valid credential provider, and cannot be used to sign AWS requests with") } +// CredentialSource is the source of the credential provider. +// A provider can have multiple credential sources: For example, a provider that reads a profile, calls ECS to +// get credentials and then assumes a role using STS will have all these as part of its provider chain. +type CredentialSource int + +const ( + // CredentialSourceUndefined is the sentinel zero value + CredentialSourceUndefined CredentialSource = iota + // CredentialSourceCode credentials resolved from code, cli parameters, session object, or client instance + CredentialSourceCode + // CredentialSourceEnvVars credentials resolved from environment variables + CredentialSourceEnvVars + // CredentialSourceEnvVarsSTSWebIDToken credentials resolved from environment variables for assuming a role with STS using a web identity token + CredentialSourceEnvVarsSTSWebIDToken + // CredentialSourceSTSAssumeRole credentials resolved from STS using AssumeRole + CredentialSourceSTSAssumeRole + // CredentialSourceSTSAssumeRoleSaml credentials resolved from STS using assume role with SAML + CredentialSourceSTSAssumeRoleSaml + // CredentialSourceSTSAssumeRoleWebID credentials resolved from STS using assume role with web identity + CredentialSourceSTSAssumeRoleWebID + // CredentialSourceSTSFederationToken credentials resolved from STS using a federation token + CredentialSourceSTSFederationToken + // CredentialSourceSTSSessionToken credentials resolved from STS using a session token S + CredentialSourceSTSSessionToken + // CredentialSourceProfile credentials resolved from a config file(s) profile with static credentials + CredentialSourceProfile + // CredentialSourceProfileSourceProfile credentials resolved from a source profile in a config file(s) profile + CredentialSourceProfileSourceProfile + // CredentialSourceProfileNamedProvider credentials resolved from a named provider in a config file(s) profile (like EcsContainer) + CredentialSourceProfileNamedProvider + // CredentialSourceProfileSTSWebIDToken credentials resolved from configuration for assuming a role with STS using web identity token in a config file(s) profile + CredentialSourceProfileSTSWebIDToken + // CredentialSourceProfileSSO credentials resolved from an SSO session in a config file(s) profile + CredentialSourceProfileSSO + // CredentialSourceSSO credentials resolved from an SSO session + CredentialSourceSSO + // CredentialSourceProfileSSOLegacy credentials resolved from an SSO session in a config file(s) profile using legacy format + CredentialSourceProfileSSOLegacy + // CredentialSourceSSOLegacy credentials resolved from an SSO session using legacy format + CredentialSourceSSOLegacy + // CredentialSourceProfileProcess credentials resolved from a process in a config file(s) profile + CredentialSourceProfileProcess + // CredentialSourceProcess credentials resolved from a process + CredentialSourceProcess + // CredentialSourceHTTP credentials resolved from an HTTP endpoint + CredentialSourceHTTP + // CredentialSourceIMDS credentials resolved from the instance metadata service (IMDS) + CredentialSourceIMDS +) + // A Credentials is the AWS credentials value for individual credential fields. type Credentials struct { // AWS Access key ID @@ -125,6 +175,13 @@ type CredentialsProvider interface { Retrieve(ctx context.Context) (Credentials, error) } +// CredentialProviderSource allows any credential provider to track +// all providers where a credential provider were sourced. For example, if the credentials came from a +// call to a role specified in the profile, this method will give the whole breadcrumb trail +type CredentialProviderSource interface { + ProviderSources() []CredentialSource +} + // CredentialsProviderFunc provides a helper wrapping a function value to // satisfy the CredentialsProvider interface. type CredentialsProviderFunc func(context.Context) (Credentials, error) 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 57d5c02e..8e930fc6 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.34.0" +const goModuleVersion = "1.36.3" 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 01d758d5..6ee3391b 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 @@ -76,30 +76,90 @@ type UserAgentFeature string // Enumerates UserAgentFeature. const ( - UserAgentFeatureResourceModel UserAgentFeature = "A" // n/a (we don't generate separate resource types) - UserAgentFeatureWaiter = "B" - UserAgentFeaturePaginator = "C" - UserAgentFeatureRetryModeLegacy = "D" // n/a (equivalent to standard) - UserAgentFeatureRetryModeStandard = "E" - UserAgentFeatureRetryModeAdaptive = "F" - UserAgentFeatureS3Transfer = "G" - UserAgentFeatureS3CryptoV1N = "H" // n/a (crypto client is external) - UserAgentFeatureS3CryptoV2 = "I" // n/a - UserAgentFeatureS3ExpressBucket = "J" - UserAgentFeatureS3AccessGrants = "K" // not yet implemented - UserAgentFeatureGZIPRequestCompression = "L" - UserAgentFeatureProtocolRPCV2CBOR = "M" - UserAgentFeatureRequestChecksumCRC32 = "U" - UserAgentFeatureRequestChecksumCRC32C = "V" - UserAgentFeatureRequestChecksumCRC64 = "W" - UserAgentFeatureRequestChecksumSHA1 = "X" - UserAgentFeatureRequestChecksumSHA256 = "Y" - UserAgentFeatureRequestChecksumWhenSupported = "Z" - UserAgentFeatureRequestChecksumWhenRequired = "a" - UserAgentFeatureResponseChecksumWhenSupported = "b" - UserAgentFeatureResponseChecksumWhenRequired = "c" + UserAgentFeatureResourceModel UserAgentFeature = "A" // n/a (we don't generate separate resource types) + + UserAgentFeatureWaiter = "B" + UserAgentFeaturePaginator = "C" + + UserAgentFeatureRetryModeLegacy = "D" // n/a (equivalent to standard) + UserAgentFeatureRetryModeStandard = "E" + UserAgentFeatureRetryModeAdaptive = "F" + + UserAgentFeatureS3Transfer = "G" + UserAgentFeatureS3CryptoV1N = "H" // n/a (crypto client is external) + UserAgentFeatureS3CryptoV2 = "I" // n/a + UserAgentFeatureS3ExpressBucket = "J" + UserAgentFeatureS3AccessGrants = "K" // not yet implemented + + UserAgentFeatureGZIPRequestCompression = "L" + + UserAgentFeatureProtocolRPCV2CBOR = "M" + + UserAgentFeatureAccountIDEndpoint = "O" // DO NOT IMPLEMENT: rules output is not currently defined. SDKs should not parse endpoints for feature information. + UserAgentFeatureAccountIDModePreferred = "P" + UserAgentFeatureAccountIDModeDisabled = "Q" + UserAgentFeatureAccountIDModeRequired = "R" + + UserAgentFeatureRequestChecksumCRC32 = "U" + UserAgentFeatureRequestChecksumCRC32C = "V" + UserAgentFeatureRequestChecksumCRC64 = "W" + UserAgentFeatureRequestChecksumSHA1 = "X" + UserAgentFeatureRequestChecksumSHA256 = "Y" + UserAgentFeatureRequestChecksumWhenSupported = "Z" + UserAgentFeatureRequestChecksumWhenRequired = "a" + UserAgentFeatureResponseChecksumWhenSupported = "b" + UserAgentFeatureResponseChecksumWhenRequired = "c" + + UserAgentFeatureDynamoDBUserAgent = "d" // not yet implemented + + UserAgentFeatureCredentialsCode = "e" + UserAgentFeatureCredentialsJvmSystemProperties = "f" // n/a (this is not a JVM sdk) + UserAgentFeatureCredentialsEnvVars = "g" + UserAgentFeatureCredentialsEnvVarsStsWebIDToken = "h" + UserAgentFeatureCredentialsStsAssumeRole = "i" + UserAgentFeatureCredentialsStsAssumeRoleSaml = "j" // not yet implemented + UserAgentFeatureCredentialsStsAssumeRoleWebID = "k" + UserAgentFeatureCredentialsStsFederationToken = "l" // not yet implemented + UserAgentFeatureCredentialsStsSessionToken = "m" // not yet implemented + UserAgentFeatureCredentialsProfile = "n" + UserAgentFeatureCredentialsProfileSourceProfile = "o" + UserAgentFeatureCredentialsProfileNamedProvider = "p" + UserAgentFeatureCredentialsProfileStsWebIDToken = "q" + UserAgentFeatureCredentialsProfileSso = "r" + UserAgentFeatureCredentialsSso = "s" + UserAgentFeatureCredentialsProfileSsoLegacy = "t" + UserAgentFeatureCredentialsSsoLegacy = "u" + UserAgentFeatureCredentialsProfileProcess = "v" + UserAgentFeatureCredentialsProcess = "w" + UserAgentFeatureCredentialsBoto2ConfigFile = "x" // n/a (this is not boto/Python) + UserAgentFeatureCredentialsAwsSdkStore = "y" // n/a (this is used by .NET based sdk) + UserAgentFeatureCredentialsHTTP = "z" + UserAgentFeatureCredentialsIMDS = "0" ) +var credentialSourceToFeature = map[aws.CredentialSource]UserAgentFeature{ + aws.CredentialSourceCode: UserAgentFeatureCredentialsCode, + aws.CredentialSourceEnvVars: UserAgentFeatureCredentialsEnvVars, + aws.CredentialSourceEnvVarsSTSWebIDToken: UserAgentFeatureCredentialsEnvVarsStsWebIDToken, + aws.CredentialSourceSTSAssumeRole: UserAgentFeatureCredentialsStsAssumeRole, + aws.CredentialSourceSTSAssumeRoleSaml: UserAgentFeatureCredentialsStsAssumeRoleSaml, + aws.CredentialSourceSTSAssumeRoleWebID: UserAgentFeatureCredentialsStsAssumeRoleWebID, + aws.CredentialSourceSTSFederationToken: UserAgentFeatureCredentialsStsFederationToken, + aws.CredentialSourceSTSSessionToken: UserAgentFeatureCredentialsStsSessionToken, + aws.CredentialSourceProfile: UserAgentFeatureCredentialsProfile, + aws.CredentialSourceProfileSourceProfile: UserAgentFeatureCredentialsProfileSourceProfile, + aws.CredentialSourceProfileNamedProvider: UserAgentFeatureCredentialsProfileNamedProvider, + aws.CredentialSourceProfileSTSWebIDToken: UserAgentFeatureCredentialsProfileStsWebIDToken, + aws.CredentialSourceProfileSSO: UserAgentFeatureCredentialsProfileSso, + aws.CredentialSourceSSO: UserAgentFeatureCredentialsSso, + aws.CredentialSourceProfileSSOLegacy: UserAgentFeatureCredentialsProfileSsoLegacy, + aws.CredentialSourceSSOLegacy: UserAgentFeatureCredentialsSsoLegacy, + aws.CredentialSourceProfileProcess: UserAgentFeatureCredentialsProfileProcess, + aws.CredentialSourceProcess: UserAgentFeatureCredentialsProcess, + aws.CredentialSourceHTTP: UserAgentFeatureCredentialsHTTP, + aws.CredentialSourceIMDS: UserAgentFeatureCredentialsIMDS, +} + // RequestUserAgent is a build middleware that set the User-Agent for the request. type RequestUserAgent struct { sdkAgent, userAgent *smithyhttp.UserAgentBuilder @@ -252,6 +312,14 @@ func (u *RequestUserAgent) AddSDKAgentKeyValue(keyType SDKAgentKeyType, key, val u.userAgent.AddKeyValue(keyType.string(), strings.Map(rules, key)+"#"+strings.Map(rules, value)) } +// AddCredentialsSource adds the credential source as a feature on the User-Agent string +func (u *RequestUserAgent) AddCredentialsSource(source aws.CredentialSource) { + x, ok := credentialSourceToFeature[source] + if ok { + u.AddUserAgentFeature(x) + } +} + // ID the name of the middleware. func (u *RequestUserAgent) ID() string { return "UserAgent" 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 41a48528..ddb162b3 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,11 @@ +# 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. 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 faf5fcc5..01981f46 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.8" +const goModuleVersion = "1.6.10" 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 f7427da0..1a77654f 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/signer/internal/v4/headers.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/headers.go index 734e548b..d99b32ce 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/headers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/headers.go @@ -4,10 +4,11 @@ package v4 var IgnoredHeaders = Rules{ ExcludeList{ MapRule{ - "Authorization": struct{}{}, - "User-Agent": struct{}{}, - "X-Amzn-Trace-Id": struct{}{}, - "Expect": struct{}{}, + "Authorization": struct{}{}, + "User-Agent": struct{}{}, + "X-Amzn-Trace-Id": struct{}{}, + "Expect": struct{}{}, + "Transfer-Encoding": struct{}{}, }, }, } 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 9818ebc7..eae3e16a 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,24 @@ +# v1.3.34 (2025-02-27) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.3.33 (2025-02-18) + +* **Bug Fix**: Bump go version to 1.22 +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.3.32 (2025-02-05) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.3.31 (2025-01-31) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.3.30 (2025-01-30) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.3.29 (2025-01-24) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go index 39765330..eddabe63 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.29" +const goModuleVersion = "1.3.34" 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 43f6449b..e19224f1 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 @@ -223,7 +223,17 @@ "supportsFIPS" : true }, "regionRegex" : "^us\\-isof\\-\\w+\\-\\d+$", - "regions" : { } + "regions" : { + "aws-iso-f-global" : { + "description" : "AWS ISOF global region" + }, + "us-isof-east-1" : { + "description" : "US ISOF EAST" + }, + "us-isof-south-1" : { + "description" : "US ISOF SOUTH" + } + } } ], "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 d30a3176..83e5bd28 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,24 @@ +# v2.6.34 (2025-02-27) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.6.33 (2025-02-18) + +* **Bug Fix**: Bump go version to 1.22 +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.6.32 (2025-02-05) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.6.31 (2025-01-31) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.6.30 (2025-01-30) + +* **Dependency Update**: Updated to the latest SDK module versions + # v2.6.29 (2025-01-24) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go index 994cb44c..735dba7a 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.29" +const goModuleVersion = "2.6.34" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/CHANGELOG.md new file mode 100644 index 00000000..32d39b9d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/CHANGELOG.md @@ -0,0 +1,746 @@ +# v1.71.0 (2025-03-19) + +* **Feature**: Add Ruby 3.4 (ruby3.4) support to AWS Lambda. + +# v1.70.1 (2025-03-04.2) + +* **Bug Fix**: Add assurance test for operation order. + +# v1.70.0 (2025-02-27) + +* **Feature**: Track credential providers via User-Agent Feature ids +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.69.14 (2025-02-18) + +* **Bug Fix**: Bump go version to 1.22 +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.69.13 (2025-02-14) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.69.12 (2025-02-05) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.69.11 (2025-02-04) + +* No change notes available for this release. + +# v1.69.10 (2025-01-31) + +* **Dependency Update**: Switch to code-generated waiter matchers, removing the dependency on go-jmespath. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.69.9 (2025-01-30) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.69.8 (2025-01-24) + +* **Dependency Update**: Updated to the latest SDK module versions +* **Dependency Update**: Upgrade to smithy-go v1.22.2. + +# v1.69.7 (2025-01-17) + +* **Bug Fix**: Fix bug where credentials weren't refreshed during retry loop. + +# v1.69.6 (2025-01-15) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.69.5 (2025-01-14) + +* **Bug Fix**: Fix issue where waiters were not failing on unmatched errors as they should. This may have breaking behavioral changes for users in fringe cases. See [this announcement](https://github.com/aws/aws-sdk-go-v2/discussions/2954) for more information. + +# v1.69.4 (2025-01-09) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.69.3 (2025-01-08) + +* No change notes available for this release. + +# v1.69.2 (2024-12-19) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.69.1 (2024-12-02) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.69.0 (2024-11-22) + +* **Feature**: Add ProvisionedPollerConfig to Lambda event-source-mapping API. + +# v1.68.0 (2024-11-21) + +* **Feature**: Adds support for metrics for event source mappings for AWS Lambda + +# v1.67.0 (2024-11-20) + +* **Feature**: Add Node 22.x (node22.x) support to AWS Lambda + +# v1.66.1 (2024-11-18) + +* **Dependency Update**: Update to smithy-go v1.22.1. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.66.0 (2024-11-11) + +* **Feature**: Add Python 3.13 (python3.13) support to AWS Lambda + +# v1.65.0 (2024-11-08) + +* **Feature**: This release adds support for using AWS KMS customer managed keys to encrypt AWS Lambda .zip deployment packages. + +# v1.64.3 (2024-11-07) + +* **Bug Fix**: Adds case-insensitive handling of error message fields in service responses + +# v1.64.2 (2024-11-06) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.64.1 (2024-10-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.64.0 (2024-10-25) + +* **Feature**: Add TagsError field in Lambda GetFunctionResponse. The TagsError field contains details related to errors retrieving tags. + +# v1.63.2 (2024-10-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.63.1 (2024-10-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.63.0 (2024-10-04) + +* **Feature**: Add support for HTTP client metrics. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.62.2 (2024-10-03) + +* No change notes available for this release. + +# v1.62.1 (2024-09-27) + +* No change notes available for this release. + +# v1.62.0 (2024-09-26) + +* **Feature**: Reverting Lambda resource-based policy and block public access APIs. + +# v1.61.2 (2024-09-25) + +* No change notes available for this release. + +# v1.61.1 (2024-09-23) + +* No change notes available for this release. + +# v1.61.0 (2024-09-20) + +* **Feature**: Add tracing and metrics support to service clients. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.60.0 (2024-09-19) + +* **Feature**: Tagging support for Lambda event source mapping, and code signing configuration resources. + +# v1.59.0 (2024-09-17) + +* **Feature**: Support for JSON resource-based policies and block public access +* **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.58.3 (2024-09-04) + +* No change notes available for this release. + +# v1.58.2 (2024-09-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.58.1 (2024-08-22) + +* No change notes available for this release. + +# v1.58.0 (2024-08-21) + +* **Feature**: Release FilterCriteria encryption for Lambda EventSourceMapping, enabling customers to encrypt their filter criteria using a customer-owned KMS key. + +# v1.57.0 (2024-08-19) + +* **Feature**: Release Lambda FunctionRecursiveConfig, enabling customers to turn recursive loop detection on or off on individual functions. This release adds two new APIs, GetFunctionRecursionConfig and PutFunctionRecursionConfig. + +# v1.56.4 (2024-08-15) + +* **Dependency Update**: Bump minimum Go version to 1.21. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.56.3 (2024-07-10.2) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.56.2 (2024-07-10) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.56.1 (2024-06-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.56.0 (2024-06-26) + +* **Feature**: Support list-of-string endpoint parameter. + +# v1.55.1 (2024-06-19) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.55.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.54.7 (2024-06-17) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.54.6 (2024-06-07) + +* **Bug Fix**: Add clock skew correction on all service clients +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.54.5 (2024-06-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.54.4 (2024-05-23) + +* No change notes available for this release. + +# v1.54.3 (2024-05-16) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.54.2 (2024-05-15) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.54.1 (2024-05-08) + +* **Bug Fix**: GoDoc improvement + +# v1.54.0 (2024-04-03) + +* **Feature**: Add Ruby 3.3 (ruby3.3) support to AWS Lambda + +# v1.53.4 (2024-03-29) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.53.3 (2024-03-18) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.53.2 (2024-03-07) + +* **Bug Fix**: Remove dependency on go-cmp. +* **Documentation**: Documentation updates for AWS Lambda +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.53.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.53.0 (2024-02-22) + +* **Feature**: Add middleware stack snapshot tests. + +# v1.52.1 (2024-02-21) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.52.0 (2024-02-20) + +* **Feature**: Add .NET 8 (dotnet8) Runtime support to AWS Lambda. +* **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.51.0 (2024-02-16) + +* **Feature**: Add new ClientOptions field to waiter config which allows you to extend the config for operation calls made by waiters. +* **Documentation**: Documentation-only updates for Lambda to clarify a number of existing actions and properties. + +# v1.50.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.49.7 (2024-01-04) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.49.6 (2023-12-20) + +* No change notes available for this release. + +# v1.49.5 (2023-12-08) + +* **Bug Fix**: Reinstate presence of default Retryer in functional options, but still respect max attempts set therein. + +# v1.49.4 (2023-12-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.49.3 (2023-12-06) + +* **Bug Fix**: Restore pre-refactor auth behavior where all operations could technically be performed anonymously. + +# v1.49.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.49.1 (2023-11-30) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.49.0 (2023-11-29) + +* **Feature**: Expose Options() accessor on service clients. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.48.3 (2023-11-28.2) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.48.2 (2023-11-28) + +* **Bug Fix**: Respect setting RetryMaxAttempts in functional options at client construction. + +# v1.48.1 (2023-11-20) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.48.0 (2023-11-16) + +* **Feature**: Adds support for logging configuration in Lambda Functions. Customers will have more control how their function logs are captured and to which cloud watch log group they are delivered also. + +# v1.47.0 (2023-11-15) + +* **Feature**: Add Java 21 (java21) support to AWS Lambda +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.46.0 (2023-11-14) + +* **Feature**: Add Python 3.12 (python3.12) support to AWS Lambda + +# v1.45.0 (2023-11-09.2) + +* **Feature**: Add Custom runtime on Amazon Linux 2023 (provided.al2023) support to AWS Lambda. + +# v1.44.1 (2023-11-09) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.44.0 (2023-11-08) + +* **Feature**: Add Node 20 (nodejs20.x) support to AWS Lambda. + +# v1.43.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.42.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.41.0 (2023-10-24) + +* **Feature**: **BREAKFIX**: Correct nullability and default value representation of various input fields across a large number of services. Calling code that references one or more of the affected fields will need to update usage accordingly. See [2162](https://github.com/aws/aws-sdk-go-v2/issues/2162). + +# v1.40.0 (2023-10-12) + +* **Feature**: Adds support for Lambda functions to access Dual-Stack subnets over IPv6, via an opt-in flag in CreateFunction and UpdateFunctionConfiguration APIs +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.39.6 (2023-10-06) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.39.5 (2023-08-21) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.39.4 (2023-08-18) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.39.3 (2023-08-17) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.39.2 (2023-08-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.39.1 (2023-08-01) + +* No change notes available for this release. + +# v1.39.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.38.1 (2023-07-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.38.0 (2023-07-25) + +* **Feature**: Add Python 3.11 (python3.11) support to AWS Lambda + +# v1.37.1 (2023-07-13) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.37.0 (2023-06-28) + +* **Feature**: Surface ResourceConflictException in DeleteEventSourceMapping + +# v1.36.0 (2023-06-20) + +* **Feature**: This release adds RecursiveInvocationException to the Invoke API and InvokeWithResponseStream API. + +# v1.35.2 (2023-06-15) + +* No change notes available for this release. + +# v1.35.1 (2023-06-13) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.35.0 (2023-06-05) + +* **Feature**: Add Ruby 3.2 (ruby3.2) Runtime support to AWS Lambda. + +# v1.34.1 (2023-05-04) + +* No change notes available for this release. + +# v1.34.0 (2023-04-27) + +* **Feature**: Add Java 17 (java17) support to AWS Lambda + +# v1.33.1 (2023-04-24) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.33.0 (2023-04-17) + +* **Feature**: Add Python 3.10 (python3.10) support to AWS Lambda + +# v1.32.0 (2023-04-14) + +* **Feature**: This release adds SnapStart related exceptions to InvokeWithResponseStream API. IAM access related documentation is also added for this API. + +# v1.31.1 (2023-04-10) + +* No change notes available for this release. + +# v1.31.0 (2023-04-07) + +* **Feature**: This release adds a new Lambda InvokeWithResponseStream API to support streaming Lambda function responses. The release also adds a new InvokeMode parameter to Function Url APIs to control whether the response will be streamed or buffered. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.30.2 (2023-03-21) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.30.1 (2023-03-10) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.30.0 (2023-02-27) + +* **Feature**: This release adds the ability to create ESMs with Document DB change streams as event source. For more information see https://docs.aws.amazon.com/lambda/latest/dg/with-documentdb.html. + +# v1.29.4 (2023-02-22) + +* **Bug Fix**: Prevent nil pointer dereference when retrieving error codes. + +# v1.29.3 (2023-02-20) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.29.2 (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.29.1 (2023-02-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.29.0 (2023-01-23) + +* **Feature**: Release Lambda RuntimeManagementConfig, enabling customers to better manage runtime updates to their Lambda functions. This release adds two new APIs, GetRuntimeManagementConfig and PutRuntimeManagementConfig, as well as support on existing Create/Get/Update function APIs. + +# v1.28.0 (2023-01-12) + +* **Feature**: Add support for MaximumConcurrency parameter for SQS event source. Customers can now limit the maximum concurrent invocations for their SQS Event Source Mapping. + +# v1.27.0 (2023-01-05) + +* **Feature**: Add `ErrorCodeOverride` field to all error structs (aws/smithy-go#401). + +# v1.26.2 (2022-12-15) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.26.1 (2022-12-02) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.26.0 (2022-11-29) + +* **Feature**: Adds support for Lambda SnapStart, which helps improve the startup performance of functions. Customers can now manage SnapStart based functions via CreateFunction and UpdateFunctionConfiguration APIs + +# v1.25.1 (2022-11-22) + +* No change notes available for this release. + +# v1.25.0 (2022-11-17) + +* **Feature**: Add Node 18 (nodejs18.x) support to AWS Lambda. + +# v1.24.11 (2022-11-16) + +* No change notes available for this release. + +# v1.24.10 (2022-11-10) + +* No change notes available for this release. + +# v1.24.9 (2022-11-02) + +* No change notes available for this release. + +# v1.24.8 (2022-10-24) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.24.7 (2022-10-21) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.24.6 (2022-09-20) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.24.5 (2022-09-14) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.24.4 (2022-09-02) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.24.3 (2022-08-31) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.24.2 (2022-08-30) + +* No change notes available for this release. + +# v1.24.1 (2022-08-29) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.24.0 (2022-08-17) + +* **Feature**: Added support for customization of Consumer Group ID for MSK and Kafka Event Source Mappings. + +# v1.23.8 (2022-08-11) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.23.7 (2022-08-09) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.23.6 (2022-08-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.23.5 (2022-08-01) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.23.4 (2022-07-05) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.23.3 (2022-06-29) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.23.2 (2022-06-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.23.1 (2022-05-17) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.23.0 (2022-05-12) + +* **Feature**: Lambda releases NodeJs 16 managed runtime to be available in all commercial regions. + +# v1.22.1 (2022-04-25) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.22.0 (2022-04-06) + +* **Feature**: This release adds new APIs for creating and managing Lambda Function URLs and adds a new FunctionUrlAuthType parameter to the AddPermission API. Customers can use Function URLs to create built-in HTTPS endpoints on their functions. + +# v1.21.1 (2022-03-30) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.21.0 (2022-03-24) + +* **Feature**: Adds support for increased ephemeral storage (/tmp) up to 10GB for Lambda functions. Customers can now provision up to 10 GB of ephemeral storage per function instance, a 20x increase over the previous limit of 512 MB. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.20.1 (2022-03-23) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.20.0 (2022-03-11) + +* **Feature**: Adds PrincipalOrgID support to AddPermission API. Customers can use it to manage permissions to lambda functions at AWS Organizations level. + +# 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.1 (2022-01-28) + +* **Bug Fix**: Updates SDK API client deserialization to pre-allocate byte slice and string response payloads, [#1565](https://github.com/aws/aws-sdk-go-v2/pull/1565). Thanks to [Tyson Mote](https://github.com/tysonmote) for submitting this PR. + +# 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**: API client updated +* **Feature**: Updated `github.com/aws/smithy-go` to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.15.0 (2021-12-21) + +* **Feature**: API Paginators now support specifying the initial starting token, and support stopping on empty string tokens. +* **Feature**: Updated to latest service endpoints + +# v1.14.1 (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.0 (2021-11-30) + +* **Feature**: API client updated + +# v1.13.0 (2021-11-19) + +* **Feature**: API client updated +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.12.0 (2021-11-12) + +* **Feature**: Waiters now have a `WaitForOutput` method, which can be used to retrieve the output of the successful wait operation. Thank you to [Andrew Haines](https://github.com/haines) for contributing this feature. + +# v1.11.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.10.0 (2021-10-21) + +* **Feature**: API client updated +* **Feature**: Updated to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.9.1 (2021-10-11) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.9.0 (2021-09-30) + +* **Feature**: API client updated + +# v1.8.1 (2021-09-17) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.8.0 (2021-08-27) + +* **Feature**: Updated `github.com/aws/smithy-go` to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.7.0 (2021-08-19) + +* **Feature**: API client updated +* **Dependency Update**: Updated to the latest SDK module versions + +# 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.0 (2021-07-15) + +* **Feature**: Updated service model to latest version. +* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.4.0 (2021-06-25) + +* **Feature**: Updated `github.com/aws/smithy-go` to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# 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/lambda/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/LICENSE.txt new file mode 100644 index 00000000..d6456956 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/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/lambda/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_client.go new file mode 100644 index 00000000..ecd62031 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_client.go @@ -0,0 +1,945 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +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" + internalmiddleware "github.com/aws/aws-sdk-go-v2/internal/middleware" + smithy "github.com/aws/smithy-go" + smithyauth "github.com/aws/smithy-go/auth" + 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 = "Lambda" +const ServiceAPIVersion = "2015-03-31" + +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) { + instr := getOperationMetrics(ctx).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() { + instr := getOperationMetrics(ctx).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) { + meter := mp.Meter("github.com/aws/aws-sdk-go-v2/service/lambda") + 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 { + return ctx.Value(operationMetricsKey{}).(*operationMetrics) +} + +func operationTracer(p tracing.TracerProvider) tracing.Tracer { + return p.Tracer("github.com/aws/aws-sdk-go-v2/service/lambda") +} + +// Client provides the API client to make operations call for AWS Lambda. +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) + } + + 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/lambda") + }) + 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, + } + resolveAWSRetryerProvider(cfg, &opts) + resolveAWSRetryMaxAttempts(cfg, &opts) + resolveAWSRetryMode(cfg, &opts) + resolveAWSEndpointResolver(cfg, &opts) + resolveUseDualStackEndpoint(cfg, &opts) + resolveUseFIPSEndpoint(cfg, &opts) + resolveBaseEndpoint(cfg, &opts) + return New(opts, optFns...) +} + +func resolveHTTPClient(o *Options) { + var buildable *awshttp.BuildableClient + + if o.HTTPClient != nil { + var ok bool + buildable, ok = o.HTTPClient.(*awshttp.BuildableClient) + if !ok { + return + } + } else { + buildable = awshttp.NewBuildableClient() + } + + modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) + if err == nil { + buildable = buildable.WithDialerOptions(func(dialer *net.Dialer) { + if dialerTimeout, ok := modeConfig.GetConnectTimeout(); ok { + dialer.Timeout = dialerTimeout + } + }) + + buildable = buildable.WithTransportOptions(func(transport *http.Transport) { + if tlsHandshakeTimeout, ok := modeConfig.GetTLSNegotiationTimeout(); ok { + transport.TLSHandshakeTimeout = tlsHandshakeTimeout + } + }) + } + + o.HTTPClient = buildable +} + +func resolveRetryer(o *Options) { + if o.Retryer != nil { + return + } + + if len(o.RetryMode) == 0 { + modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) + if err == nil { + o.RetryMode = modeConfig.RetryMode + } + } + if len(o.RetryMode) == 0 { + o.RetryMode = aws.RetryModeStandard + } + + var standardOptions []func(*retry.StandardOptions) + if v := o.RetryMaxAttempts; v != 0 { + standardOptions = append(standardOptions, func(so *retry.StandardOptions) { + so.MaxAttempts = v + }) + } + + switch o.RetryMode { + case aws.RetryModeAdaptive: + var adaptiveOptions []func(*retry.AdaptiveModeOptions) + if len(standardOptions) != 0 { + adaptiveOptions = append(adaptiveOptions, func(ao *retry.AdaptiveModeOptions) { + ao.StandardOptions = append(ao.StandardOptions, standardOptions...) + }) + } + o.Retryer = retry.NewAdaptiveMode(adaptiveOptions...) + + default: + o.Retryer = retry.NewStandard(standardOptions...) + } +} + +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + +func resolveAWSRetryMode(cfg aws.Config, o *Options) { + if len(cfg.RetryMode) == 0 { + return + } + o.RetryMode = cfg.RetryMode +} +func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) { + if cfg.RetryMaxAttempts == 0 { + return + } + o.RetryMaxAttempts = cfg.RetryMaxAttempts +} + +func 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 addClientUserAgent(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "lambda", 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) 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/lambda") + }) + 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 resolveAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode) *string { + if mode == aws.AccountIDEndpointModeDisabled { + return nil + } + + if ca, ok := identity.(*internalauthsmithy.CredentialsAdapter); ok && ca.Credentials.AccountID != "" { + return aws.String(ca.Credentials.AccountID) + } + + return nil +} + +func addTimeOffsetBuild(stack *middleware.Stack, c *Client) error { + mw := internalmiddleware.AddTimeOffsetMiddleware{Offset: c.timeOffset} + if err := stack.Build.Add(&mw, middleware.After); err != nil { + return err + } + return stack.Deserialize.Insert(&mw, "RecordResponseTiming", middleware.Before) +} +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) +} + +type spanInitializeStart struct { +} + +func (*spanInitializeStart) ID() string { + return "spanInitializeStart" +} + +func (m *spanInitializeStart) HandleInitialize( + ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, +) ( + middleware.InitializeOutput, middleware.Metadata, error, +) { + ctx, _ = tracing.StartSpan(ctx, "Initialize") + + return next.HandleInitialize(ctx, in) +} + +type spanInitializeEnd struct { +} + +func (*spanInitializeEnd) ID() string { + return "spanInitializeEnd" +} + +func (m *spanInitializeEnd) HandleInitialize( + ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, +) ( + middleware.InitializeOutput, middleware.Metadata, error, +) { + ctx, span := tracing.PopSpan(ctx) + span.End() + + return next.HandleInitialize(ctx, in) +} + +type spanBuildRequestStart struct { +} + +func (*spanBuildRequestStart) ID() string { + return "spanBuildRequestStart" +} + +func (m *spanBuildRequestStart) HandleSerialize( + ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler, +) ( + middleware.SerializeOutput, middleware.Metadata, error, +) { + ctx, _ = tracing.StartSpan(ctx, "BuildRequest") + + return next.HandleSerialize(ctx, in) +} + +type spanBuildRequestEnd struct { +} + +func (*spanBuildRequestEnd) ID() string { + return "spanBuildRequestEnd" +} + +func (m *spanBuildRequestEnd) HandleBuild( + ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler, +) ( + middleware.BuildOutput, middleware.Metadata, error, +) { + ctx, span := tracing.PopSpan(ctx) + span.End() + + return next.HandleBuild(ctx, in) +} + +func addSpanInitializeStart(stack *middleware.Stack) error { + return stack.Initialize.Add(&spanInitializeStart{}, middleware.Before) +} + +func addSpanInitializeEnd(stack *middleware.Stack) error { + return stack.Initialize.Add(&spanInitializeEnd{}, middleware.After) +} + +func addSpanBuildRequestStart(stack *middleware.Stack) error { + return stack.Serialize.Add(&spanBuildRequestStart{}, middleware.Before) +} + +func addSpanBuildRequestEnd(stack *middleware.Stack) error { + return stack.Build.Add(&spanBuildRequestEnd{}, middleware.After) +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_AddLayerVersionPermission.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_AddLayerVersionPermission.go new file mode 100644 index 00000000..7be06262 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_AddLayerVersionPermission.go @@ -0,0 +1,203 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +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" +) + +// Adds permissions to the resource-based policy of a version of an [Lambda layer]. Use this +// action to grant layer usage permission to other accounts. You can grant +// permission to a single account, all accounts in an organization, or all Amazon +// Web Services accounts. +// +// To revoke permission, call RemoveLayerVersionPermission with the statement ID that you specified when you +// added it. +// +// [Lambda layer]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html +func (c *Client) AddLayerVersionPermission(ctx context.Context, params *AddLayerVersionPermissionInput, optFns ...func(*Options)) (*AddLayerVersionPermissionOutput, error) { + if params == nil { + params = &AddLayerVersionPermissionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "AddLayerVersionPermission", params, optFns, c.addOperationAddLayerVersionPermissionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*AddLayerVersionPermissionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type AddLayerVersionPermissionInput struct { + + // The API action that grants access to the layer. For example, + // lambda:GetLayerVersion . + // + // This member is required. + Action *string + + // The name or Amazon Resource Name (ARN) of the layer. + // + // This member is required. + LayerName *string + + // An account ID, or * to grant layer usage permission to all accounts in an + // organization, or all Amazon Web Services accounts (if organizationId is not + // specified). For the last case, make sure that you really do want all Amazon Web + // Services accounts to have usage permission to this layer. + // + // This member is required. + Principal *string + + // An identifier that distinguishes the policy from others on the same layer + // version. + // + // This member is required. + StatementId *string + + // The version number. + // + // This member is required. + VersionNumber *int64 + + // With the principal set to * , grant permission to all accounts in the specified + // organization. + OrganizationId *string + + // Only update the policy if the revision ID matches the ID specified. Use this + // option to avoid modifying a policy that has changed since you last read it. + RevisionId *string + + noSmithyDocumentSerde +} + +type AddLayerVersionPermissionOutput struct { + + // A unique identifier for the current revision of the policy. + RevisionId *string + + // The permission statement. + Statement *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationAddLayerVersionPermissionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpAddLayerVersionPermission{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpAddLayerVersionPermission{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "AddLayerVersionPermission"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpAddLayerVersionPermissionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAddLayerVersionPermission(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opAddLayerVersionPermission(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "AddLayerVersionPermission", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_AddPermission.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_AddPermission.go new file mode 100644 index 00000000..71a5db72 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_AddPermission.go @@ -0,0 +1,246 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/lambda/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Grants a [principal] permission to use a function. You can apply the policy at the +// function level, or specify a qualifier to restrict access to a single version or +// alias. If you use a qualifier, the invoker must use the full Amazon Resource +// Name (ARN) of that version or alias to invoke the function. Note: Lambda does +// not support adding policies to version $LATEST. +// +// To grant permission to another account, specify the account ID as the Principal +// . To grant permission to an organization defined in Organizations, specify the +// organization ID as the PrincipalOrgID . For Amazon Web Services services, the +// principal is a domain-style identifier that the service defines, such as +// s3.amazonaws.com or sns.amazonaws.com . For Amazon Web Services services, you +// can also specify the ARN of the associated resource as the SourceArn . If you +// grant permission to a service principal without specifying the source, other +// accounts could potentially configure resources in their account to invoke your +// Lambda function. +// +// This operation adds a statement to a resource-based permissions policy for the +// function. For more information about function policies, see [Using resource-based policies for Lambda]. +// +// [principal]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#Principal_specifying +// [Using resource-based policies for Lambda]: https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html +func (c *Client) AddPermission(ctx context.Context, params *AddPermissionInput, optFns ...func(*Options)) (*AddPermissionOutput, error) { + if params == nil { + params = &AddPermissionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "AddPermission", params, optFns, c.addOperationAddPermissionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*AddPermissionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type AddPermissionInput struct { + + // The action that the principal can use on the function. For example, + // lambda:InvokeFunction or lambda:GetFunction . + // + // This member is required. + Action *string + + // The name or ARN of the Lambda function, version, or alias. + // + // Name formats + // + // - Function name – my-function (name-only), my-function:v1 (with alias). + // + // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function . + // + // - Partial ARN – 123456789012:function:my-function . + // + // You can append a version number or alias to any of the formats. The length + // constraint applies only to the full ARN. If you specify only the function name, + // it is limited to 64 characters in length. + // + // This member is required. + FunctionName *string + + // The Amazon Web Services service, Amazon Web Services account, IAM user, or IAM + // role that invokes the function. If you specify a service, use SourceArn or + // SourceAccount to limit who can invoke the function through that service. + // + // This member is required. + Principal *string + + // A statement identifier that differentiates the statement from others in the + // same policy. + // + // This member is required. + StatementId *string + + // For Alexa Smart Home functions, a token that the invoker must supply. + EventSourceToken *string + + // The type of authentication that your function URL uses. Set to AWS_IAM if you + // want to restrict access to authenticated users only. Set to NONE if you want to + // bypass IAM authentication to create a public endpoint. For more information, see + // [Security and auth model for Lambda function URLs]. + // + // [Security and auth model for Lambda function URLs]: https://docs.aws.amazon.com/lambda/latest/dg/urls-auth.html + FunctionUrlAuthType types.FunctionUrlAuthType + + // The identifier for your organization in Organizations. Use this to grant + // permissions to all the Amazon Web Services accounts under this organization. + PrincipalOrgID *string + + // Specify a version or alias to add permissions to a published version of the + // function. + Qualifier *string + + // Update the policy only if the revision ID matches the ID that's specified. Use + // this option to avoid modifying a policy that has changed since you last read it. + RevisionId *string + + // For Amazon Web Services service, the ID of the Amazon Web Services account that + // owns the resource. Use this together with SourceArn to ensure that the + // specified account owns the resource. It is possible for an Amazon S3 bucket to + // be deleted by its owner and recreated by another account. + SourceAccount *string + + // For Amazon Web Services services, the ARN of the Amazon Web Services resource + // that invokes the function. For example, an Amazon S3 bucket or Amazon SNS topic. + // + // Note that Lambda configures the comparison using the StringLike operator. + SourceArn *string + + noSmithyDocumentSerde +} + +type AddPermissionOutput struct { + + // The permission statement that's added to the function policy. + Statement *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationAddPermissionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpAddPermission{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpAddPermission{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "AddPermission"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpAddPermissionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAddPermission(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opAddPermission(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "AddPermission", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_CreateAlias.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_CreateAlias.go new file mode 100644 index 00000000..54c26b58 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_CreateAlias.go @@ -0,0 +1,216 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/lambda/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates an [alias] for a Lambda function version. Use aliases to provide clients with +// a function identifier that you can update to invoke a different version. +// +// You can also map an alias to split invocation requests between two versions. +// Use the RoutingConfig parameter to specify a second version and the percentage +// of invocation requests that it receives. +// +// [alias]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html +func (c *Client) CreateAlias(ctx context.Context, params *CreateAliasInput, optFns ...func(*Options)) (*CreateAliasOutput, error) { + if params == nil { + params = &CreateAliasInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateAlias", params, optFns, c.addOperationCreateAliasMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateAliasOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateAliasInput struct { + + // The name or ARN of the Lambda function. + // + // Name formats + // + // - Function name - MyFunction . + // + // - Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction . + // + // - Partial ARN - 123456789012:function:MyFunction . + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. + // + // This member is required. + FunctionName *string + + // The function version that the alias invokes. + // + // This member is required. + FunctionVersion *string + + // The name of the alias. + // + // This member is required. + Name *string + + // A description of the alias. + Description *string + + // The [routing configuration] of the alias. + // + // [routing configuration]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html#configuring-alias-routing + RoutingConfig *types.AliasRoutingConfiguration + + noSmithyDocumentSerde +} + +// Provides configuration information about a Lambda function [alias]. +// +// [alias]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html +type CreateAliasOutput struct { + + // The Amazon Resource Name (ARN) of the alias. + AliasArn *string + + // A description of the alias. + Description *string + + // The function version that the alias invokes. + FunctionVersion *string + + // The name of the alias. + Name *string + + // A unique identifier that changes when you update the alias. + RevisionId *string + + // The [routing configuration] of the alias. + // + // [routing configuration]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html + RoutingConfig *types.AliasRoutingConfiguration + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateAliasMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateAlias{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateAlias{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateAlias"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpCreateAliasValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateAlias(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateAlias(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateAlias", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_CreateCodeSigningConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_CreateCodeSigningConfig.go new file mode 100644 index 00000000..4fe78a3b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_CreateCodeSigningConfig.go @@ -0,0 +1,176 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/lambda/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a code signing configuration. A [code signing configuration] defines a list of allowed signing +// profiles and defines the code-signing validation policy (action to be taken if +// deployment validation checks fail). +// +// [code signing configuration]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-codesigning.html +func (c *Client) CreateCodeSigningConfig(ctx context.Context, params *CreateCodeSigningConfigInput, optFns ...func(*Options)) (*CreateCodeSigningConfigOutput, error) { + if params == nil { + params = &CreateCodeSigningConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateCodeSigningConfig", params, optFns, c.addOperationCreateCodeSigningConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateCodeSigningConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateCodeSigningConfigInput struct { + + // Signing profiles for this code signing configuration. + // + // This member is required. + AllowedPublishers *types.AllowedPublishers + + // The code signing policies define the actions to take if the validation checks + // fail. + CodeSigningPolicies *types.CodeSigningPolicies + + // Descriptive name for this code signing configuration. + Description *string + + // A list of tags to add to the code signing configuration. + Tags map[string]string + + noSmithyDocumentSerde +} + +type CreateCodeSigningConfigOutput struct { + + // The code signing configuration. + // + // This member is required. + CodeSigningConfig *types.CodeSigningConfig + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateCodeSigningConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateCodeSigningConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateCodeSigningConfig{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateCodeSigningConfig"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpCreateCodeSigningConfigValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateCodeSigningConfig(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateCodeSigningConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateCodeSigningConfig", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_CreateEventSourceMapping.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_CreateEventSourceMapping.go new file mode 100644 index 00000000..5b85f7fa --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_CreateEventSourceMapping.go @@ -0,0 +1,563 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/lambda/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Creates a mapping between an event source and an Lambda function. Lambda reads +// items from the event source and invokes the function. +// +// For details about how to configure different event sources, see the following +// topics. +// +// [Amazon DynamoDB Streams] +// +// [Amazon Kinesis] +// +// [Amazon SQS] +// +// [Amazon MQ and RabbitMQ] +// +// [Amazon MSK] +// +// [Apache Kafka] +// +// [Amazon DocumentDB] +// +// The following error handling options are available only for DynamoDB and +// Kinesis event sources: +// +// - BisectBatchOnFunctionError – If the function returns an error, split the +// batch in two and retry. +// +// - MaximumRecordAgeInSeconds – Discard records older than the specified age. +// The default value is infinite (-1). When set to infinite (-1), failed records +// are retried until the record expires +// +// - MaximumRetryAttempts – Discard records after the specified number of +// retries. The default value is infinite (-1). When set to infinite (-1), failed +// records are retried until the record expires. +// +// - ParallelizationFactor – Process multiple batches from each shard +// concurrently. +// +// For stream sources (DynamoDB, Kinesis, Amazon MSK, and self-managed Apache +// Kafka), the following option is also available: +// +// - DestinationConfig – Send discarded records to an Amazon SQS queue, Amazon +// SNS topic, or Amazon S3 bucket. +// +// For information about which configuration parameters apply to each event +// source, see the following topics. +// +// [Amazon DynamoDB Streams] +// +// [Amazon Kinesis] +// +// [Amazon SQS] +// +// [Amazon MQ and RabbitMQ] +// +// [Amazon MSK] +// +// [Apache Kafka] +// +// [Amazon DocumentDB] +// +// [Amazon DynamoDB Streams]: https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html#services-ddb-params +// [Amazon SQS]: https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#services-sqs-params +// [Amazon MSK]: https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#services-msk-parms +// [Amazon Kinesis]: https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html#services-kinesis-params +// [Amazon MQ and RabbitMQ]: https://docs.aws.amazon.com/lambda/latest/dg/with-mq.html#services-mq-params +// [Apache Kafka]: https://docs.aws.amazon.com/lambda/latest/dg/with-kafka.html#services-kafka-parms +// [Amazon DocumentDB]: https://docs.aws.amazon.com/lambda/latest/dg/with-documentdb.html#docdb-configuration +func (c *Client) CreateEventSourceMapping(ctx context.Context, params *CreateEventSourceMappingInput, optFns ...func(*Options)) (*CreateEventSourceMappingOutput, error) { + if params == nil { + params = &CreateEventSourceMappingInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateEventSourceMapping", params, optFns, c.addOperationCreateEventSourceMappingMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateEventSourceMappingOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateEventSourceMappingInput struct { + + // The name or ARN of the Lambda function. + // + // Name formats + // + // - Function name – MyFunction . + // + // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:MyFunction . + // + // - Version or Alias ARN – + // arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD . + // + // - Partial ARN – 123456789012:function:MyFunction . + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it's limited to 64 characters in length. + // + // This member is required. + FunctionName *string + + // Specific configuration settings for an Amazon Managed Streaming for Apache + // Kafka (Amazon MSK) event source. + AmazonManagedKafkaEventSourceConfig *types.AmazonManagedKafkaEventSourceConfig + + // The maximum number of records in each batch that Lambda pulls from your stream + // or queue and sends to your function. Lambda passes all of the records in the + // batch to the function in a single call, up to the payload limit for synchronous + // invocation (6 MB). + // + // - Amazon Kinesis – Default 100. Max 10,000. + // + // - Amazon DynamoDB Streams – Default 100. Max 10,000. + // + // - Amazon Simple Queue Service – Default 10. For standard queues the max is + // 10,000. For FIFO queues the max is 10. + // + // - Amazon Managed Streaming for Apache Kafka – Default 100. Max 10,000. + // + // - Self-managed Apache Kafka – Default 100. Max 10,000. + // + // - Amazon MQ (ActiveMQ and RabbitMQ) – Default 100. Max 10,000. + // + // - DocumentDB – Default 100. Max 10,000. + BatchSize *int32 + + // (Kinesis and DynamoDB Streams only) If the function returns an error, split the + // batch in two and retry. + BisectBatchOnFunctionError *bool + + // (Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Kafka only) A + // configuration object that specifies the destination of an event after Lambda + // processes it. + DestinationConfig *types.DestinationConfig + + // Specific configuration settings for a DocumentDB event source. + DocumentDBEventSourceConfig *types.DocumentDBEventSourceConfig + + // When true, the event source mapping is active. When false, Lambda pauses + // polling and invocation. + // + // Default: True + Enabled *bool + + // The Amazon Resource Name (ARN) of the event source. + // + // - Amazon Kinesis – The ARN of the data stream or a stream consumer. + // + // - Amazon DynamoDB Streams – The ARN of the stream. + // + // - Amazon Simple Queue Service – The ARN of the queue. + // + // - Amazon Managed Streaming for Apache Kafka – The ARN of the cluster or the + // ARN of the VPC connection (for [cross-account event source mappings]). + // + // - Amazon MQ – The ARN of the broker. + // + // - Amazon DocumentDB – The ARN of the DocumentDB change stream. + // + // [cross-account event source mappings]: https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#msk-multi-vpc + EventSourceArn *string + + // An object that defines the filter criteria that determine whether Lambda should + // process an event. For more information, see [Lambda event filtering]. + // + // [Lambda event filtering]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html + FilterCriteria *types.FilterCriteria + + // (Kinesis, DynamoDB Streams, and Amazon SQS) A list of current response type + // enums applied to the event source mapping. + FunctionResponseTypes []types.FunctionResponseType + + // The ARN of the Key Management Service (KMS) customer managed key that Lambda + // uses to encrypt your function's [filter criteria]. By default, Lambda does not encrypt your + // filter criteria object. Specify this property to encrypt data using your own + // customer managed key. + // + // [filter criteria]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html#filtering-basics + KMSKeyArn *string + + // The maximum amount of time, in seconds, that Lambda spends gathering records + // before invoking the function. You can configure MaximumBatchingWindowInSeconds + // to any value from 0 seconds to 300 seconds in increments of seconds. + // + // For Kinesis, DynamoDB, and Amazon SQS event sources, the default batching + // window is 0 seconds. For Amazon MSK, Self-managed Apache Kafka, Amazon MQ, and + // DocumentDB event sources, the default batching window is 500 ms. Note that + // because you can only change MaximumBatchingWindowInSeconds in increments of + // seconds, you cannot revert back to the 500 ms default batching window after you + // have changed it. To restore the default batching window, you must create a new + // event source mapping. + // + // Related setting: For Kinesis, DynamoDB, and Amazon SQS event sources, when you + // set BatchSize to a value greater than 10, you must set + // MaximumBatchingWindowInSeconds to at least 1. + MaximumBatchingWindowInSeconds *int32 + + // (Kinesis and DynamoDB Streams only) Discard records older than the specified + // age. The default value is infinite (-1). + MaximumRecordAgeInSeconds *int32 + + // (Kinesis and DynamoDB Streams only) Discard records after the specified number + // of retries. The default value is infinite (-1). When set to infinite (-1), + // failed records are retried until the record expires. + MaximumRetryAttempts *int32 + + // The metrics configuration for your event source. For more information, see [Event source mapping metrics]. + // + // [Event source mapping metrics]: https://docs.aws.amazon.com/lambda/latest/dg/monitoring-metrics-types.html#event-source-mapping-metrics + MetricsConfig *types.EventSourceMappingMetricsConfig + + // (Kinesis and DynamoDB Streams only) The number of batches to process from each + // shard concurrently. + ParallelizationFactor *int32 + + // (Amazon MSK and self-managed Apache Kafka only) The provisioned mode + // configuration for the event source. For more information, see [provisioned mode]. + // + // [provisioned mode]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html#invocation-eventsourcemapping-provisioned-mode + ProvisionedPollerConfig *types.ProvisionedPollerConfig + + // (MQ) The name of the Amazon MQ broker destination queue to consume. + Queues []string + + // (Amazon SQS only) The scaling configuration for the event source. For more + // information, see [Configuring maximum concurrency for Amazon SQS event sources]. + // + // [Configuring maximum concurrency for Amazon SQS event sources]: https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-max-concurrency + ScalingConfig *types.ScalingConfig + + // The self-managed Apache Kafka cluster to receive records from. + SelfManagedEventSource *types.SelfManagedEventSource + + // Specific configuration settings for a self-managed Apache Kafka event source. + SelfManagedKafkaEventSourceConfig *types.SelfManagedKafkaEventSourceConfig + + // An array of authentication protocols or VPC components required to secure your + // event source. + SourceAccessConfigurations []types.SourceAccessConfiguration + + // The position in a stream from which to start reading. Required for Amazon + // Kinesis and Amazon DynamoDB Stream event sources. AT_TIMESTAMP is supported + // only for Amazon Kinesis streams, Amazon DocumentDB, Amazon MSK, and self-managed + // Apache Kafka. + StartingPosition types.EventSourcePosition + + // With StartingPosition set to AT_TIMESTAMP , the time from which to start + // reading. StartingPositionTimestamp cannot be in the future. + StartingPositionTimestamp *time.Time + + // A list of tags to apply to the event source mapping. + Tags map[string]string + + // The name of the Kafka topic. + Topics []string + + // (Kinesis and DynamoDB Streams only) The duration in seconds of a processing + // window for DynamoDB and Kinesis Streams event sources. A value of 0 seconds + // indicates no tumbling window. + TumblingWindowInSeconds *int32 + + noSmithyDocumentSerde +} + +// A mapping between an Amazon Web Services resource and a Lambda function. For +// details, see CreateEventSourceMapping. +type CreateEventSourceMappingOutput struct { + + // Specific configuration settings for an Amazon Managed Streaming for Apache + // Kafka (Amazon MSK) event source. + AmazonManagedKafkaEventSourceConfig *types.AmazonManagedKafkaEventSourceConfig + + // The maximum number of records in each batch that Lambda pulls from your stream + // or queue and sends to your function. Lambda passes all of the records in the + // batch to the function in a single call, up to the payload limit for synchronous + // invocation (6 MB). + // + // Default value: Varies by service. For Amazon SQS, the default is 10. For all + // other services, the default is 100. + // + // Related setting: When you set BatchSize to a value greater than 10, you must + // set MaximumBatchingWindowInSeconds to at least 1. + BatchSize *int32 + + // (Kinesis and DynamoDB Streams only) If the function returns an error, split the + // batch in two and retry. The default value is false. + BisectBatchOnFunctionError *bool + + // (Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka event + // sources only) A configuration object that specifies the destination of an event + // after Lambda processes it. + DestinationConfig *types.DestinationConfig + + // Specific configuration settings for a DocumentDB event source. + DocumentDBEventSourceConfig *types.DocumentDBEventSourceConfig + + // The Amazon Resource Name (ARN) of the event source. + EventSourceArn *string + + // The Amazon Resource Name (ARN) of the event source mapping. + EventSourceMappingArn *string + + // An object that defines the filter criteria that determine whether Lambda should + // process an event. For more information, see [Lambda event filtering]. + // + // If filter criteria is encrypted, this field shows up as null in the response of + // ListEventSourceMapping API calls. You can view this field in plaintext in the + // response of GetEventSourceMapping and DeleteEventSourceMapping calls if you have + // kms:Decrypt permissions for the correct KMS key. + // + // [Lambda event filtering]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html + FilterCriteria *types.FilterCriteria + + // An object that contains details about an error related to filter criteria + // encryption. + FilterCriteriaError *types.FilterCriteriaError + + // The ARN of the Lambda function. + FunctionArn *string + + // (Kinesis, DynamoDB Streams, and Amazon SQS) A list of current response type + // enums applied to the event source mapping. + FunctionResponseTypes []types.FunctionResponseType + + // The ARN of the Key Management Service (KMS) customer managed key that Lambda + // uses to encrypt your function's [filter criteria]. + // + // [filter criteria]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html#filtering-basics + KMSKeyArn *string + + // The date that the event source mapping was last updated or that its state + // changed. + LastModified *time.Time + + // The result of the last Lambda invocation of your function. + LastProcessingResult *string + + // The maximum amount of time, in seconds, that Lambda spends gathering records + // before invoking the function. You can configure MaximumBatchingWindowInSeconds + // to any value from 0 seconds to 300 seconds in increments of seconds. + // + // For streams and Amazon SQS event sources, the default batching window is 0 + // seconds. For Amazon MSK, Self-managed Apache Kafka, Amazon MQ, and DocumentDB + // event sources, the default batching window is 500 ms. Note that because you can + // only change MaximumBatchingWindowInSeconds in increments of seconds, you cannot + // revert back to the 500 ms default batching window after you have changed it. To + // restore the default batching window, you must create a new event source mapping. + // + // Related setting: For streams and Amazon SQS event sources, when you set + // BatchSize to a value greater than 10, you must set + // MaximumBatchingWindowInSeconds to at least 1. + MaximumBatchingWindowInSeconds *int32 + + // (Kinesis and DynamoDB Streams only) Discard records older than the specified + // age. The default value is -1, which sets the maximum age to infinite. When the + // value is set to infinite, Lambda never discards old records. + // + // The minimum valid value for maximum record age is 60s. Although values less + // than 60 and greater than -1 fall within the parameter's absolute range, they are + // not allowed + MaximumRecordAgeInSeconds *int32 + + // (Kinesis and DynamoDB Streams only) Discard records after the specified number + // of retries. The default value is -1, which sets the maximum number of retries to + // infinite. When MaximumRetryAttempts is infinite, Lambda retries failed records + // until the record expires in the event source. + MaximumRetryAttempts *int32 + + // The metrics configuration for your event source. For more information, see [Event source mapping metrics]. + // + // [Event source mapping metrics]: https://docs.aws.amazon.com/lambda/latest/dg/monitoring-metrics-types.html#event-source-mapping-metrics + MetricsConfig *types.EventSourceMappingMetricsConfig + + // (Kinesis and DynamoDB Streams only) The number of batches to process + // concurrently from each shard. The default value is 1. + ParallelizationFactor *int32 + + // (Amazon MSK and self-managed Apache Kafka only) The provisioned mode + // configuration for the event source. For more information, see [provisioned mode]. + // + // [provisioned mode]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html#invocation-eventsourcemapping-provisioned-mode + ProvisionedPollerConfig *types.ProvisionedPollerConfig + + // (Amazon MQ) The name of the Amazon MQ broker destination queue to consume. + Queues []string + + // (Amazon SQS only) The scaling configuration for the event source. For more + // information, see [Configuring maximum concurrency for Amazon SQS event sources]. + // + // [Configuring maximum concurrency for Amazon SQS event sources]: https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-max-concurrency + ScalingConfig *types.ScalingConfig + + // The self-managed Apache Kafka cluster for your event source. + SelfManagedEventSource *types.SelfManagedEventSource + + // Specific configuration settings for a self-managed Apache Kafka event source. + SelfManagedKafkaEventSourceConfig *types.SelfManagedKafkaEventSourceConfig + + // An array of the authentication protocol, VPC components, or virtual host to + // secure and define your event source. + SourceAccessConfigurations []types.SourceAccessConfiguration + + // The position in a stream from which to start reading. Required for Amazon + // Kinesis and Amazon DynamoDB Stream event sources. AT_TIMESTAMP is supported + // only for Amazon Kinesis streams, Amazon DocumentDB, Amazon MSK, and self-managed + // Apache Kafka. + StartingPosition types.EventSourcePosition + + // With StartingPosition set to AT_TIMESTAMP , the time from which to start + // reading. StartingPositionTimestamp cannot be in the future. + StartingPositionTimestamp *time.Time + + // The state of the event source mapping. It can be one of the following: Creating + // , Enabling , Enabled , Disabling , Disabled , Updating , or Deleting . + State *string + + // Indicates whether a user or Lambda made the last change to the event source + // mapping. + StateTransitionReason *string + + // The name of the Kafka topic. + Topics []string + + // (Kinesis and DynamoDB Streams only) The duration in seconds of a processing + // window for DynamoDB and Kinesis Streams event sources. A value of 0 seconds + // indicates no tumbling window. + TumblingWindowInSeconds *int32 + + // The identifier of the event source mapping. + UUID *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateEventSourceMappingMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateEventSourceMapping{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateEventSourceMapping{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateEventSourceMapping"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpCreateEventSourceMappingValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateEventSourceMapping(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateEventSourceMapping(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateEventSourceMapping", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_CreateFunction.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_CreateFunction.go new file mode 100644 index 00000000..26b26018 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_CreateFunction.go @@ -0,0 +1,540 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/lambda/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a Lambda function. To create a function, you need a [deployment package] and an [execution role]. The +// deployment package is a .zip file archive or container image that contains your +// function code. The execution role grants the function permission to use Amazon +// Web Services services, such as Amazon CloudWatch Logs for log streaming and +// X-Ray for request tracing. +// +// If the deployment package is a [container image], then you set the package type to Image . For a +// container image, the code property must include the URI of a container image in +// the Amazon ECR registry. You do not need to specify the handler and runtime +// properties. +// +// If the deployment package is a [.zip file archive], then you set the package type to Zip . For a +// .zip file archive, the code property specifies the location of the .zip file. +// You must also specify the handler and runtime properties. The code in the +// deployment package must be compatible with the target instruction set +// architecture of the function ( x86-64 or arm64 ). If you do not specify the +// architecture, then the default value is x86-64 . +// +// When you create a function, Lambda provisions an instance of the function and +// its supporting resources. If your function connects to a VPC, this process can +// take a minute or so. During this time, you can't invoke or modify the function. +// The State , StateReason , and StateReasonCode fields in the response from GetFunctionConfiguration +// indicate when the function is ready to invoke. For more information, see [Lambda function states]. +// +// A function has an unpublished version, and can have published versions and +// aliases. The unpublished version changes when you update your function's code +// and configuration. A published version is a snapshot of your function code and +// configuration that can't be changed. An alias is a named resource that maps to a +// version, and can be changed to map to a different version. Use the Publish +// parameter to create version 1 of your function from its initial configuration. +// +// The other parameters let you configure version-specific and function-level +// settings. You can modify version-specific settings later with UpdateFunctionConfiguration. Function-level +// settings apply to both the unpublished and published versions of the function, +// and include tags (TagResource ) and per-function concurrency limits (PutFunctionConcurrency ). +// +// You can use code signing if your deployment package is a .zip file archive. To +// enable code signing for this function, specify the ARN of a code-signing +// configuration. When a user attempts to deploy a code package with UpdateFunctionCode, Lambda +// checks that the code package has a valid signature from a trusted publisher. The +// code-signing configuration includes set of signing profiles, which define the +// trusted publishers for this function. +// +// If another Amazon Web Services account or an Amazon Web Services service +// invokes your function, use AddPermissionto grant permission by creating a resource-based +// Identity and Access Management (IAM) policy. You can grant permissions at the +// function level, on a version, or on an alias. +// +// To invoke your function directly, use Invoke. To invoke your function in response to +// events in other Amazon Web Services services, create an event source mapping (CreateEventSourceMapping +// ), or configure a function trigger in the other service. For more information, +// see [Invoking Lambda functions]. +// +// [Invoking Lambda functions]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-invocation.html +// [Lambda function states]: https://docs.aws.amazon.com/lambda/latest/dg/functions-states.html +// [.zip file archive]: https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-package.html#gettingstarted-package-zip +// [execution role]: https://docs.aws.amazon.com/lambda/latest/dg/intro-permission-model.html#lambda-intro-execution-role +// [container image]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-images.html +// [deployment package]: https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-package.html +func (c *Client) CreateFunction(ctx context.Context, params *CreateFunctionInput, optFns ...func(*Options)) (*CreateFunctionOutput, error) { + if params == nil { + params = &CreateFunctionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateFunction", params, optFns, c.addOperationCreateFunctionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateFunctionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateFunctionInput struct { + + // The code for the function. + // + // This member is required. + Code *types.FunctionCode + + // The name or ARN of the Lambda function. + // + // Name formats + // + // - Function name – my-function . + // + // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function . + // + // - Partial ARN – 123456789012:function:my-function . + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. + // + // This member is required. + FunctionName *string + + // The Amazon Resource Name (ARN) of the function's execution role. + // + // This member is required. + Role *string + + // The instruction set architecture that the function supports. Enter a string + // array with one of the valid values (arm64 or x86_64). The default value is + // x86_64 . + Architectures []types.Architecture + + // To enable code signing for this function, specify the ARN of a code-signing + // configuration. A code-signing configuration includes a set of signing profiles, + // which define the trusted publishers for this function. + CodeSigningConfigArn *string + + // A dead-letter queue configuration that specifies the queue or topic where + // Lambda sends asynchronous events when they fail processing. For more + // information, see [Dead-letter queues]. + // + // [Dead-letter queues]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-dlq + DeadLetterConfig *types.DeadLetterConfig + + // A description of the function. + Description *string + + // Environment variables that are accessible from function code during execution. + Environment *types.Environment + + // The size of the function's /tmp directory in MB. The default value is 512, but + // can be any whole number between 512 and 10,240 MB. For more information, see [Configuring ephemeral storage (console)]. + // + // [Configuring ephemeral storage (console)]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-ephemeral-storage + EphemeralStorage *types.EphemeralStorage + + // Connection settings for an Amazon EFS file system. + FileSystemConfigs []types.FileSystemConfig + + // The name of the method within your code that Lambda calls to run your function. + // Handler is required if the deployment package is a .zip file archive. The format + // includes the file name. It can also include namespaces and other qualifiers, + // depending on the runtime. For more information, see [Lambda programming model]. + // + // [Lambda programming model]: https://docs.aws.amazon.com/lambda/latest/dg/foundation-progmodel.html + Handler *string + + // Container image [configuration values] that override the values in the container image Dockerfile. + // + // [configuration values]: https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-parms + ImageConfig *types.ImageConfig + + // The ARN of the Key Management Service (KMS) customer managed key that's used to + // encrypt the following resources: + // + // - The function's [environment variables]. + // + // - The function's [Lambda SnapStart]snapshots. + // + // - When used with SourceKMSKeyArn , the unzipped version of the .zip deployment + // package that's used for function invocations. For more information, see [Specifying a customer managed key for Lambda]. + // + // - The optimized version of the container image that's used for function + // invocations. Note that this is not the same key that's used to protect your + // container image in the Amazon Elastic Container Registry (Amazon ECR). For more + // information, see [Function lifecycle]. + // + // If you don't provide a customer managed key, Lambda uses an [Amazon Web Services owned key] or an [Amazon Web Services managed key]. + // + // [Amazon Web Services owned key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk + // [Specifying a customer managed key for Lambda]: https://docs.aws.amazon.com/lambda/latest/dg/encrypt-zip-package.html#enable-zip-custom-encryption + // [Lambda SnapStart]: https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html + // [environment variables]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-encryption + // [Function lifecycle]: https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-lifecycle + // [Amazon Web Services managed key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk + KMSKeyArn *string + + // A list of [function layers] to add to the function's execution environment. Specify each layer + // by its ARN, including the version. + // + // [function layers]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html + Layers []string + + // The function's Amazon CloudWatch Logs configuration settings. + LoggingConfig *types.LoggingConfig + + // The amount of [memory available to the function] at runtime. Increasing the function memory also increases its + // CPU allocation. The default value is 128 MB. The value can be any multiple of 1 + // MB. + // + // [memory available to the function]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-memory-console + MemorySize *int32 + + // The type of deployment package. Set to Image for container image and set to Zip + // for .zip file archive. + PackageType types.PackageType + + // Set to true to publish the first version of the function during creation. + Publish bool + + // The identifier of the function's [runtime]. Runtime is required if the deployment + // package is a .zip file archive. Specifying a runtime results in an error if + // you're deploying a function using a container image. + // + // The following list includes deprecated runtimes. Lambda blocks creating new + // functions and updating existing functions shortly after each runtime is + // deprecated. For more information, see [Runtime use after deprecation]. + // + // For a list of all currently supported runtimes, see [Supported runtimes]. + // + // [Runtime use after deprecation]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-deprecation-levels + // [runtime]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html + // [Supported runtimes]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtimes-supported + Runtime types.Runtime + + // The function's [SnapStart] setting. + // + // [SnapStart]: https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html + SnapStart *types.SnapStart + + // A list of [tags] to apply to the function. + // + // [tags]: https://docs.aws.amazon.com/lambda/latest/dg/tagging.html + Tags map[string]string + + // The amount of time (in seconds) that Lambda allows a function to run before + // stopping it. The default is 3 seconds. The maximum allowed value is 900 seconds. + // For more information, see [Lambda execution environment]. + // + // [Lambda execution environment]: https://docs.aws.amazon.com/lambda/latest/dg/runtimes-context.html + Timeout *int32 + + // Set Mode to Active to sample and trace a subset of incoming requests with [X-Ray]. + // + // [X-Ray]: https://docs.aws.amazon.com/lambda/latest/dg/services-xray.html + TracingConfig *types.TracingConfig + + // For network connectivity to Amazon Web Services resources in a VPC, specify a + // list of security groups and subnets in the VPC. When you connect a function to a + // VPC, it can access resources and the internet only through that VPC. For more + // information, see [Configuring a Lambda function to access resources in a VPC]. + // + // [Configuring a Lambda function to access resources in a VPC]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html + VpcConfig *types.VpcConfig + + noSmithyDocumentSerde +} + +// Details about a function's configuration. +type CreateFunctionOutput struct { + + // The instruction set architecture that the function supports. Architecture is a + // string array with one of the valid values. The default architecture value is + // x86_64 . + Architectures []types.Architecture + + // The SHA256 hash of the function's deployment package. + CodeSha256 *string + + // The size of the function's deployment package, in bytes. + CodeSize int64 + + // The function's dead letter queue. + DeadLetterConfig *types.DeadLetterConfig + + // The function's description. + Description *string + + // The function's [environment variables]. Omitted from CloudTrail logs. + // + // [environment variables]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html + Environment *types.EnvironmentResponse + + // The size of the function's /tmp directory in MB. The default value is 512, but + // can be any whole number between 512 and 10,240 MB. For more information, see [Configuring ephemeral storage (console)]. + // + // [Configuring ephemeral storage (console)]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-ephemeral-storage + EphemeralStorage *types.EphemeralStorage + + // Connection settings for an [Amazon EFS file system]. + // + // [Amazon EFS file system]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-filesystem.html + FileSystemConfigs []types.FileSystemConfig + + // The function's Amazon Resource Name (ARN). + FunctionArn *string + + // The name of the function. + FunctionName *string + + // The function that Lambda calls to begin running your function. + Handler *string + + // The function's image configuration values. + ImageConfigResponse *types.ImageConfigResponse + + // The ARN of the Key Management Service (KMS) customer managed key that's used to + // encrypt the following resources: + // + // - The function's [environment variables]. + // + // - The function's [Lambda SnapStart]snapshots. + // + // - When used with SourceKMSKeyArn , the unzipped version of the .zip deployment + // package that's used for function invocations. For more information, see [Specifying a customer managed key for Lambda]. + // + // - The optimized version of the container image that's used for function + // invocations. Note that this is not the same key that's used to protect your + // container image in the Amazon Elastic Container Registry (Amazon ECR). For more + // information, see [Function lifecycle]. + // + // If you don't provide a customer managed key, Lambda uses an [Amazon Web Services owned key] or an [Amazon Web Services managed key]. + // + // [Amazon Web Services owned key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk + // [Specifying a customer managed key for Lambda]: https://docs.aws.amazon.com/lambda/latest/dg/encrypt-zip-package.html#enable-zip-custom-encryption + // [Lambda SnapStart]: https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html + // [environment variables]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-encryption + // [Function lifecycle]: https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-lifecycle + // [Amazon Web Services managed key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk + KMSKeyArn *string + + // The date and time that the function was last updated, in [ISO-8601 format] + // (YYYY-MM-DDThh:mm:ss.sTZD). + // + // [ISO-8601 format]: https://www.w3.org/TR/NOTE-datetime + LastModified *string + + // The status of the last update that was performed on the function. This is first + // set to Successful after function creation completes. + LastUpdateStatus types.LastUpdateStatus + + // The reason for the last update that was performed on the function. + LastUpdateStatusReason *string + + // The reason code for the last update that was performed on the function. + LastUpdateStatusReasonCode types.LastUpdateStatusReasonCode + + // The function's [layers]. + // + // [layers]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html + Layers []types.Layer + + // The function's Amazon CloudWatch Logs configuration settings. + LoggingConfig *types.LoggingConfig + + // For Lambda@Edge functions, the ARN of the main function. + MasterArn *string + + // The amount of memory available to the function at runtime. + MemorySize *int32 + + // The type of deployment package. Set to Image for container image and set Zip + // for .zip file archive. + PackageType types.PackageType + + // The latest updated revision of the function or alias. + RevisionId *string + + // The function's execution role. + Role *string + + // The identifier of the function's [runtime]. Runtime is required if the deployment + // package is a .zip file archive. Specifying a runtime results in an error if + // you're deploying a function using a container image. + // + // The following list includes deprecated runtimes. Lambda blocks creating new + // functions and updating existing functions shortly after each runtime is + // deprecated. For more information, see [Runtime use after deprecation]. + // + // For a list of all currently supported runtimes, see [Supported runtimes]. + // + // [Runtime use after deprecation]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-deprecation-levels + // [runtime]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html + // [Supported runtimes]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtimes-supported + Runtime types.Runtime + + // The ARN of the runtime and any errors that occured. + RuntimeVersionConfig *types.RuntimeVersionConfig + + // The ARN of the signing job. + SigningJobArn *string + + // The ARN of the signing profile version. + SigningProfileVersionArn *string + + // Set ApplyOn to PublishedVersions to create a snapshot of the initialized + // execution environment when you publish a function version. For more information, + // see [Improving startup performance with Lambda SnapStart]. + // + // [Improving startup performance with Lambda SnapStart]: https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html + SnapStart *types.SnapStartResponse + + // The current state of the function. When the state is Inactive , you can + // reactivate the function by invoking it. + State types.State + + // The reason for the function's current state. + StateReason *string + + // The reason code for the function's current state. When the code is Creating , + // you can't invoke or modify the function. + StateReasonCode types.StateReasonCode + + // The amount of time in seconds that Lambda allows a function to run before + // stopping it. + Timeout *int32 + + // The function's X-Ray tracing configuration. + TracingConfig *types.TracingConfigResponse + + // The version of the Lambda function. + Version *string + + // The function's networking configuration. + VpcConfig *types.VpcConfigResponse + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateFunctionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateFunction{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateFunction{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateFunction"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpCreateFunctionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateFunction(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateFunction(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateFunction", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_CreateFunctionUrlConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_CreateFunctionUrlConfig.go new file mode 100644 index 00000000..b9617ac8 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_CreateFunctionUrlConfig.go @@ -0,0 +1,246 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/lambda/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a Lambda function URL with the specified configuration parameters. A +// function URL is a dedicated HTTP(S) endpoint that you can use to invoke your +// function. +func (c *Client) CreateFunctionUrlConfig(ctx context.Context, params *CreateFunctionUrlConfigInput, optFns ...func(*Options)) (*CreateFunctionUrlConfigOutput, error) { + if params == nil { + params = &CreateFunctionUrlConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateFunctionUrlConfig", params, optFns, c.addOperationCreateFunctionUrlConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateFunctionUrlConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateFunctionUrlConfigInput struct { + + // The type of authentication that your function URL uses. Set to AWS_IAM if you + // want to restrict access to authenticated users only. Set to NONE if you want to + // bypass IAM authentication to create a public endpoint. For more information, see + // [Security and auth model for Lambda function URLs]. + // + // [Security and auth model for Lambda function URLs]: https://docs.aws.amazon.com/lambda/latest/dg/urls-auth.html + // + // This member is required. + AuthType types.FunctionUrlAuthType + + // The name or ARN of the Lambda function. + // + // Name formats + // + // - Function name – my-function . + // + // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function . + // + // - Partial ARN – 123456789012:function:my-function . + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. + // + // This member is required. + FunctionName *string + + // The [cross-origin resource sharing (CORS)] settings for your function URL. + // + // [cross-origin resource sharing (CORS)]: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS + Cors *types.Cors + + // Use one of the following options: + // + // - BUFFERED – This is the default option. Lambda invokes your function using + // the Invoke API operation. Invocation results are available when the payload is + // complete. The maximum payload size is 6 MB. + // + // - RESPONSE_STREAM – Your function streams payload results as they become + // available. Lambda invokes your function using the InvokeWithResponseStream API + // operation. The maximum response payload size is 20 MB, however, you can [request a quota increase]. + // + // [request a quota increase]: https://docs.aws.amazon.com/servicequotas/latest/userguide/request-quota-increase.html + InvokeMode types.InvokeMode + + // The alias name. + Qualifier *string + + noSmithyDocumentSerde +} + +type CreateFunctionUrlConfigOutput struct { + + // The type of authentication that your function URL uses. Set to AWS_IAM if you + // want to restrict access to authenticated users only. Set to NONE if you want to + // bypass IAM authentication to create a public endpoint. For more information, see + // [Security and auth model for Lambda function URLs]. + // + // [Security and auth model for Lambda function URLs]: https://docs.aws.amazon.com/lambda/latest/dg/urls-auth.html + // + // This member is required. + AuthType types.FunctionUrlAuthType + + // When the function URL was created, in [ISO-8601 format] (YYYY-MM-DDThh:mm:ss.sTZD). + // + // [ISO-8601 format]: https://www.w3.org/TR/NOTE-datetime + // + // This member is required. + CreationTime *string + + // The Amazon Resource Name (ARN) of your function. + // + // This member is required. + FunctionArn *string + + // The HTTP URL endpoint for your function. + // + // This member is required. + FunctionUrl *string + + // The [cross-origin resource sharing (CORS)] settings for your function URL. + // + // [cross-origin resource sharing (CORS)]: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS + Cors *types.Cors + + // Use one of the following options: + // + // - BUFFERED – This is the default option. Lambda invokes your function using + // the Invoke API operation. Invocation results are available when the payload is + // complete. The maximum payload size is 6 MB. + // + // - RESPONSE_STREAM – Your function streams payload results as they become + // available. Lambda invokes your function using the InvokeWithResponseStream API + // operation. The maximum response payload size is 20 MB, however, you can [request a quota increase]. + // + // [request a quota increase]: https://docs.aws.amazon.com/servicequotas/latest/userguide/request-quota-increase.html + InvokeMode types.InvokeMode + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateFunctionUrlConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateFunctionUrlConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateFunctionUrlConfig{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateFunctionUrlConfig"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpCreateFunctionUrlConfigValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateFunctionUrlConfig(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateFunctionUrlConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateFunctionUrlConfig", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteAlias.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteAlias.go new file mode 100644 index 00000000..34cb07ad --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteAlias.go @@ -0,0 +1,173 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +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 Lambda function [alias]. +// +// [alias]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html +func (c *Client) DeleteAlias(ctx context.Context, params *DeleteAliasInput, optFns ...func(*Options)) (*DeleteAliasOutput, error) { + if params == nil { + params = &DeleteAliasInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteAlias", params, optFns, c.addOperationDeleteAliasMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteAliasOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteAliasInput struct { + + // The name or ARN of the Lambda function. + // + // Name formats + // + // - Function name - MyFunction . + // + // - Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction . + // + // - Partial ARN - 123456789012:function:MyFunction . + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. + // + // This member is required. + FunctionName *string + + // The name of the alias. + // + // This member is required. + Name *string + + noSmithyDocumentSerde +} + +type DeleteAliasOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteAliasMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteAlias{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteAlias{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteAlias"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeleteAliasValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteAlias(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteAlias(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteAlias", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteCodeSigningConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteCodeSigningConfig.go new file mode 100644 index 00000000..6b45f85c --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteCodeSigningConfig.go @@ -0,0 +1,156 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +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 code signing configuration. You can delete the code signing +// configuration only if no function is using it. +func (c *Client) DeleteCodeSigningConfig(ctx context.Context, params *DeleteCodeSigningConfigInput, optFns ...func(*Options)) (*DeleteCodeSigningConfigOutput, error) { + if params == nil { + params = &DeleteCodeSigningConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteCodeSigningConfig", params, optFns, c.addOperationDeleteCodeSigningConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteCodeSigningConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteCodeSigningConfigInput struct { + + // The The Amazon Resource Name (ARN) of the code signing configuration. + // + // This member is required. + CodeSigningConfigArn *string + + noSmithyDocumentSerde +} + +type DeleteCodeSigningConfigOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteCodeSigningConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteCodeSigningConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteCodeSigningConfig{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteCodeSigningConfig"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeleteCodeSigningConfigValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteCodeSigningConfig(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteCodeSigningConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteCodeSigningConfig", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteEventSourceMapping.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteEventSourceMapping.go new file mode 100644 index 00000000..a76496db --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteEventSourceMapping.go @@ -0,0 +1,328 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/lambda/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Deletes an [event source mapping]. You can get the identifier of a mapping from the output of ListEventSourceMappings. +// +// When you delete an event source mapping, it enters a Deleting state and might +// not be completely deleted for several seconds. +// +// [event source mapping]: https://docs.aws.amazon.com/lambda/latest/dg/intro-invocation-modes.html +func (c *Client) DeleteEventSourceMapping(ctx context.Context, params *DeleteEventSourceMappingInput, optFns ...func(*Options)) (*DeleteEventSourceMappingOutput, error) { + if params == nil { + params = &DeleteEventSourceMappingInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteEventSourceMapping", params, optFns, c.addOperationDeleteEventSourceMappingMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteEventSourceMappingOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteEventSourceMappingInput struct { + + // The identifier of the event source mapping. + // + // This member is required. + UUID *string + + noSmithyDocumentSerde +} + +// A mapping between an Amazon Web Services resource and a Lambda function. For +// details, see CreateEventSourceMapping. +type DeleteEventSourceMappingOutput struct { + + // Specific configuration settings for an Amazon Managed Streaming for Apache + // Kafka (Amazon MSK) event source. + AmazonManagedKafkaEventSourceConfig *types.AmazonManagedKafkaEventSourceConfig + + // The maximum number of records in each batch that Lambda pulls from your stream + // or queue and sends to your function. Lambda passes all of the records in the + // batch to the function in a single call, up to the payload limit for synchronous + // invocation (6 MB). + // + // Default value: Varies by service. For Amazon SQS, the default is 10. For all + // other services, the default is 100. + // + // Related setting: When you set BatchSize to a value greater than 10, you must + // set MaximumBatchingWindowInSeconds to at least 1. + BatchSize *int32 + + // (Kinesis and DynamoDB Streams only) If the function returns an error, split the + // batch in two and retry. The default value is false. + BisectBatchOnFunctionError *bool + + // (Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka event + // sources only) A configuration object that specifies the destination of an event + // after Lambda processes it. + DestinationConfig *types.DestinationConfig + + // Specific configuration settings for a DocumentDB event source. + DocumentDBEventSourceConfig *types.DocumentDBEventSourceConfig + + // The Amazon Resource Name (ARN) of the event source. + EventSourceArn *string + + // The Amazon Resource Name (ARN) of the event source mapping. + EventSourceMappingArn *string + + // An object that defines the filter criteria that determine whether Lambda should + // process an event. For more information, see [Lambda event filtering]. + // + // If filter criteria is encrypted, this field shows up as null in the response of + // ListEventSourceMapping API calls. You can view this field in plaintext in the + // response of GetEventSourceMapping and DeleteEventSourceMapping calls if you have + // kms:Decrypt permissions for the correct KMS key. + // + // [Lambda event filtering]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html + FilterCriteria *types.FilterCriteria + + // An object that contains details about an error related to filter criteria + // encryption. + FilterCriteriaError *types.FilterCriteriaError + + // The ARN of the Lambda function. + FunctionArn *string + + // (Kinesis, DynamoDB Streams, and Amazon SQS) A list of current response type + // enums applied to the event source mapping. + FunctionResponseTypes []types.FunctionResponseType + + // The ARN of the Key Management Service (KMS) customer managed key that Lambda + // uses to encrypt your function's [filter criteria]. + // + // [filter criteria]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html#filtering-basics + KMSKeyArn *string + + // The date that the event source mapping was last updated or that its state + // changed. + LastModified *time.Time + + // The result of the last Lambda invocation of your function. + LastProcessingResult *string + + // The maximum amount of time, in seconds, that Lambda spends gathering records + // before invoking the function. You can configure MaximumBatchingWindowInSeconds + // to any value from 0 seconds to 300 seconds in increments of seconds. + // + // For streams and Amazon SQS event sources, the default batching window is 0 + // seconds. For Amazon MSK, Self-managed Apache Kafka, Amazon MQ, and DocumentDB + // event sources, the default batching window is 500 ms. Note that because you can + // only change MaximumBatchingWindowInSeconds in increments of seconds, you cannot + // revert back to the 500 ms default batching window after you have changed it. To + // restore the default batching window, you must create a new event source mapping. + // + // Related setting: For streams and Amazon SQS event sources, when you set + // BatchSize to a value greater than 10, you must set + // MaximumBatchingWindowInSeconds to at least 1. + MaximumBatchingWindowInSeconds *int32 + + // (Kinesis and DynamoDB Streams only) Discard records older than the specified + // age. The default value is -1, which sets the maximum age to infinite. When the + // value is set to infinite, Lambda never discards old records. + // + // The minimum valid value for maximum record age is 60s. Although values less + // than 60 and greater than -1 fall within the parameter's absolute range, they are + // not allowed + MaximumRecordAgeInSeconds *int32 + + // (Kinesis and DynamoDB Streams only) Discard records after the specified number + // of retries. The default value is -1, which sets the maximum number of retries to + // infinite. When MaximumRetryAttempts is infinite, Lambda retries failed records + // until the record expires in the event source. + MaximumRetryAttempts *int32 + + // The metrics configuration for your event source. For more information, see [Event source mapping metrics]. + // + // [Event source mapping metrics]: https://docs.aws.amazon.com/lambda/latest/dg/monitoring-metrics-types.html#event-source-mapping-metrics + MetricsConfig *types.EventSourceMappingMetricsConfig + + // (Kinesis and DynamoDB Streams only) The number of batches to process + // concurrently from each shard. The default value is 1. + ParallelizationFactor *int32 + + // (Amazon MSK and self-managed Apache Kafka only) The provisioned mode + // configuration for the event source. For more information, see [provisioned mode]. + // + // [provisioned mode]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html#invocation-eventsourcemapping-provisioned-mode + ProvisionedPollerConfig *types.ProvisionedPollerConfig + + // (Amazon MQ) The name of the Amazon MQ broker destination queue to consume. + Queues []string + + // (Amazon SQS only) The scaling configuration for the event source. For more + // information, see [Configuring maximum concurrency for Amazon SQS event sources]. + // + // [Configuring maximum concurrency for Amazon SQS event sources]: https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-max-concurrency + ScalingConfig *types.ScalingConfig + + // The self-managed Apache Kafka cluster for your event source. + SelfManagedEventSource *types.SelfManagedEventSource + + // Specific configuration settings for a self-managed Apache Kafka event source. + SelfManagedKafkaEventSourceConfig *types.SelfManagedKafkaEventSourceConfig + + // An array of the authentication protocol, VPC components, or virtual host to + // secure and define your event source. + SourceAccessConfigurations []types.SourceAccessConfiguration + + // The position in a stream from which to start reading. Required for Amazon + // Kinesis and Amazon DynamoDB Stream event sources. AT_TIMESTAMP is supported + // only for Amazon Kinesis streams, Amazon DocumentDB, Amazon MSK, and self-managed + // Apache Kafka. + StartingPosition types.EventSourcePosition + + // With StartingPosition set to AT_TIMESTAMP , the time from which to start + // reading. StartingPositionTimestamp cannot be in the future. + StartingPositionTimestamp *time.Time + + // The state of the event source mapping. It can be one of the following: Creating + // , Enabling , Enabled , Disabling , Disabled , Updating , or Deleting . + State *string + + // Indicates whether a user or Lambda made the last change to the event source + // mapping. + StateTransitionReason *string + + // The name of the Kafka topic. + Topics []string + + // (Kinesis and DynamoDB Streams only) The duration in seconds of a processing + // window for DynamoDB and Kinesis Streams event sources. A value of 0 seconds + // indicates no tumbling window. + TumblingWindowInSeconds *int32 + + // The identifier of the event source mapping. + UUID *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteEventSourceMappingMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteEventSourceMapping{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteEventSourceMapping{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteEventSourceMapping"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeleteEventSourceMappingValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteEventSourceMapping(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteEventSourceMapping(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteEventSourceMapping", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteFunction.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteFunction.go new file mode 100644 index 00000000..93742ffb --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteFunction.go @@ -0,0 +1,177 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +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 Lambda function. To delete a specific function version, use the +// Qualifier parameter. Otherwise, all versions and aliases are deleted. This +// doesn't require the user to have explicit permissions for DeleteAlias. +// +// To delete Lambda event source mappings that invoke a function, use DeleteEventSourceMapping. For Amazon +// Web Services services and resources that invoke your function directly, delete +// the trigger in the service where you originally configured it. +func (c *Client) DeleteFunction(ctx context.Context, params *DeleteFunctionInput, optFns ...func(*Options)) (*DeleteFunctionOutput, error) { + if params == nil { + params = &DeleteFunctionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteFunction", params, optFns, c.addOperationDeleteFunctionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteFunctionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteFunctionInput struct { + + // The name or ARN of the Lambda function or version. + // + // Name formats + // + // - Function name – my-function (name-only), my-function:1 (with version). + // + // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function . + // + // - Partial ARN – 123456789012:function:my-function . + // + // You can append a version number or alias to any of the formats. The length + // constraint applies only to the full ARN. If you specify only the function name, + // it is limited to 64 characters in length. + // + // This member is required. + FunctionName *string + + // Specify a version to delete. You can't delete a version that an alias + // references. + Qualifier *string + + noSmithyDocumentSerde +} + +type DeleteFunctionOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteFunctionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteFunction{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteFunction{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteFunction"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeleteFunctionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteFunction(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteFunction(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteFunction", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteFunctionCodeSigningConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteFunctionCodeSigningConfig.go new file mode 100644 index 00000000..955cc74b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteFunctionCodeSigningConfig.go @@ -0,0 +1,166 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +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 the code signing configuration from the function. +func (c *Client) DeleteFunctionCodeSigningConfig(ctx context.Context, params *DeleteFunctionCodeSigningConfigInput, optFns ...func(*Options)) (*DeleteFunctionCodeSigningConfigOutput, error) { + if params == nil { + params = &DeleteFunctionCodeSigningConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteFunctionCodeSigningConfig", params, optFns, c.addOperationDeleteFunctionCodeSigningConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteFunctionCodeSigningConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteFunctionCodeSigningConfigInput struct { + + // The name or ARN of the Lambda function. + // + // Name formats + // + // - Function name - MyFunction . + // + // - Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction . + // + // - Partial ARN - 123456789012:function:MyFunction . + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. + // + // This member is required. + FunctionName *string + + noSmithyDocumentSerde +} + +type DeleteFunctionCodeSigningConfigOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteFunctionCodeSigningConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteFunctionCodeSigningConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteFunctionCodeSigningConfig{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteFunctionCodeSigningConfig"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeleteFunctionCodeSigningConfigValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteFunctionCodeSigningConfig(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteFunctionCodeSigningConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteFunctionCodeSigningConfig", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteFunctionConcurrency.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteFunctionConcurrency.go new file mode 100644 index 00000000..576bd48c --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteFunctionConcurrency.go @@ -0,0 +1,166 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +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 a concurrent execution limit from a function. +func (c *Client) DeleteFunctionConcurrency(ctx context.Context, params *DeleteFunctionConcurrencyInput, optFns ...func(*Options)) (*DeleteFunctionConcurrencyOutput, error) { + if params == nil { + params = &DeleteFunctionConcurrencyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteFunctionConcurrency", params, optFns, c.addOperationDeleteFunctionConcurrencyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteFunctionConcurrencyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteFunctionConcurrencyInput struct { + + // The name or ARN of the Lambda function. + // + // Name formats + // + // - Function name – my-function . + // + // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function . + // + // - Partial ARN – 123456789012:function:my-function . + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. + // + // This member is required. + FunctionName *string + + noSmithyDocumentSerde +} + +type DeleteFunctionConcurrencyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteFunctionConcurrencyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteFunctionConcurrency{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteFunctionConcurrency{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteFunctionConcurrency"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeleteFunctionConcurrencyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteFunctionConcurrency(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteFunctionConcurrency(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteFunctionConcurrency", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteFunctionEventInvokeConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteFunctionEventInvokeConfig.go new file mode 100644 index 00000000..77a13e57 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteFunctionEventInvokeConfig.go @@ -0,0 +1,173 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +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 configuration for asynchronous invocation for a function, version, +// or alias. +// +// To configure options for asynchronous invocation, use PutFunctionEventInvokeConfig. +func (c *Client) DeleteFunctionEventInvokeConfig(ctx context.Context, params *DeleteFunctionEventInvokeConfigInput, optFns ...func(*Options)) (*DeleteFunctionEventInvokeConfigOutput, error) { + if params == nil { + params = &DeleteFunctionEventInvokeConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteFunctionEventInvokeConfig", params, optFns, c.addOperationDeleteFunctionEventInvokeConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteFunctionEventInvokeConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteFunctionEventInvokeConfigInput struct { + + // The name or ARN of the Lambda function, version, or alias. + // + // Name formats + // + // - Function name - my-function (name-only), my-function:v1 (with alias). + // + // - Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function . + // + // - Partial ARN - 123456789012:function:my-function . + // + // You can append a version number or alias to any of the formats. The length + // constraint applies only to the full ARN. If you specify only the function name, + // it is limited to 64 characters in length. + // + // This member is required. + FunctionName *string + + // A version number or alias name. + Qualifier *string + + noSmithyDocumentSerde +} + +type DeleteFunctionEventInvokeConfigOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteFunctionEventInvokeConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteFunctionEventInvokeConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteFunctionEventInvokeConfig{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteFunctionEventInvokeConfig"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeleteFunctionEventInvokeConfigValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteFunctionEventInvokeConfig(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteFunctionEventInvokeConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteFunctionEventInvokeConfig", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteFunctionUrlConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteFunctionUrlConfig.go new file mode 100644 index 00000000..fd42b76d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteFunctionUrlConfig.go @@ -0,0 +1,170 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +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 Lambda function URL. When you delete a function URL, you can't +// recover it. Creating a new function URL results in a different URL address. +func (c *Client) DeleteFunctionUrlConfig(ctx context.Context, params *DeleteFunctionUrlConfigInput, optFns ...func(*Options)) (*DeleteFunctionUrlConfigOutput, error) { + if params == nil { + params = &DeleteFunctionUrlConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteFunctionUrlConfig", params, optFns, c.addOperationDeleteFunctionUrlConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteFunctionUrlConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteFunctionUrlConfigInput struct { + + // The name or ARN of the Lambda function. + // + // Name formats + // + // - Function name – my-function . + // + // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function . + // + // - Partial ARN – 123456789012:function:my-function . + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. + // + // This member is required. + FunctionName *string + + // The alias name. + Qualifier *string + + noSmithyDocumentSerde +} + +type DeleteFunctionUrlConfigOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteFunctionUrlConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteFunctionUrlConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteFunctionUrlConfig{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteFunctionUrlConfig"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeleteFunctionUrlConfigValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteFunctionUrlConfig(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteFunctionUrlConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteFunctionUrlConfig", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteLayerVersion.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteLayerVersion.go new file mode 100644 index 00000000..ed6afac1 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteLayerVersion.go @@ -0,0 +1,164 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +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 version of an [Lambda layer]. Deleted versions can no longer be viewed or added to +// functions. To avoid breaking functions, a copy of the version remains in Lambda +// until no functions refer to it. +// +// [Lambda layer]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html +func (c *Client) DeleteLayerVersion(ctx context.Context, params *DeleteLayerVersionInput, optFns ...func(*Options)) (*DeleteLayerVersionOutput, error) { + if params == nil { + params = &DeleteLayerVersionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteLayerVersion", params, optFns, c.addOperationDeleteLayerVersionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteLayerVersionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteLayerVersionInput struct { + + // The name or Amazon Resource Name (ARN) of the layer. + // + // This member is required. + LayerName *string + + // The version number. + // + // This member is required. + VersionNumber *int64 + + noSmithyDocumentSerde +} + +type DeleteLayerVersionOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteLayerVersionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteLayerVersion{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteLayerVersion{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteLayerVersion"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeleteLayerVersionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteLayerVersion(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteLayerVersion(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteLayerVersion", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteProvisionedConcurrencyConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteProvisionedConcurrencyConfig.go new file mode 100644 index 00000000..38f2b0e0 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_DeleteProvisionedConcurrencyConfig.go @@ -0,0 +1,171 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +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 provisioned concurrency configuration for a function. +func (c *Client) DeleteProvisionedConcurrencyConfig(ctx context.Context, params *DeleteProvisionedConcurrencyConfigInput, optFns ...func(*Options)) (*DeleteProvisionedConcurrencyConfigOutput, error) { + if params == nil { + params = &DeleteProvisionedConcurrencyConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteProvisionedConcurrencyConfig", params, optFns, c.addOperationDeleteProvisionedConcurrencyConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteProvisionedConcurrencyConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteProvisionedConcurrencyConfigInput struct { + + // The name or ARN of the Lambda function. + // + // Name formats + // + // - Function name – my-function . + // + // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function . + // + // - Partial ARN – 123456789012:function:my-function . + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. + // + // This member is required. + FunctionName *string + + // The version number or alias name. + // + // This member is required. + Qualifier *string + + noSmithyDocumentSerde +} + +type DeleteProvisionedConcurrencyConfigOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteProvisionedConcurrencyConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteProvisionedConcurrencyConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteProvisionedConcurrencyConfig{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteProvisionedConcurrencyConfig"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeleteProvisionedConcurrencyConfigValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteProvisionedConcurrencyConfig(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteProvisionedConcurrencyConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteProvisionedConcurrencyConfig", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetAccountSettings.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetAccountSettings.go new file mode 100644 index 00000000..c4678f03 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetAccountSettings.go @@ -0,0 +1,157 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/lambda/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves details about your account's [limits] and usage in an Amazon Web Services +// Region. +// +// [limits]: https://docs.aws.amazon.com/lambda/latest/dg/limits.html +func (c *Client) GetAccountSettings(ctx context.Context, params *GetAccountSettingsInput, optFns ...func(*Options)) (*GetAccountSettingsOutput, error) { + if params == nil { + params = &GetAccountSettingsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetAccountSettings", params, optFns, c.addOperationGetAccountSettingsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetAccountSettingsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetAccountSettingsInput struct { + noSmithyDocumentSerde +} + +type GetAccountSettingsOutput struct { + + // Limits that are related to concurrency and code storage. + AccountLimit *types.AccountLimit + + // The number of functions and amount of storage in use. + AccountUsage *types.AccountUsage + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetAccountSettingsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetAccountSettings{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetAccountSettings{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetAccountSettings"); 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); 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 = addTimeOffsetBuild(stack, c); 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_opGetAccountSettings(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetAccountSettings(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetAccountSettings", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetAlias.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetAlias.go new file mode 100644 index 00000000..c65d0026 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetAlias.go @@ -0,0 +1,198 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/lambda/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns details about a Lambda function [alias]. +// +// [alias]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html +func (c *Client) GetAlias(ctx context.Context, params *GetAliasInput, optFns ...func(*Options)) (*GetAliasOutput, error) { + if params == nil { + params = &GetAliasInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetAlias", params, optFns, c.addOperationGetAliasMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetAliasOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetAliasInput struct { + + // The name or ARN of the Lambda function. + // + // Name formats + // + // - Function name - MyFunction . + // + // - Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction . + // + // - Partial ARN - 123456789012:function:MyFunction . + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. + // + // This member is required. + FunctionName *string + + // The name of the alias. + // + // This member is required. + Name *string + + noSmithyDocumentSerde +} + +// Provides configuration information about a Lambda function [alias]. +// +// [alias]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html +type GetAliasOutput struct { + + // The Amazon Resource Name (ARN) of the alias. + AliasArn *string + + // A description of the alias. + Description *string + + // The function version that the alias invokes. + FunctionVersion *string + + // The name of the alias. + Name *string + + // A unique identifier that changes when you update the alias. + RevisionId *string + + // The [routing configuration] of the alias. + // + // [routing configuration]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html + RoutingConfig *types.AliasRoutingConfiguration + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetAliasMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetAlias{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetAlias{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetAlias"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetAliasValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAlias(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetAlias(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetAlias", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetCodeSigningConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetCodeSigningConfig.go new file mode 100644 index 00000000..630f2a93 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetCodeSigningConfig.go @@ -0,0 +1,162 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/lambda/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns information about the specified code signing configuration. +func (c *Client) GetCodeSigningConfig(ctx context.Context, params *GetCodeSigningConfigInput, optFns ...func(*Options)) (*GetCodeSigningConfigOutput, error) { + if params == nil { + params = &GetCodeSigningConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetCodeSigningConfig", params, optFns, c.addOperationGetCodeSigningConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetCodeSigningConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetCodeSigningConfigInput struct { + + // The The Amazon Resource Name (ARN) of the code signing configuration. + // + // This member is required. + CodeSigningConfigArn *string + + noSmithyDocumentSerde +} + +type GetCodeSigningConfigOutput struct { + + // The code signing configuration + // + // This member is required. + CodeSigningConfig *types.CodeSigningConfig + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetCodeSigningConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetCodeSigningConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetCodeSigningConfig{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetCodeSigningConfig"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetCodeSigningConfigValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCodeSigningConfig(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetCodeSigningConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetCodeSigningConfig", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetEventSourceMapping.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetEventSourceMapping.go new file mode 100644 index 00000000..8f5d7734 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetEventSourceMapping.go @@ -0,0 +1,324 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/lambda/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Returns details about an event source mapping. You can get the identifier of a +// mapping from the output of ListEventSourceMappings. +func (c *Client) GetEventSourceMapping(ctx context.Context, params *GetEventSourceMappingInput, optFns ...func(*Options)) (*GetEventSourceMappingOutput, error) { + if params == nil { + params = &GetEventSourceMappingInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetEventSourceMapping", params, optFns, c.addOperationGetEventSourceMappingMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetEventSourceMappingOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetEventSourceMappingInput struct { + + // The identifier of the event source mapping. + // + // This member is required. + UUID *string + + noSmithyDocumentSerde +} + +// A mapping between an Amazon Web Services resource and a Lambda function. For +// details, see CreateEventSourceMapping. +type GetEventSourceMappingOutput struct { + + // Specific configuration settings for an Amazon Managed Streaming for Apache + // Kafka (Amazon MSK) event source. + AmazonManagedKafkaEventSourceConfig *types.AmazonManagedKafkaEventSourceConfig + + // The maximum number of records in each batch that Lambda pulls from your stream + // or queue and sends to your function. Lambda passes all of the records in the + // batch to the function in a single call, up to the payload limit for synchronous + // invocation (6 MB). + // + // Default value: Varies by service. For Amazon SQS, the default is 10. For all + // other services, the default is 100. + // + // Related setting: When you set BatchSize to a value greater than 10, you must + // set MaximumBatchingWindowInSeconds to at least 1. + BatchSize *int32 + + // (Kinesis and DynamoDB Streams only) If the function returns an error, split the + // batch in two and retry. The default value is false. + BisectBatchOnFunctionError *bool + + // (Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka event + // sources only) A configuration object that specifies the destination of an event + // after Lambda processes it. + DestinationConfig *types.DestinationConfig + + // Specific configuration settings for a DocumentDB event source. + DocumentDBEventSourceConfig *types.DocumentDBEventSourceConfig + + // The Amazon Resource Name (ARN) of the event source. + EventSourceArn *string + + // The Amazon Resource Name (ARN) of the event source mapping. + EventSourceMappingArn *string + + // An object that defines the filter criteria that determine whether Lambda should + // process an event. For more information, see [Lambda event filtering]. + // + // If filter criteria is encrypted, this field shows up as null in the response of + // ListEventSourceMapping API calls. You can view this field in plaintext in the + // response of GetEventSourceMapping and DeleteEventSourceMapping calls if you have + // kms:Decrypt permissions for the correct KMS key. + // + // [Lambda event filtering]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html + FilterCriteria *types.FilterCriteria + + // An object that contains details about an error related to filter criteria + // encryption. + FilterCriteriaError *types.FilterCriteriaError + + // The ARN of the Lambda function. + FunctionArn *string + + // (Kinesis, DynamoDB Streams, and Amazon SQS) A list of current response type + // enums applied to the event source mapping. + FunctionResponseTypes []types.FunctionResponseType + + // The ARN of the Key Management Service (KMS) customer managed key that Lambda + // uses to encrypt your function's [filter criteria]. + // + // [filter criteria]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html#filtering-basics + KMSKeyArn *string + + // The date that the event source mapping was last updated or that its state + // changed. + LastModified *time.Time + + // The result of the last Lambda invocation of your function. + LastProcessingResult *string + + // The maximum amount of time, in seconds, that Lambda spends gathering records + // before invoking the function. You can configure MaximumBatchingWindowInSeconds + // to any value from 0 seconds to 300 seconds in increments of seconds. + // + // For streams and Amazon SQS event sources, the default batching window is 0 + // seconds. For Amazon MSK, Self-managed Apache Kafka, Amazon MQ, and DocumentDB + // event sources, the default batching window is 500 ms. Note that because you can + // only change MaximumBatchingWindowInSeconds in increments of seconds, you cannot + // revert back to the 500 ms default batching window after you have changed it. To + // restore the default batching window, you must create a new event source mapping. + // + // Related setting: For streams and Amazon SQS event sources, when you set + // BatchSize to a value greater than 10, you must set + // MaximumBatchingWindowInSeconds to at least 1. + MaximumBatchingWindowInSeconds *int32 + + // (Kinesis and DynamoDB Streams only) Discard records older than the specified + // age. The default value is -1, which sets the maximum age to infinite. When the + // value is set to infinite, Lambda never discards old records. + // + // The minimum valid value for maximum record age is 60s. Although values less + // than 60 and greater than -1 fall within the parameter's absolute range, they are + // not allowed + MaximumRecordAgeInSeconds *int32 + + // (Kinesis and DynamoDB Streams only) Discard records after the specified number + // of retries. The default value is -1, which sets the maximum number of retries to + // infinite. When MaximumRetryAttempts is infinite, Lambda retries failed records + // until the record expires in the event source. + MaximumRetryAttempts *int32 + + // The metrics configuration for your event source. For more information, see [Event source mapping metrics]. + // + // [Event source mapping metrics]: https://docs.aws.amazon.com/lambda/latest/dg/monitoring-metrics-types.html#event-source-mapping-metrics + MetricsConfig *types.EventSourceMappingMetricsConfig + + // (Kinesis and DynamoDB Streams only) The number of batches to process + // concurrently from each shard. The default value is 1. + ParallelizationFactor *int32 + + // (Amazon MSK and self-managed Apache Kafka only) The provisioned mode + // configuration for the event source. For more information, see [provisioned mode]. + // + // [provisioned mode]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html#invocation-eventsourcemapping-provisioned-mode + ProvisionedPollerConfig *types.ProvisionedPollerConfig + + // (Amazon MQ) The name of the Amazon MQ broker destination queue to consume. + Queues []string + + // (Amazon SQS only) The scaling configuration for the event source. For more + // information, see [Configuring maximum concurrency for Amazon SQS event sources]. + // + // [Configuring maximum concurrency for Amazon SQS event sources]: https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-max-concurrency + ScalingConfig *types.ScalingConfig + + // The self-managed Apache Kafka cluster for your event source. + SelfManagedEventSource *types.SelfManagedEventSource + + // Specific configuration settings for a self-managed Apache Kafka event source. + SelfManagedKafkaEventSourceConfig *types.SelfManagedKafkaEventSourceConfig + + // An array of the authentication protocol, VPC components, or virtual host to + // secure and define your event source. + SourceAccessConfigurations []types.SourceAccessConfiguration + + // The position in a stream from which to start reading. Required for Amazon + // Kinesis and Amazon DynamoDB Stream event sources. AT_TIMESTAMP is supported + // only for Amazon Kinesis streams, Amazon DocumentDB, Amazon MSK, and self-managed + // Apache Kafka. + StartingPosition types.EventSourcePosition + + // With StartingPosition set to AT_TIMESTAMP , the time from which to start + // reading. StartingPositionTimestamp cannot be in the future. + StartingPositionTimestamp *time.Time + + // The state of the event source mapping. It can be one of the following: Creating + // , Enabling , Enabled , Disabling , Disabled , Updating , or Deleting . + State *string + + // Indicates whether a user or Lambda made the last change to the event source + // mapping. + StateTransitionReason *string + + // The name of the Kafka topic. + Topics []string + + // (Kinesis and DynamoDB Streams only) The duration in seconds of a processing + // window for DynamoDB and Kinesis Streams event sources. A value of 0 seconds + // indicates no tumbling window. + TumblingWindowInSeconds *int32 + + // The identifier of the event source mapping. + UUID *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetEventSourceMappingMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetEventSourceMapping{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetEventSourceMapping{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetEventSourceMapping"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetEventSourceMappingValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetEventSourceMapping(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetEventSourceMapping(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetEventSourceMapping", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetFunction.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetFunction.go new file mode 100644 index 00000000..82a8b8cb --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetFunction.go @@ -0,0 +1,803 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +import ( + "context" + "errors" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/lambda/types" + "github.com/aws/smithy-go/middleware" + smithytime "github.com/aws/smithy-go/time" + smithyhttp "github.com/aws/smithy-go/transport/http" + smithywaiter "github.com/aws/smithy-go/waiter" + "time" +) + +// Returns information about the function or function version, with a link to +// download the deployment package that's valid for 10 minutes. If you specify a +// function version, only details that are specific to that version are returned. +func (c *Client) GetFunction(ctx context.Context, params *GetFunctionInput, optFns ...func(*Options)) (*GetFunctionOutput, error) { + if params == nil { + params = &GetFunctionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetFunction", params, optFns, c.addOperationGetFunctionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetFunctionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetFunctionInput struct { + + // The name or ARN of the Lambda function, version, or alias. + // + // Name formats + // + // - Function name – my-function (name-only), my-function:v1 (with alias). + // + // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function . + // + // - Partial ARN – 123456789012:function:my-function . + // + // You can append a version number or alias to any of the formats. The length + // constraint applies only to the full ARN. If you specify only the function name, + // it is limited to 64 characters in length. + // + // This member is required. + FunctionName *string + + // Specify a version or alias to get details about a published version of the + // function. + Qualifier *string + + noSmithyDocumentSerde +} + +type GetFunctionOutput struct { + + // The deployment package of the function or version. + Code *types.FunctionCodeLocation + + // The function's [reserved concurrency]. + // + // [reserved concurrency]: https://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html + Concurrency *types.Concurrency + + // The configuration of the function or version. + Configuration *types.FunctionConfiguration + + // The function's [tags]. Lambda returns tag data only if you have explicit allow + // permissions for [lambda:ListTags]. + // + // [lambda:ListTags]: https://docs.aws.amazon.com/lambda/latest/api/API_ListTags.html + // [tags]: https://docs.aws.amazon.com/lambda/latest/dg/tagging.html + Tags map[string]string + + // An object that contains details about an error related to retrieving tags. + TagsError *types.TagsError + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetFunctionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetFunction{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetFunction{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetFunction"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetFunctionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetFunction(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// FunctionActiveV2WaiterOptions are waiter options for FunctionActiveV2Waiter +type FunctionActiveV2WaiterOptions 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. + // + // Passing options here is functionally equivalent to passing values to this + // config's ClientOptions field that extend the inner client's APIOptions directly. + APIOptions []func(*middleware.Stack) error + + // Functional options to be passed to all operations invoked by this client. + // + // Function values that modify the inner APIOptions are applied after the waiter + // config's own APIOptions modifiers. + ClientOptions []func(*Options) + + // MinDelay is the minimum amount of time to delay between retries. If unset, + // FunctionActiveV2Waiter will use default minimum delay of 1 seconds. Note that + // MinDelay must resolve to a value lesser than or equal to the MaxDelay. + MinDelay time.Duration + + // MaxDelay is the maximum amount of time to delay between retries. If unset or + // set to zero, FunctionActiveV2Waiter will use default max delay of 120 seconds. + // Note that MaxDelay must resolve to value greater than or equal to the MinDelay. + MaxDelay time.Duration + + // LogWaitAttempts is used to enable logging for waiter retry attempts + LogWaitAttempts bool + + // Retryable is function that can be used to override the service defined + // waiter-behavior based on operation output, or returned error. This function is + // used by the waiter to decide if a state is retryable or a terminal state. + // + // By default service-modeled logic will populate this option. This option can + // thus be used to define a custom waiter state with fall-back to service-modeled + // waiter state mutators.The function returns an error in case of a failure state. + // In case of retry state, this function returns a bool value of true and nil + // error, while in case of success it returns a bool value of false and nil error. + Retryable func(context.Context, *GetFunctionInput, *GetFunctionOutput, error) (bool, error) +} + +// FunctionActiveV2Waiter defines the waiters for FunctionActiveV2 +type FunctionActiveV2Waiter struct { + client GetFunctionAPIClient + + options FunctionActiveV2WaiterOptions +} + +// NewFunctionActiveV2Waiter constructs a FunctionActiveV2Waiter. +func NewFunctionActiveV2Waiter(client GetFunctionAPIClient, optFns ...func(*FunctionActiveV2WaiterOptions)) *FunctionActiveV2Waiter { + options := FunctionActiveV2WaiterOptions{} + options.MinDelay = 1 * time.Second + options.MaxDelay = 120 * time.Second + options.Retryable = functionActiveV2StateRetryable + + for _, fn := range optFns { + fn(&options) + } + return &FunctionActiveV2Waiter{ + client: client, + options: options, + } +} + +// Wait calls the waiter function for FunctionActiveV2 waiter. The maxWaitDur is +// the maximum wait duration the waiter will wait. The maxWaitDur is required and +// must be greater than zero. +func (w *FunctionActiveV2Waiter) Wait(ctx context.Context, params *GetFunctionInput, maxWaitDur time.Duration, optFns ...func(*FunctionActiveV2WaiterOptions)) error { + _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) + return err +} + +// WaitForOutput calls the waiter function for FunctionActiveV2 waiter and returns +// the output of the successful operation. The maxWaitDur is the maximum wait +// duration the waiter will wait. The maxWaitDur is required and must be greater +// than zero. +func (w *FunctionActiveV2Waiter) WaitForOutput(ctx context.Context, params *GetFunctionInput, maxWaitDur time.Duration, optFns ...func(*FunctionActiveV2WaiterOptions)) (*GetFunctionOutput, error) { + if maxWaitDur <= 0 { + return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") + } + + options := w.options + for _, fn := range optFns { + fn(&options) + } + + if options.MaxDelay <= 0 { + options.MaxDelay = 120 * time.Second + } + + if options.MinDelay > options.MaxDelay { + return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) + } + + ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) + defer cancelFn() + + logger := smithywaiter.Logger{} + remainingTime := maxWaitDur + + var attempt int64 + for { + + attempt++ + apiOptions := options.APIOptions + start := time.Now() + + if options.LogWaitAttempts { + logger.Attempt = attempt + apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) + apiOptions = append(apiOptions, logger.AddLogger) + } + + out, err := w.client.GetFunction(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } + o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } + for _, opt := range options.ClientOptions { + opt(o) + } + }) + + retryable, err := options.Retryable(ctx, params, out, err) + if err != nil { + return nil, err + } + if !retryable { + return out, nil + } + + remainingTime -= time.Since(start) + if remainingTime < options.MinDelay || remainingTime <= 0 { + break + } + + // compute exponential backoff between waiter retries + delay, err := smithywaiter.ComputeDelay( + attempt, options.MinDelay, options.MaxDelay, remainingTime, + ) + if err != nil { + return nil, fmt.Errorf("error computing waiter delay, %w", err) + } + + remainingTime -= delay + // sleep for the delay amount before invoking a request + if err := smithytime.SleepWithContext(ctx, delay); err != nil { + return nil, fmt.Errorf("request cancelled while waiting, %w", err) + } + } + return nil, fmt.Errorf("exceeded max wait time for FunctionActiveV2 waiter") +} + +func functionActiveV2StateRetryable(ctx context.Context, input *GetFunctionInput, output *GetFunctionOutput, err error) (bool, error) { + + if err == nil { + v1 := output.Configuration + var v2 types.State + if v1 != nil { + v3 := v1.State + v2 = v3 + } + expectedValue := "Active" + var pathValue string + pathValue = string(v2) + if pathValue == expectedValue { + return false, nil + } + } + + if err == nil { + v1 := output.Configuration + var v2 types.State + if v1 != nil { + v3 := v1.State + v2 = v3 + } + expectedValue := "Failed" + var pathValue string + pathValue = string(v2) + if pathValue == expectedValue { + return false, fmt.Errorf("waiter state transitioned to Failure") + } + } + + if err == nil { + v1 := output.Configuration + var v2 types.State + if v1 != nil { + v3 := v1.State + v2 = v3 + } + expectedValue := "Pending" + var pathValue string + pathValue = string(v2) + if pathValue == expectedValue { + return true, nil + } + } + + if err != nil { + return false, err + } + return true, nil +} + +// FunctionExistsWaiterOptions are waiter options for FunctionExistsWaiter +type FunctionExistsWaiterOptions 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. + // + // Passing options here is functionally equivalent to passing values to this + // config's ClientOptions field that extend the inner client's APIOptions directly. + APIOptions []func(*middleware.Stack) error + + // Functional options to be passed to all operations invoked by this client. + // + // Function values that modify the inner APIOptions are applied after the waiter + // config's own APIOptions modifiers. + ClientOptions []func(*Options) + + // MinDelay is the minimum amount of time to delay between retries. If unset, + // FunctionExistsWaiter will use default minimum delay of 1 seconds. Note that + // MinDelay must resolve to a value lesser than or equal to the MaxDelay. + MinDelay time.Duration + + // MaxDelay is the maximum amount of time to delay between retries. If unset or + // set to zero, FunctionExistsWaiter will use default max delay of 120 seconds. + // Note that MaxDelay must resolve to value greater than or equal to the MinDelay. + MaxDelay time.Duration + + // LogWaitAttempts is used to enable logging for waiter retry attempts + LogWaitAttempts bool + + // Retryable is function that can be used to override the service defined + // waiter-behavior based on operation output, or returned error. This function is + // used by the waiter to decide if a state is retryable or a terminal state. + // + // By default service-modeled logic will populate this option. This option can + // thus be used to define a custom waiter state with fall-back to service-modeled + // waiter state mutators.The function returns an error in case of a failure state. + // In case of retry state, this function returns a bool value of true and nil + // error, while in case of success it returns a bool value of false and nil error. + Retryable func(context.Context, *GetFunctionInput, *GetFunctionOutput, error) (bool, error) +} + +// FunctionExistsWaiter defines the waiters for FunctionExists +type FunctionExistsWaiter struct { + client GetFunctionAPIClient + + options FunctionExistsWaiterOptions +} + +// NewFunctionExistsWaiter constructs a FunctionExistsWaiter. +func NewFunctionExistsWaiter(client GetFunctionAPIClient, optFns ...func(*FunctionExistsWaiterOptions)) *FunctionExistsWaiter { + options := FunctionExistsWaiterOptions{} + options.MinDelay = 1 * time.Second + options.MaxDelay = 120 * time.Second + options.Retryable = functionExistsStateRetryable + + for _, fn := range optFns { + fn(&options) + } + return &FunctionExistsWaiter{ + client: client, + options: options, + } +} + +// Wait calls the waiter function for FunctionExists waiter. The maxWaitDur is the +// maximum wait duration the waiter will wait. The maxWaitDur is required and must +// be greater than zero. +func (w *FunctionExistsWaiter) Wait(ctx context.Context, params *GetFunctionInput, maxWaitDur time.Duration, optFns ...func(*FunctionExistsWaiterOptions)) error { + _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) + return err +} + +// WaitForOutput calls the waiter function for FunctionExists waiter and returns +// the output of the successful operation. The maxWaitDur is the maximum wait +// duration the waiter will wait. The maxWaitDur is required and must be greater +// than zero. +func (w *FunctionExistsWaiter) WaitForOutput(ctx context.Context, params *GetFunctionInput, maxWaitDur time.Duration, optFns ...func(*FunctionExistsWaiterOptions)) (*GetFunctionOutput, error) { + if maxWaitDur <= 0 { + return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") + } + + options := w.options + for _, fn := range optFns { + fn(&options) + } + + if options.MaxDelay <= 0 { + options.MaxDelay = 120 * time.Second + } + + if options.MinDelay > options.MaxDelay { + return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) + } + + ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) + defer cancelFn() + + logger := smithywaiter.Logger{} + remainingTime := maxWaitDur + + var attempt int64 + for { + + attempt++ + apiOptions := options.APIOptions + start := time.Now() + + if options.LogWaitAttempts { + logger.Attempt = attempt + apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) + apiOptions = append(apiOptions, logger.AddLogger) + } + + out, err := w.client.GetFunction(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } + o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } + for _, opt := range options.ClientOptions { + opt(o) + } + }) + + retryable, err := options.Retryable(ctx, params, out, err) + if err != nil { + return nil, err + } + if !retryable { + return out, nil + } + + remainingTime -= time.Since(start) + if remainingTime < options.MinDelay || remainingTime <= 0 { + break + } + + // compute exponential backoff between waiter retries + delay, err := smithywaiter.ComputeDelay( + attempt, options.MinDelay, options.MaxDelay, remainingTime, + ) + if err != nil { + return nil, fmt.Errorf("error computing waiter delay, %w", err) + } + + remainingTime -= delay + // sleep for the delay amount before invoking a request + if err := smithytime.SleepWithContext(ctx, delay); err != nil { + return nil, fmt.Errorf("request cancelled while waiting, %w", err) + } + } + return nil, fmt.Errorf("exceeded max wait time for FunctionExists waiter") +} + +func functionExistsStateRetryable(ctx context.Context, input *GetFunctionInput, output *GetFunctionOutput, err error) (bool, error) { + + if err == nil { + return false, nil + } + + if err != nil { + var errorType *types.ResourceNotFoundException + if errors.As(err, &errorType) { + return true, nil + } + } + + if err != nil { + return false, err + } + return true, nil +} + +// FunctionUpdatedV2WaiterOptions are waiter options for FunctionUpdatedV2Waiter +type FunctionUpdatedV2WaiterOptions 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. + // + // Passing options here is functionally equivalent to passing values to this + // config's ClientOptions field that extend the inner client's APIOptions directly. + APIOptions []func(*middleware.Stack) error + + // Functional options to be passed to all operations invoked by this client. + // + // Function values that modify the inner APIOptions are applied after the waiter + // config's own APIOptions modifiers. + ClientOptions []func(*Options) + + // MinDelay is the minimum amount of time to delay between retries. If unset, + // FunctionUpdatedV2Waiter will use default minimum delay of 1 seconds. Note that + // MinDelay must resolve to a value lesser than or equal to the MaxDelay. + MinDelay time.Duration + + // MaxDelay is the maximum amount of time to delay between retries. If unset or + // set to zero, FunctionUpdatedV2Waiter will use default max delay of 120 seconds. + // Note that MaxDelay must resolve to value greater than or equal to the MinDelay. + MaxDelay time.Duration + + // LogWaitAttempts is used to enable logging for waiter retry attempts + LogWaitAttempts bool + + // Retryable is function that can be used to override the service defined + // waiter-behavior based on operation output, or returned error. This function is + // used by the waiter to decide if a state is retryable or a terminal state. + // + // By default service-modeled logic will populate this option. This option can + // thus be used to define a custom waiter state with fall-back to service-modeled + // waiter state mutators.The function returns an error in case of a failure state. + // In case of retry state, this function returns a bool value of true and nil + // error, while in case of success it returns a bool value of false and nil error. + Retryable func(context.Context, *GetFunctionInput, *GetFunctionOutput, error) (bool, error) +} + +// FunctionUpdatedV2Waiter defines the waiters for FunctionUpdatedV2 +type FunctionUpdatedV2Waiter struct { + client GetFunctionAPIClient + + options FunctionUpdatedV2WaiterOptions +} + +// NewFunctionUpdatedV2Waiter constructs a FunctionUpdatedV2Waiter. +func NewFunctionUpdatedV2Waiter(client GetFunctionAPIClient, optFns ...func(*FunctionUpdatedV2WaiterOptions)) *FunctionUpdatedV2Waiter { + options := FunctionUpdatedV2WaiterOptions{} + options.MinDelay = 1 * time.Second + options.MaxDelay = 120 * time.Second + options.Retryable = functionUpdatedV2StateRetryable + + for _, fn := range optFns { + fn(&options) + } + return &FunctionUpdatedV2Waiter{ + client: client, + options: options, + } +} + +// Wait calls the waiter function for FunctionUpdatedV2 waiter. The maxWaitDur is +// the maximum wait duration the waiter will wait. The maxWaitDur is required and +// must be greater than zero. +func (w *FunctionUpdatedV2Waiter) Wait(ctx context.Context, params *GetFunctionInput, maxWaitDur time.Duration, optFns ...func(*FunctionUpdatedV2WaiterOptions)) error { + _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) + return err +} + +// WaitForOutput calls the waiter function for FunctionUpdatedV2 waiter and +// returns the output of the successful operation. The maxWaitDur is the maximum +// wait duration the waiter will wait. The maxWaitDur is required and must be +// greater than zero. +func (w *FunctionUpdatedV2Waiter) WaitForOutput(ctx context.Context, params *GetFunctionInput, maxWaitDur time.Duration, optFns ...func(*FunctionUpdatedV2WaiterOptions)) (*GetFunctionOutput, error) { + if maxWaitDur <= 0 { + return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") + } + + options := w.options + for _, fn := range optFns { + fn(&options) + } + + if options.MaxDelay <= 0 { + options.MaxDelay = 120 * time.Second + } + + if options.MinDelay > options.MaxDelay { + return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) + } + + ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) + defer cancelFn() + + logger := smithywaiter.Logger{} + remainingTime := maxWaitDur + + var attempt int64 + for { + + attempt++ + apiOptions := options.APIOptions + start := time.Now() + + if options.LogWaitAttempts { + logger.Attempt = attempt + apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) + apiOptions = append(apiOptions, logger.AddLogger) + } + + out, err := w.client.GetFunction(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } + o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } + for _, opt := range options.ClientOptions { + opt(o) + } + }) + + retryable, err := options.Retryable(ctx, params, out, err) + if err != nil { + return nil, err + } + if !retryable { + return out, nil + } + + remainingTime -= time.Since(start) + if remainingTime < options.MinDelay || remainingTime <= 0 { + break + } + + // compute exponential backoff between waiter retries + delay, err := smithywaiter.ComputeDelay( + attempt, options.MinDelay, options.MaxDelay, remainingTime, + ) + if err != nil { + return nil, fmt.Errorf("error computing waiter delay, %w", err) + } + + remainingTime -= delay + // sleep for the delay amount before invoking a request + if err := smithytime.SleepWithContext(ctx, delay); err != nil { + return nil, fmt.Errorf("request cancelled while waiting, %w", err) + } + } + return nil, fmt.Errorf("exceeded max wait time for FunctionUpdatedV2 waiter") +} + +func functionUpdatedV2StateRetryable(ctx context.Context, input *GetFunctionInput, output *GetFunctionOutput, err error) (bool, error) { + + if err == nil { + v1 := output.Configuration + var v2 types.LastUpdateStatus + if v1 != nil { + v3 := v1.LastUpdateStatus + v2 = v3 + } + expectedValue := "Successful" + var pathValue string + pathValue = string(v2) + if pathValue == expectedValue { + return false, nil + } + } + + if err == nil { + v1 := output.Configuration + var v2 types.LastUpdateStatus + if v1 != nil { + v3 := v1.LastUpdateStatus + v2 = v3 + } + expectedValue := "Failed" + var pathValue string + pathValue = string(v2) + if pathValue == expectedValue { + return false, fmt.Errorf("waiter state transitioned to Failure") + } + } + + if err == nil { + v1 := output.Configuration + var v2 types.LastUpdateStatus + if v1 != nil { + v3 := v1.LastUpdateStatus + v2 = v3 + } + expectedValue := "InProgress" + var pathValue string + pathValue = string(v2) + if pathValue == expectedValue { + return true, nil + } + } + + if err != nil { + return false, err + } + return true, nil +} + +// GetFunctionAPIClient is a client that implements the GetFunction operation. +type GetFunctionAPIClient interface { + GetFunction(context.Context, *GetFunctionInput, ...func(*Options)) (*GetFunctionOutput, error) +} + +var _ GetFunctionAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opGetFunction(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetFunction", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetFunctionCodeSigningConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetFunctionCodeSigningConfig.go new file mode 100644 index 00000000..f9024f50 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetFunctionCodeSigningConfig.go @@ -0,0 +1,188 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +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 the code signing configuration for the specified function. +func (c *Client) GetFunctionCodeSigningConfig(ctx context.Context, params *GetFunctionCodeSigningConfigInput, optFns ...func(*Options)) (*GetFunctionCodeSigningConfigOutput, error) { + if params == nil { + params = &GetFunctionCodeSigningConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetFunctionCodeSigningConfig", params, optFns, c.addOperationGetFunctionCodeSigningConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetFunctionCodeSigningConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetFunctionCodeSigningConfigInput struct { + + // The name or ARN of the Lambda function. + // + // Name formats + // + // - Function name - MyFunction . + // + // - Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction . + // + // - Partial ARN - 123456789012:function:MyFunction . + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. + // + // This member is required. + FunctionName *string + + noSmithyDocumentSerde +} + +type GetFunctionCodeSigningConfigOutput struct { + + // The The Amazon Resource Name (ARN) of the code signing configuration. + // + // This member is required. + CodeSigningConfigArn *string + + // The name or ARN of the Lambda function. + // + // Name formats + // + // - Function name - MyFunction . + // + // - Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction . + // + // - Partial ARN - 123456789012:function:MyFunction . + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. + // + // This member is required. + FunctionName *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetFunctionCodeSigningConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetFunctionCodeSigningConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetFunctionCodeSigningConfig{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetFunctionCodeSigningConfig"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetFunctionCodeSigningConfigValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetFunctionCodeSigningConfig(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetFunctionCodeSigningConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetFunctionCodeSigningConfig", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetFunctionConcurrency.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetFunctionConcurrency.go new file mode 100644 index 00000000..307ed61d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetFunctionConcurrency.go @@ -0,0 +1,171 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +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 details about the reserved concurrency configuration for a function. To +// set a concurrency limit for a function, use PutFunctionConcurrency. +func (c *Client) GetFunctionConcurrency(ctx context.Context, params *GetFunctionConcurrencyInput, optFns ...func(*Options)) (*GetFunctionConcurrencyOutput, error) { + if params == nil { + params = &GetFunctionConcurrencyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetFunctionConcurrency", params, optFns, c.addOperationGetFunctionConcurrencyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetFunctionConcurrencyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetFunctionConcurrencyInput struct { + + // The name or ARN of the Lambda function. + // + // Name formats + // + // - Function name – my-function . + // + // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function . + // + // - Partial ARN – 123456789012:function:my-function . + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. + // + // This member is required. + FunctionName *string + + noSmithyDocumentSerde +} + +type GetFunctionConcurrencyOutput struct { + + // The number of simultaneous executions that are reserved for the function. + ReservedConcurrentExecutions *int32 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetFunctionConcurrencyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetFunctionConcurrency{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetFunctionConcurrency{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetFunctionConcurrency"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetFunctionConcurrencyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetFunctionConcurrency(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetFunctionConcurrency(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetFunctionConcurrency", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetFunctionConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetFunctionConfiguration.go new file mode 100644 index 00000000..40785e59 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetFunctionConfiguration.go @@ -0,0 +1,941 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/lambda/types" + "github.com/aws/smithy-go/middleware" + smithytime "github.com/aws/smithy-go/time" + smithyhttp "github.com/aws/smithy-go/transport/http" + smithywaiter "github.com/aws/smithy-go/waiter" + "time" +) + +// Returns the version-specific settings of a Lambda function or version. The +// output includes only options that can vary between versions of a function. To +// modify these settings, use UpdateFunctionConfiguration. +// +// To get all of a function's details, including function-level settings, use GetFunction. +func (c *Client) GetFunctionConfiguration(ctx context.Context, params *GetFunctionConfigurationInput, optFns ...func(*Options)) (*GetFunctionConfigurationOutput, error) { + if params == nil { + params = &GetFunctionConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetFunctionConfiguration", params, optFns, c.addOperationGetFunctionConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetFunctionConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetFunctionConfigurationInput struct { + + // The name or ARN of the Lambda function, version, or alias. + // + // Name formats + // + // - Function name – my-function (name-only), my-function:v1 (with alias). + // + // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function . + // + // - Partial ARN – 123456789012:function:my-function . + // + // You can append a version number or alias to any of the formats. The length + // constraint applies only to the full ARN. If you specify only the function name, + // it is limited to 64 characters in length. + // + // This member is required. + FunctionName *string + + // Specify a version or alias to get details about a published version of the + // function. + Qualifier *string + + noSmithyDocumentSerde +} + +// Details about a function's configuration. +type GetFunctionConfigurationOutput struct { + + // The instruction set architecture that the function supports. Architecture is a + // string array with one of the valid values. The default architecture value is + // x86_64 . + Architectures []types.Architecture + + // The SHA256 hash of the function's deployment package. + CodeSha256 *string + + // The size of the function's deployment package, in bytes. + CodeSize int64 + + // The function's dead letter queue. + DeadLetterConfig *types.DeadLetterConfig + + // The function's description. + Description *string + + // The function's [environment variables]. Omitted from CloudTrail logs. + // + // [environment variables]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html + Environment *types.EnvironmentResponse + + // The size of the function's /tmp directory in MB. The default value is 512, but + // can be any whole number between 512 and 10,240 MB. For more information, see [Configuring ephemeral storage (console)]. + // + // [Configuring ephemeral storage (console)]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-ephemeral-storage + EphemeralStorage *types.EphemeralStorage + + // Connection settings for an [Amazon EFS file system]. + // + // [Amazon EFS file system]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-filesystem.html + FileSystemConfigs []types.FileSystemConfig + + // The function's Amazon Resource Name (ARN). + FunctionArn *string + + // The name of the function. + FunctionName *string + + // The function that Lambda calls to begin running your function. + Handler *string + + // The function's image configuration values. + ImageConfigResponse *types.ImageConfigResponse + + // The ARN of the Key Management Service (KMS) customer managed key that's used to + // encrypt the following resources: + // + // - The function's [environment variables]. + // + // - The function's [Lambda SnapStart]snapshots. + // + // - When used with SourceKMSKeyArn , the unzipped version of the .zip deployment + // package that's used for function invocations. For more information, see [Specifying a customer managed key for Lambda]. + // + // - The optimized version of the container image that's used for function + // invocations. Note that this is not the same key that's used to protect your + // container image in the Amazon Elastic Container Registry (Amazon ECR). For more + // information, see [Function lifecycle]. + // + // If you don't provide a customer managed key, Lambda uses an [Amazon Web Services owned key] or an [Amazon Web Services managed key]. + // + // [Amazon Web Services owned key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk + // [Specifying a customer managed key for Lambda]: https://docs.aws.amazon.com/lambda/latest/dg/encrypt-zip-package.html#enable-zip-custom-encryption + // [Lambda SnapStart]: https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html + // [environment variables]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-encryption + // [Function lifecycle]: https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-lifecycle + // [Amazon Web Services managed key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk + KMSKeyArn *string + + // The date and time that the function was last updated, in [ISO-8601 format] + // (YYYY-MM-DDThh:mm:ss.sTZD). + // + // [ISO-8601 format]: https://www.w3.org/TR/NOTE-datetime + LastModified *string + + // The status of the last update that was performed on the function. This is first + // set to Successful after function creation completes. + LastUpdateStatus types.LastUpdateStatus + + // The reason for the last update that was performed on the function. + LastUpdateStatusReason *string + + // The reason code for the last update that was performed on the function. + LastUpdateStatusReasonCode types.LastUpdateStatusReasonCode + + // The function's [layers]. + // + // [layers]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html + Layers []types.Layer + + // The function's Amazon CloudWatch Logs configuration settings. + LoggingConfig *types.LoggingConfig + + // For Lambda@Edge functions, the ARN of the main function. + MasterArn *string + + // The amount of memory available to the function at runtime. + MemorySize *int32 + + // The type of deployment package. Set to Image for container image and set Zip + // for .zip file archive. + PackageType types.PackageType + + // The latest updated revision of the function or alias. + RevisionId *string + + // The function's execution role. + Role *string + + // The identifier of the function's [runtime]. Runtime is required if the deployment + // package is a .zip file archive. Specifying a runtime results in an error if + // you're deploying a function using a container image. + // + // The following list includes deprecated runtimes. Lambda blocks creating new + // functions and updating existing functions shortly after each runtime is + // deprecated. For more information, see [Runtime use after deprecation]. + // + // For a list of all currently supported runtimes, see [Supported runtimes]. + // + // [Runtime use after deprecation]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-deprecation-levels + // [runtime]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html + // [Supported runtimes]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtimes-supported + Runtime types.Runtime + + // The ARN of the runtime and any errors that occured. + RuntimeVersionConfig *types.RuntimeVersionConfig + + // The ARN of the signing job. + SigningJobArn *string + + // The ARN of the signing profile version. + SigningProfileVersionArn *string + + // Set ApplyOn to PublishedVersions to create a snapshot of the initialized + // execution environment when you publish a function version. For more information, + // see [Improving startup performance with Lambda SnapStart]. + // + // [Improving startup performance with Lambda SnapStart]: https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html + SnapStart *types.SnapStartResponse + + // The current state of the function. When the state is Inactive , you can + // reactivate the function by invoking it. + State types.State + + // The reason for the function's current state. + StateReason *string + + // The reason code for the function's current state. When the code is Creating , + // you can't invoke or modify the function. + StateReasonCode types.StateReasonCode + + // The amount of time in seconds that Lambda allows a function to run before + // stopping it. + Timeout *int32 + + // The function's X-Ray tracing configuration. + TracingConfig *types.TracingConfigResponse + + // The version of the Lambda function. + Version *string + + // The function's networking configuration. + VpcConfig *types.VpcConfigResponse + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetFunctionConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetFunctionConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetFunctionConfiguration{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetFunctionConfiguration"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetFunctionConfigurationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetFunctionConfiguration(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// FunctionActiveWaiterOptions are waiter options for FunctionActiveWaiter +type FunctionActiveWaiterOptions 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. + // + // Passing options here is functionally equivalent to passing values to this + // config's ClientOptions field that extend the inner client's APIOptions directly. + APIOptions []func(*middleware.Stack) error + + // Functional options to be passed to all operations invoked by this client. + // + // Function values that modify the inner APIOptions are applied after the waiter + // config's own APIOptions modifiers. + ClientOptions []func(*Options) + + // MinDelay is the minimum amount of time to delay between retries. If unset, + // FunctionActiveWaiter will use default minimum delay of 5 seconds. Note that + // MinDelay must resolve to a value lesser than or equal to the MaxDelay. + MinDelay time.Duration + + // MaxDelay is the maximum amount of time to delay between retries. If unset or + // set to zero, FunctionActiveWaiter will use default max delay of 120 seconds. + // Note that MaxDelay must resolve to value greater than or equal to the MinDelay. + MaxDelay time.Duration + + // LogWaitAttempts is used to enable logging for waiter retry attempts + LogWaitAttempts bool + + // Retryable is function that can be used to override the service defined + // waiter-behavior based on operation output, or returned error. This function is + // used by the waiter to decide if a state is retryable or a terminal state. + // + // By default service-modeled logic will populate this option. This option can + // thus be used to define a custom waiter state with fall-back to service-modeled + // waiter state mutators.The function returns an error in case of a failure state. + // In case of retry state, this function returns a bool value of true and nil + // error, while in case of success it returns a bool value of false and nil error. + Retryable func(context.Context, *GetFunctionConfigurationInput, *GetFunctionConfigurationOutput, error) (bool, error) +} + +// FunctionActiveWaiter defines the waiters for FunctionActive +type FunctionActiveWaiter struct { + client GetFunctionConfigurationAPIClient + + options FunctionActiveWaiterOptions +} + +// NewFunctionActiveWaiter constructs a FunctionActiveWaiter. +func NewFunctionActiveWaiter(client GetFunctionConfigurationAPIClient, optFns ...func(*FunctionActiveWaiterOptions)) *FunctionActiveWaiter { + options := FunctionActiveWaiterOptions{} + options.MinDelay = 5 * time.Second + options.MaxDelay = 120 * time.Second + options.Retryable = functionActiveStateRetryable + + for _, fn := range optFns { + fn(&options) + } + return &FunctionActiveWaiter{ + client: client, + options: options, + } +} + +// Wait calls the waiter function for FunctionActive waiter. The maxWaitDur is the +// maximum wait duration the waiter will wait. The maxWaitDur is required and must +// be greater than zero. +func (w *FunctionActiveWaiter) Wait(ctx context.Context, params *GetFunctionConfigurationInput, maxWaitDur time.Duration, optFns ...func(*FunctionActiveWaiterOptions)) error { + _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) + return err +} + +// WaitForOutput calls the waiter function for FunctionActive waiter and returns +// the output of the successful operation. The maxWaitDur is the maximum wait +// duration the waiter will wait. The maxWaitDur is required and must be greater +// than zero. +func (w *FunctionActiveWaiter) WaitForOutput(ctx context.Context, params *GetFunctionConfigurationInput, maxWaitDur time.Duration, optFns ...func(*FunctionActiveWaiterOptions)) (*GetFunctionConfigurationOutput, error) { + if maxWaitDur <= 0 { + return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") + } + + options := w.options + for _, fn := range optFns { + fn(&options) + } + + if options.MaxDelay <= 0 { + options.MaxDelay = 120 * time.Second + } + + if options.MinDelay > options.MaxDelay { + return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) + } + + ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) + defer cancelFn() + + logger := smithywaiter.Logger{} + remainingTime := maxWaitDur + + var attempt int64 + for { + + attempt++ + apiOptions := options.APIOptions + start := time.Now() + + if options.LogWaitAttempts { + logger.Attempt = attempt + apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) + apiOptions = append(apiOptions, logger.AddLogger) + } + + out, err := w.client.GetFunctionConfiguration(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } + o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } + for _, opt := range options.ClientOptions { + opt(o) + } + }) + + retryable, err := options.Retryable(ctx, params, out, err) + if err != nil { + return nil, err + } + if !retryable { + return out, nil + } + + remainingTime -= time.Since(start) + if remainingTime < options.MinDelay || remainingTime <= 0 { + break + } + + // compute exponential backoff between waiter retries + delay, err := smithywaiter.ComputeDelay( + attempt, options.MinDelay, options.MaxDelay, remainingTime, + ) + if err != nil { + return nil, fmt.Errorf("error computing waiter delay, %w", err) + } + + remainingTime -= delay + // sleep for the delay amount before invoking a request + if err := smithytime.SleepWithContext(ctx, delay); err != nil { + return nil, fmt.Errorf("request cancelled while waiting, %w", err) + } + } + return nil, fmt.Errorf("exceeded max wait time for FunctionActive waiter") +} + +func functionActiveStateRetryable(ctx context.Context, input *GetFunctionConfigurationInput, output *GetFunctionConfigurationOutput, err error) (bool, error) { + + if err == nil { + v1 := output.State + expectedValue := "Active" + var pathValue string + pathValue = string(v1) + if pathValue == expectedValue { + return false, nil + } + } + + if err == nil { + v1 := output.State + expectedValue := "Failed" + var pathValue string + pathValue = string(v1) + if pathValue == expectedValue { + return false, fmt.Errorf("waiter state transitioned to Failure") + } + } + + if err == nil { + v1 := output.State + expectedValue := "Pending" + var pathValue string + pathValue = string(v1) + if pathValue == expectedValue { + return true, nil + } + } + + if err != nil { + return false, err + } + return true, nil +} + +// FunctionUpdatedWaiterOptions are waiter options for FunctionUpdatedWaiter +type FunctionUpdatedWaiterOptions 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. + // + // Passing options here is functionally equivalent to passing values to this + // config's ClientOptions field that extend the inner client's APIOptions directly. + APIOptions []func(*middleware.Stack) error + + // Functional options to be passed to all operations invoked by this client. + // + // Function values that modify the inner APIOptions are applied after the waiter + // config's own APIOptions modifiers. + ClientOptions []func(*Options) + + // MinDelay is the minimum amount of time to delay between retries. If unset, + // FunctionUpdatedWaiter will use default minimum delay of 5 seconds. Note that + // MinDelay must resolve to a value lesser than or equal to the MaxDelay. + MinDelay time.Duration + + // MaxDelay is the maximum amount of time to delay between retries. If unset or + // set to zero, FunctionUpdatedWaiter will use default max delay of 120 seconds. + // Note that MaxDelay must resolve to value greater than or equal to the MinDelay. + MaxDelay time.Duration + + // LogWaitAttempts is used to enable logging for waiter retry attempts + LogWaitAttempts bool + + // Retryable is function that can be used to override the service defined + // waiter-behavior based on operation output, or returned error. This function is + // used by the waiter to decide if a state is retryable or a terminal state. + // + // By default service-modeled logic will populate this option. This option can + // thus be used to define a custom waiter state with fall-back to service-modeled + // waiter state mutators.The function returns an error in case of a failure state. + // In case of retry state, this function returns a bool value of true and nil + // error, while in case of success it returns a bool value of false and nil error. + Retryable func(context.Context, *GetFunctionConfigurationInput, *GetFunctionConfigurationOutput, error) (bool, error) +} + +// FunctionUpdatedWaiter defines the waiters for FunctionUpdated +type FunctionUpdatedWaiter struct { + client GetFunctionConfigurationAPIClient + + options FunctionUpdatedWaiterOptions +} + +// NewFunctionUpdatedWaiter constructs a FunctionUpdatedWaiter. +func NewFunctionUpdatedWaiter(client GetFunctionConfigurationAPIClient, optFns ...func(*FunctionUpdatedWaiterOptions)) *FunctionUpdatedWaiter { + options := FunctionUpdatedWaiterOptions{} + options.MinDelay = 5 * time.Second + options.MaxDelay = 120 * time.Second + options.Retryable = functionUpdatedStateRetryable + + for _, fn := range optFns { + fn(&options) + } + return &FunctionUpdatedWaiter{ + client: client, + options: options, + } +} + +// Wait calls the waiter function for FunctionUpdated waiter. The maxWaitDur is +// the maximum wait duration the waiter will wait. The maxWaitDur is required and +// must be greater than zero. +func (w *FunctionUpdatedWaiter) Wait(ctx context.Context, params *GetFunctionConfigurationInput, maxWaitDur time.Duration, optFns ...func(*FunctionUpdatedWaiterOptions)) error { + _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) + return err +} + +// WaitForOutput calls the waiter function for FunctionUpdated waiter and returns +// the output of the successful operation. The maxWaitDur is the maximum wait +// duration the waiter will wait. The maxWaitDur is required and must be greater +// than zero. +func (w *FunctionUpdatedWaiter) WaitForOutput(ctx context.Context, params *GetFunctionConfigurationInput, maxWaitDur time.Duration, optFns ...func(*FunctionUpdatedWaiterOptions)) (*GetFunctionConfigurationOutput, error) { + if maxWaitDur <= 0 { + return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") + } + + options := w.options + for _, fn := range optFns { + fn(&options) + } + + if options.MaxDelay <= 0 { + options.MaxDelay = 120 * time.Second + } + + if options.MinDelay > options.MaxDelay { + return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) + } + + ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) + defer cancelFn() + + logger := smithywaiter.Logger{} + remainingTime := maxWaitDur + + var attempt int64 + for { + + attempt++ + apiOptions := options.APIOptions + start := time.Now() + + if options.LogWaitAttempts { + logger.Attempt = attempt + apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) + apiOptions = append(apiOptions, logger.AddLogger) + } + + out, err := w.client.GetFunctionConfiguration(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } + o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } + for _, opt := range options.ClientOptions { + opt(o) + } + }) + + retryable, err := options.Retryable(ctx, params, out, err) + if err != nil { + return nil, err + } + if !retryable { + return out, nil + } + + remainingTime -= time.Since(start) + if remainingTime < options.MinDelay || remainingTime <= 0 { + break + } + + // compute exponential backoff between waiter retries + delay, err := smithywaiter.ComputeDelay( + attempt, options.MinDelay, options.MaxDelay, remainingTime, + ) + if err != nil { + return nil, fmt.Errorf("error computing waiter delay, %w", err) + } + + remainingTime -= delay + // sleep for the delay amount before invoking a request + if err := smithytime.SleepWithContext(ctx, delay); err != nil { + return nil, fmt.Errorf("request cancelled while waiting, %w", err) + } + } + return nil, fmt.Errorf("exceeded max wait time for FunctionUpdated waiter") +} + +func functionUpdatedStateRetryable(ctx context.Context, input *GetFunctionConfigurationInput, output *GetFunctionConfigurationOutput, err error) (bool, error) { + + if err == nil { + v1 := output.LastUpdateStatus + expectedValue := "Successful" + var pathValue string + pathValue = string(v1) + if pathValue == expectedValue { + return false, nil + } + } + + if err == nil { + v1 := output.LastUpdateStatus + expectedValue := "Failed" + var pathValue string + pathValue = string(v1) + if pathValue == expectedValue { + return false, fmt.Errorf("waiter state transitioned to Failure") + } + } + + if err == nil { + v1 := output.LastUpdateStatus + expectedValue := "InProgress" + var pathValue string + pathValue = string(v1) + if pathValue == expectedValue { + return true, nil + } + } + + if err != nil { + return false, err + } + return true, nil +} + +// PublishedVersionActiveWaiterOptions are waiter options for +// PublishedVersionActiveWaiter +type PublishedVersionActiveWaiterOptions 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. + // + // Passing options here is functionally equivalent to passing values to this + // config's ClientOptions field that extend the inner client's APIOptions directly. + APIOptions []func(*middleware.Stack) error + + // Functional options to be passed to all operations invoked by this client. + // + // Function values that modify the inner APIOptions are applied after the waiter + // config's own APIOptions modifiers. + ClientOptions []func(*Options) + + // MinDelay is the minimum amount of time to delay between retries. If unset, + // PublishedVersionActiveWaiter will use default minimum delay of 5 seconds. Note + // that MinDelay must resolve to a value lesser than or equal to the MaxDelay. + MinDelay time.Duration + + // MaxDelay is the maximum amount of time to delay between retries. If unset or + // set to zero, PublishedVersionActiveWaiter will use default max delay of 120 + // seconds. Note that MaxDelay must resolve to value greater than or equal to the + // MinDelay. + MaxDelay time.Duration + + // LogWaitAttempts is used to enable logging for waiter retry attempts + LogWaitAttempts bool + + // Retryable is function that can be used to override the service defined + // waiter-behavior based on operation output, or returned error. This function is + // used by the waiter to decide if a state is retryable or a terminal state. + // + // By default service-modeled logic will populate this option. This option can + // thus be used to define a custom waiter state with fall-back to service-modeled + // waiter state mutators.The function returns an error in case of a failure state. + // In case of retry state, this function returns a bool value of true and nil + // error, while in case of success it returns a bool value of false and nil error. + Retryable func(context.Context, *GetFunctionConfigurationInput, *GetFunctionConfigurationOutput, error) (bool, error) +} + +// PublishedVersionActiveWaiter defines the waiters for PublishedVersionActive +type PublishedVersionActiveWaiter struct { + client GetFunctionConfigurationAPIClient + + options PublishedVersionActiveWaiterOptions +} + +// NewPublishedVersionActiveWaiter constructs a PublishedVersionActiveWaiter. +func NewPublishedVersionActiveWaiter(client GetFunctionConfigurationAPIClient, optFns ...func(*PublishedVersionActiveWaiterOptions)) *PublishedVersionActiveWaiter { + options := PublishedVersionActiveWaiterOptions{} + options.MinDelay = 5 * time.Second + options.MaxDelay = 120 * time.Second + options.Retryable = publishedVersionActiveStateRetryable + + for _, fn := range optFns { + fn(&options) + } + return &PublishedVersionActiveWaiter{ + client: client, + options: options, + } +} + +// Wait calls the waiter function for PublishedVersionActive waiter. The +// maxWaitDur is the maximum wait duration the waiter will wait. The maxWaitDur is +// required and must be greater than zero. +func (w *PublishedVersionActiveWaiter) Wait(ctx context.Context, params *GetFunctionConfigurationInput, maxWaitDur time.Duration, optFns ...func(*PublishedVersionActiveWaiterOptions)) error { + _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) + return err +} + +// WaitForOutput calls the waiter function for PublishedVersionActive waiter and +// returns the output of the successful operation. The maxWaitDur is the maximum +// wait duration the waiter will wait. The maxWaitDur is required and must be +// greater than zero. +func (w *PublishedVersionActiveWaiter) WaitForOutput(ctx context.Context, params *GetFunctionConfigurationInput, maxWaitDur time.Duration, optFns ...func(*PublishedVersionActiveWaiterOptions)) (*GetFunctionConfigurationOutput, error) { + if maxWaitDur <= 0 { + return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") + } + + options := w.options + for _, fn := range optFns { + fn(&options) + } + + if options.MaxDelay <= 0 { + options.MaxDelay = 120 * time.Second + } + + if options.MinDelay > options.MaxDelay { + return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) + } + + ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) + defer cancelFn() + + logger := smithywaiter.Logger{} + remainingTime := maxWaitDur + + var attempt int64 + for { + + attempt++ + apiOptions := options.APIOptions + start := time.Now() + + if options.LogWaitAttempts { + logger.Attempt = attempt + apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) + apiOptions = append(apiOptions, logger.AddLogger) + } + + out, err := w.client.GetFunctionConfiguration(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } + o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } + for _, opt := range options.ClientOptions { + opt(o) + } + }) + + retryable, err := options.Retryable(ctx, params, out, err) + if err != nil { + return nil, err + } + if !retryable { + return out, nil + } + + remainingTime -= time.Since(start) + if remainingTime < options.MinDelay || remainingTime <= 0 { + break + } + + // compute exponential backoff between waiter retries + delay, err := smithywaiter.ComputeDelay( + attempt, options.MinDelay, options.MaxDelay, remainingTime, + ) + if err != nil { + return nil, fmt.Errorf("error computing waiter delay, %w", err) + } + + remainingTime -= delay + // sleep for the delay amount before invoking a request + if err := smithytime.SleepWithContext(ctx, delay); err != nil { + return nil, fmt.Errorf("request cancelled while waiting, %w", err) + } + } + return nil, fmt.Errorf("exceeded max wait time for PublishedVersionActive waiter") +} + +func publishedVersionActiveStateRetryable(ctx context.Context, input *GetFunctionConfigurationInput, output *GetFunctionConfigurationOutput, err error) (bool, error) { + + if err == nil { + v1 := output.State + expectedValue := "Active" + var pathValue string + pathValue = string(v1) + if pathValue == expectedValue { + return false, nil + } + } + + if err == nil { + v1 := output.State + expectedValue := "Failed" + var pathValue string + pathValue = string(v1) + if pathValue == expectedValue { + return false, fmt.Errorf("waiter state transitioned to Failure") + } + } + + if err == nil { + v1 := output.State + expectedValue := "Pending" + var pathValue string + pathValue = string(v1) + if pathValue == expectedValue { + return true, nil + } + } + + if err != nil { + return false, err + } + return true, nil +} + +// GetFunctionConfigurationAPIClient is a client that implements the +// GetFunctionConfiguration operation. +type GetFunctionConfigurationAPIClient interface { + GetFunctionConfiguration(context.Context, *GetFunctionConfigurationInput, ...func(*Options)) (*GetFunctionConfigurationOutput, error) +} + +var _ GetFunctionConfigurationAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opGetFunctionConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetFunctionConfiguration", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetFunctionEventInvokeConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetFunctionEventInvokeConfig.go new file mode 100644 index 00000000..c41d92ac --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetFunctionEventInvokeConfig.go @@ -0,0 +1,206 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/lambda/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Retrieves the configuration for asynchronous invocation for a function, +// version, or alias. +// +// To configure options for asynchronous invocation, use PutFunctionEventInvokeConfig. +func (c *Client) GetFunctionEventInvokeConfig(ctx context.Context, params *GetFunctionEventInvokeConfigInput, optFns ...func(*Options)) (*GetFunctionEventInvokeConfigOutput, error) { + if params == nil { + params = &GetFunctionEventInvokeConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetFunctionEventInvokeConfig", params, optFns, c.addOperationGetFunctionEventInvokeConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetFunctionEventInvokeConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetFunctionEventInvokeConfigInput struct { + + // The name or ARN of the Lambda function, version, or alias. + // + // Name formats + // + // - Function name - my-function (name-only), my-function:v1 (with alias). + // + // - Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function . + // + // - Partial ARN - 123456789012:function:my-function . + // + // You can append a version number or alias to any of the formats. The length + // constraint applies only to the full ARN. If you specify only the function name, + // it is limited to 64 characters in length. + // + // This member is required. + FunctionName *string + + // A version number or alias name. + Qualifier *string + + noSmithyDocumentSerde +} + +type GetFunctionEventInvokeConfigOutput struct { + + // A destination for events after they have been sent to a function for processing. + // + // Destinations + // + // - Function - The Amazon Resource Name (ARN) of a Lambda function. + // + // - Queue - The ARN of a standard SQS queue. + // + // - Bucket - The ARN of an Amazon S3 bucket. + // + // - Topic - The ARN of a standard SNS topic. + // + // - Event Bus - The ARN of an Amazon EventBridge event bus. + // + // S3 buckets are supported only for on-failure destinations. To retain records of + // successful invocations, use another destination type. + DestinationConfig *types.DestinationConfig + + // The Amazon Resource Name (ARN) of the function. + FunctionArn *string + + // The date and time that the configuration was last updated. + LastModified *time.Time + + // The maximum age of a request that Lambda sends to a function for processing. + MaximumEventAgeInSeconds *int32 + + // The maximum number of times to retry when the function returns an error. + MaximumRetryAttempts *int32 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetFunctionEventInvokeConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetFunctionEventInvokeConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetFunctionEventInvokeConfig{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetFunctionEventInvokeConfig"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetFunctionEventInvokeConfigValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetFunctionEventInvokeConfig(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetFunctionEventInvokeConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetFunctionEventInvokeConfig", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetFunctionRecursionConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetFunctionRecursionConfig.go new file mode 100644 index 00000000..c46f0aea --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetFunctionRecursionConfig.go @@ -0,0 +1,171 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/lambda/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns your function's [recursive loop detection] configuration. +// +// [recursive loop detection]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-recursion.html +func (c *Client) GetFunctionRecursionConfig(ctx context.Context, params *GetFunctionRecursionConfigInput, optFns ...func(*Options)) (*GetFunctionRecursionConfigOutput, error) { + if params == nil { + params = &GetFunctionRecursionConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetFunctionRecursionConfig", params, optFns, c.addOperationGetFunctionRecursionConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetFunctionRecursionConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetFunctionRecursionConfigInput struct { + + // + // + // This member is required. + FunctionName *string + + noSmithyDocumentSerde +} + +type GetFunctionRecursionConfigOutput struct { + + // If your function's recursive loop detection configuration is Allow , Lambda + // doesn't take any action when it detects your function being invoked as part of a + // recursive loop. + // + // If your function's recursive loop detection configuration is Terminate , Lambda + // stops your function being invoked and notifies you when it detects your function + // being invoked as part of a recursive loop. + // + // By default, Lambda sets your function's configuration to Terminate . You can + // update this configuration using the PutFunctionRecursionConfigaction. + RecursiveLoop types.RecursiveLoop + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetFunctionRecursionConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetFunctionRecursionConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetFunctionRecursionConfig{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetFunctionRecursionConfig"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetFunctionRecursionConfigValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetFunctionRecursionConfig(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetFunctionRecursionConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetFunctionRecursionConfig", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetFunctionUrlConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetFunctionUrlConfig.go new file mode 100644 index 00000000..9772ade0 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetFunctionUrlConfig.go @@ -0,0 +1,224 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/lambda/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns details about a Lambda function URL. +func (c *Client) GetFunctionUrlConfig(ctx context.Context, params *GetFunctionUrlConfigInput, optFns ...func(*Options)) (*GetFunctionUrlConfigOutput, error) { + if params == nil { + params = &GetFunctionUrlConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetFunctionUrlConfig", params, optFns, c.addOperationGetFunctionUrlConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetFunctionUrlConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetFunctionUrlConfigInput struct { + + // The name or ARN of the Lambda function. + // + // Name formats + // + // - Function name – my-function . + // + // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function . + // + // - Partial ARN – 123456789012:function:my-function . + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. + // + // This member is required. + FunctionName *string + + // The alias name. + Qualifier *string + + noSmithyDocumentSerde +} + +type GetFunctionUrlConfigOutput struct { + + // The type of authentication that your function URL uses. Set to AWS_IAM if you + // want to restrict access to authenticated users only. Set to NONE if you want to + // bypass IAM authentication to create a public endpoint. For more information, see + // [Security and auth model for Lambda function URLs]. + // + // [Security and auth model for Lambda function URLs]: https://docs.aws.amazon.com/lambda/latest/dg/urls-auth.html + // + // This member is required. + AuthType types.FunctionUrlAuthType + + // When the function URL was created, in [ISO-8601 format] (YYYY-MM-DDThh:mm:ss.sTZD). + // + // [ISO-8601 format]: https://www.w3.org/TR/NOTE-datetime + // + // This member is required. + CreationTime *string + + // The Amazon Resource Name (ARN) of your function. + // + // This member is required. + FunctionArn *string + + // The HTTP URL endpoint for your function. + // + // This member is required. + FunctionUrl *string + + // When the function URL configuration was last updated, in [ISO-8601 format] + // (YYYY-MM-DDThh:mm:ss.sTZD). + // + // [ISO-8601 format]: https://www.w3.org/TR/NOTE-datetime + // + // This member is required. + LastModifiedTime *string + + // The [cross-origin resource sharing (CORS)] settings for your function URL. + // + // [cross-origin resource sharing (CORS)]: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS + Cors *types.Cors + + // Use one of the following options: + // + // - BUFFERED – This is the default option. Lambda invokes your function using + // the Invoke API operation. Invocation results are available when the payload is + // complete. The maximum payload size is 6 MB. + // + // - RESPONSE_STREAM – Your function streams payload results as they become + // available. Lambda invokes your function using the InvokeWithResponseStream API + // operation. The maximum response payload size is 20 MB, however, you can [request a quota increase]. + // + // [request a quota increase]: https://docs.aws.amazon.com/servicequotas/latest/userguide/request-quota-increase.html + InvokeMode types.InvokeMode + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetFunctionUrlConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetFunctionUrlConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetFunctionUrlConfig{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetFunctionUrlConfig"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetFunctionUrlConfigValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetFunctionUrlConfig(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetFunctionUrlConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetFunctionUrlConfig", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetLayerVersion.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetLayerVersion.go new file mode 100644 index 00000000..7bf59fbe --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetLayerVersion.go @@ -0,0 +1,203 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/lambda/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns information about a version of an [Lambda layer], with a link to download the layer +// archive that's valid for 10 minutes. +// +// [Lambda layer]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html +func (c *Client) GetLayerVersion(ctx context.Context, params *GetLayerVersionInput, optFns ...func(*Options)) (*GetLayerVersionOutput, error) { + if params == nil { + params = &GetLayerVersionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetLayerVersion", params, optFns, c.addOperationGetLayerVersionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetLayerVersionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetLayerVersionInput struct { + + // The name or Amazon Resource Name (ARN) of the layer. + // + // This member is required. + LayerName *string + + // The version number. + // + // This member is required. + VersionNumber *int64 + + noSmithyDocumentSerde +} + +type GetLayerVersionOutput struct { + + // A list of compatible [instruction set architectures]. + // + // [instruction set architectures]: https://docs.aws.amazon.com/lambda/latest/dg/foundation-arch.html + CompatibleArchitectures []types.Architecture + + // The layer's compatible runtimes. + // + // The following list includes deprecated runtimes. For more information, see [Runtime use after deprecation]. + // + // For a list of all currently supported runtimes, see [Supported runtimes]. + // + // [Runtime use after deprecation]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-deprecation-levels + // [Supported runtimes]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtimes-supported + CompatibleRuntimes []types.Runtime + + // Details about the layer version. + Content *types.LayerVersionContentOutput + + // The date that the layer version was created, in [ISO-8601 format] (YYYY-MM-DDThh:mm:ss.sTZD). + // + // [ISO-8601 format]: https://www.w3.org/TR/NOTE-datetime + CreatedDate *string + + // The description of the version. + Description *string + + // The ARN of the layer. + LayerArn *string + + // The ARN of the layer version. + LayerVersionArn *string + + // The layer's software license. + LicenseInfo *string + + // The version number. + Version int64 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetLayerVersionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetLayerVersion{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetLayerVersion{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetLayerVersion"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetLayerVersionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetLayerVersion(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetLayerVersion(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetLayerVersion", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetLayerVersionByArn.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetLayerVersionByArn.go new file mode 100644 index 00000000..4f51e388 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetLayerVersionByArn.go @@ -0,0 +1,198 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/lambda/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns information about a version of an [Lambda layer], with a link to download the layer +// archive that's valid for 10 minutes. +// +// [Lambda layer]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html +func (c *Client) GetLayerVersionByArn(ctx context.Context, params *GetLayerVersionByArnInput, optFns ...func(*Options)) (*GetLayerVersionByArnOutput, error) { + if params == nil { + params = &GetLayerVersionByArnInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetLayerVersionByArn", params, optFns, c.addOperationGetLayerVersionByArnMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetLayerVersionByArnOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetLayerVersionByArnInput struct { + + // The ARN of the layer version. + // + // This member is required. + Arn *string + + noSmithyDocumentSerde +} + +type GetLayerVersionByArnOutput struct { + + // A list of compatible [instruction set architectures]. + // + // [instruction set architectures]: https://docs.aws.amazon.com/lambda/latest/dg/foundation-arch.html + CompatibleArchitectures []types.Architecture + + // The layer's compatible runtimes. + // + // The following list includes deprecated runtimes. For more information, see [Runtime use after deprecation]. + // + // For a list of all currently supported runtimes, see [Supported runtimes]. + // + // [Runtime use after deprecation]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-deprecation-levels + // [Supported runtimes]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtimes-supported + CompatibleRuntimes []types.Runtime + + // Details about the layer version. + Content *types.LayerVersionContentOutput + + // The date that the layer version was created, in [ISO-8601 format] (YYYY-MM-DDThh:mm:ss.sTZD). + // + // [ISO-8601 format]: https://www.w3.org/TR/NOTE-datetime + CreatedDate *string + + // The description of the version. + Description *string + + // The ARN of the layer. + LayerArn *string + + // The ARN of the layer version. + LayerVersionArn *string + + // The layer's software license. + LicenseInfo *string + + // The version number. + Version int64 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetLayerVersionByArnMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetLayerVersionByArn{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetLayerVersionByArn{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetLayerVersionByArn"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetLayerVersionByArnValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetLayerVersionByArn(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetLayerVersionByArn(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetLayerVersionByArn", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetLayerVersionPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetLayerVersionPolicy.go new file mode 100644 index 00000000..99efc27f --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetLayerVersionPolicy.go @@ -0,0 +1,169 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +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 the permission policy for a version of an [Lambda layer]. For more information, see AddLayerVersionPermission. +// +// [Lambda layer]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html +func (c *Client) GetLayerVersionPolicy(ctx context.Context, params *GetLayerVersionPolicyInput, optFns ...func(*Options)) (*GetLayerVersionPolicyOutput, error) { + if params == nil { + params = &GetLayerVersionPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetLayerVersionPolicy", params, optFns, c.addOperationGetLayerVersionPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetLayerVersionPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetLayerVersionPolicyInput struct { + + // The name or Amazon Resource Name (ARN) of the layer. + // + // This member is required. + LayerName *string + + // The version number. + // + // This member is required. + VersionNumber *int64 + + noSmithyDocumentSerde +} + +type GetLayerVersionPolicyOutput struct { + + // The policy document. + Policy *string + + // A unique identifier for the current revision of the policy. + RevisionId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetLayerVersionPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetLayerVersionPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetLayerVersionPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetLayerVersionPolicy"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetLayerVersionPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetLayerVersionPolicy(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetLayerVersionPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetLayerVersionPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetPolicy.go new file mode 100644 index 00000000..974dc9b7 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetPolicy.go @@ -0,0 +1,179 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +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 the [resource-based IAM policy] for a function, version, or alias. +// +// [resource-based IAM policy]: https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html +func (c *Client) GetPolicy(ctx context.Context, params *GetPolicyInput, optFns ...func(*Options)) (*GetPolicyOutput, error) { + if params == nil { + params = &GetPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetPolicy", params, optFns, c.addOperationGetPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetPolicyInput struct { + + // The name or ARN of the Lambda function, version, or alias. + // + // Name formats + // + // - Function name – my-function (name-only), my-function:v1 (with alias). + // + // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function . + // + // - Partial ARN – 123456789012:function:my-function . + // + // You can append a version number or alias to any of the formats. The length + // constraint applies only to the full ARN. If you specify only the function name, + // it is limited to 64 characters in length. + // + // This member is required. + FunctionName *string + + // Specify a version or alias to get the policy for that resource. + Qualifier *string + + noSmithyDocumentSerde +} + +type GetPolicyOutput struct { + + // The resource-based policy. + Policy *string + + // A unique identifier for the current revision of the policy. + RevisionId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetPolicy"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetPolicy(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetProvisionedConcurrencyConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetProvisionedConcurrencyConfig.go new file mode 100644 index 00000000..9dfc91fc --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetProvisionedConcurrencyConfig.go @@ -0,0 +1,197 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/lambda/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves the provisioned concurrency configuration for a function's alias or +// version. +func (c *Client) GetProvisionedConcurrencyConfig(ctx context.Context, params *GetProvisionedConcurrencyConfigInput, optFns ...func(*Options)) (*GetProvisionedConcurrencyConfigOutput, error) { + if params == nil { + params = &GetProvisionedConcurrencyConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetProvisionedConcurrencyConfig", params, optFns, c.addOperationGetProvisionedConcurrencyConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetProvisionedConcurrencyConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetProvisionedConcurrencyConfigInput struct { + + // The name or ARN of the Lambda function. + // + // Name formats + // + // - Function name – my-function . + // + // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function . + // + // - Partial ARN – 123456789012:function:my-function . + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. + // + // This member is required. + FunctionName *string + + // The version number or alias name. + // + // This member is required. + Qualifier *string + + noSmithyDocumentSerde +} + +type GetProvisionedConcurrencyConfigOutput struct { + + // The amount of provisioned concurrency allocated. When a weighted alias is used + // during linear and canary deployments, this value fluctuates depending on the + // amount of concurrency that is provisioned for the function versions. + AllocatedProvisionedConcurrentExecutions *int32 + + // The amount of provisioned concurrency available. + AvailableProvisionedConcurrentExecutions *int32 + + // The date and time that a user last updated the configuration, in [ISO 8601 format]. + // + // [ISO 8601 format]: https://www.iso.org/iso-8601-date-and-time-format.html + LastModified *string + + // The amount of provisioned concurrency requested. + RequestedProvisionedConcurrentExecutions *int32 + + // The status of the allocation process. + Status types.ProvisionedConcurrencyStatusEnum + + // For failed allocations, the reason that provisioned concurrency could not be + // allocated. + StatusReason *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetProvisionedConcurrencyConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetProvisionedConcurrencyConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetProvisionedConcurrencyConfig{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetProvisionedConcurrencyConfig"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetProvisionedConcurrencyConfigValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetProvisionedConcurrencyConfig(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetProvisionedConcurrencyConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetProvisionedConcurrencyConfig", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetRuntimeManagementConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetRuntimeManagementConfig.go new file mode 100644 index 00000000..dfd9862a --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_GetRuntimeManagementConfig.go @@ -0,0 +1,189 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/lambda/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves the runtime management configuration for a function's version. If the +// runtime update mode is Manual, this includes the ARN of the runtime version and +// the runtime update mode. If the runtime update mode is Auto or Function update, +// this includes the runtime update mode and null is returned for the ARN. For +// more information, see [Runtime updates]. +// +// [Runtime updates]: https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html +func (c *Client) GetRuntimeManagementConfig(ctx context.Context, params *GetRuntimeManagementConfigInput, optFns ...func(*Options)) (*GetRuntimeManagementConfigOutput, error) { + if params == nil { + params = &GetRuntimeManagementConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetRuntimeManagementConfig", params, optFns, c.addOperationGetRuntimeManagementConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetRuntimeManagementConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetRuntimeManagementConfigInput struct { + + // The name or ARN of the Lambda function. + // + // Name formats + // + // - Function name – my-function . + // + // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function . + // + // - Partial ARN – 123456789012:function:my-function . + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. + // + // This member is required. + FunctionName *string + + // Specify a version of the function. This can be $LATEST or a published version + // number. If no value is specified, the configuration for the $LATEST version is + // returned. + Qualifier *string + + noSmithyDocumentSerde +} + +type GetRuntimeManagementConfigOutput struct { + + // The Amazon Resource Name (ARN) of your function. + FunctionArn *string + + // The ARN of the runtime the function is configured to use. If the runtime update + // mode is Manual, the ARN is returned, otherwise null is returned. + RuntimeVersionArn *string + + // The current runtime update mode of the function. + UpdateRuntimeOn types.UpdateRuntimeOn + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetRuntimeManagementConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetRuntimeManagementConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetRuntimeManagementConfig{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetRuntimeManagementConfig"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetRuntimeManagementConfigValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetRuntimeManagementConfig(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetRuntimeManagementConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetRuntimeManagementConfig", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_Invoke.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_Invoke.go new file mode 100644 index 00000000..588e867f --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_Invoke.go @@ -0,0 +1,266 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/lambda/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Invokes a Lambda function. You can invoke a function synchronously (and wait +// for the response), or asynchronously. By default, Lambda invokes your function +// synchronously (i.e. the InvocationType is RequestResponse ). To invoke a +// function asynchronously, set InvocationType to Event . Lambda passes the +// ClientContext object to your function for synchronous invocations only. +// +// For [synchronous invocation], details about the function response, including errors, are included in +// the response body and headers. For either invocation type, you can find more +// information in the [execution log]and [trace]. +// +// When an error occurs, your function may be invoked multiple times. Retry +// behavior varies by error type, client, event source, and invocation type. For +// example, if you invoke a function asynchronously and it returns an error, Lambda +// executes the function up to two more times. For more information, see [Error handling and automatic retries in Lambda]. +// +// For [asynchronous invocation], Lambda adds events to a queue before sending them to your function. If +// your function does not have enough capacity to keep up with the queue, events +// may be lost. Occasionally, your function may receive the same event multiple +// times, even if no error occurs. To retain events that were not processed, +// configure your function with a [dead-letter queue]. +// +// The status code in the API response doesn't reflect function errors. Error +// codes are reserved for errors that prevent your function from executing, such as +// permissions errors, [quota]errors, or issues with your function's code and +// configuration. For example, Lambda returns TooManyRequestsException if running +// the function would cause you to exceed a concurrency limit at either the account +// level ( ConcurrentInvocationLimitExceeded ) or function level ( +// ReservedFunctionConcurrentInvocationLimitExceeded ). +// +// For functions with a long timeout, your client might disconnect during +// synchronous invocation while it waits for a response. Configure your HTTP +// client, SDK, firewall, proxy, or operating system to allow for long connections +// with timeout or keep-alive settings. +// +// This operation requires permission for the [lambda:InvokeFunction] action. For details on how to set +// up permissions for cross-account invocations, see [Granting function access to other accounts]. +// +// [execution log]: https://docs.aws.amazon.com/lambda/latest/dg/monitoring-functions.html +// [asynchronous invocation]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html +// [trace]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-x-ray.html +// [dead-letter queue]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-dlq +// [Error handling and automatic retries in Lambda]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-retries.html +// [lambda:InvokeFunction]: https://docs.aws.amazon.com/IAM/latest/UserGuide/list_awslambda.html +// [quota]: https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html +// [synchronous invocation]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-sync.html +// [Granting function access to other accounts]: https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html#permissions-resource-xaccountinvoke +func (c *Client) Invoke(ctx context.Context, params *InvokeInput, optFns ...func(*Options)) (*InvokeOutput, error) { + if params == nil { + params = &InvokeInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "Invoke", params, optFns, c.addOperationInvokeMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*InvokeOutput) + out.ResultMetadata = metadata + return out, nil +} + +type InvokeInput struct { + + // The name or ARN of the Lambda function, version, or alias. + // + // Name formats + // + // - Function name – my-function (name-only), my-function:v1 (with alias). + // + // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function . + // + // - Partial ARN – 123456789012:function:my-function . + // + // You can append a version number or alias to any of the formats. The length + // constraint applies only to the full ARN. If you specify only the function name, + // it is limited to 64 characters in length. + // + // This member is required. + FunctionName *string + + // Up to 3,583 bytes of base64-encoded data about the invoking client to pass to + // the function in the context object. Lambda passes the ClientContext object to + // your function for synchronous invocations only. + ClientContext *string + + // Choose from the following options. + // + // - RequestResponse (default) – Invoke the function synchronously. Keep the + // connection open until the function returns a response or times out. The API + // response includes the function response and additional data. + // + // - Event – Invoke the function asynchronously. Send events that fail multiple + // times to the function's dead-letter queue (if one is configured). The API + // response only includes a status code. + // + // - DryRun – Validate parameter values and verify that the user or role has + // permission to invoke the function. + InvocationType types.InvocationType + + // Set to Tail to include the execution log in the response. Applies to + // synchronously invoked functions only. + LogType types.LogType + + // The JSON that you want to provide to your Lambda function as input. + // + // You can enter the JSON directly. For example, --payload '{ "key": "value" }' . + // You can also specify a file path. For example, --payload file://payload.json . + Payload []byte + + // Specify a version or alias to invoke a published version of the function. + Qualifier *string + + noSmithyDocumentSerde +} + +type InvokeOutput struct { + + // The version of the function that executed. When you invoke a function with an + // alias, this indicates which version the alias resolved to. + ExecutedVersion *string + + // If present, indicates that an error occurred during function execution. Details + // about the error are included in the response payload. + FunctionError *string + + // The last 4 KB of the execution log, which is base64-encoded. + LogResult *string + + // The response from the function, or an error object. + Payload []byte + + // The HTTP status code is in the 200 range for a successful request. For the + // RequestResponse invocation type, this status code is 200. For the Event + // invocation type, this status code is 202. For the DryRun invocation type, the + // status code is 204. + StatusCode int32 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationInvokeMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpInvoke{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpInvoke{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "Invoke"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpInvokeValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opInvoke(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opInvoke(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "Invoke", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_InvokeAsync.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_InvokeAsync.go new file mode 100644 index 00000000..8508bbf1 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_InvokeAsync.go @@ -0,0 +1,186 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +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" + "io" +) + +// For asynchronous function invocation, use Invoke. +// +// Invokes a function asynchronously. +// +// If you do use the InvokeAsync action, note that it doesn't support the use of +// X-Ray active tracing. Trace ID is not propagated to the function, even if X-Ray +// active tracing is turned on. +// +// Deprecated: This operation has been deprecated. +func (c *Client) InvokeAsync(ctx context.Context, params *InvokeAsyncInput, optFns ...func(*Options)) (*InvokeAsyncOutput, error) { + if params == nil { + params = &InvokeAsyncInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "InvokeAsync", params, optFns, c.addOperationInvokeAsyncMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*InvokeAsyncOutput) + out.ResultMetadata = metadata + return out, nil +} + +type InvokeAsyncInput struct { + + // The name or ARN of the Lambda function. + // + // Name formats + // + // - Function name – my-function . + // + // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function . + // + // - Partial ARN – 123456789012:function:my-function . + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. + // + // This member is required. + FunctionName *string + + // The JSON that you want to provide to your Lambda function as input. + // + // This member is required. + InvokeArgs io.Reader + + noSmithyDocumentSerde +} + +// A success response ( 202 Accepted ) indicates that the request is queued for +// invocation. +type InvokeAsyncOutput struct { + + // The status code. + Status int32 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationInvokeAsyncMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpInvokeAsync{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpInvokeAsync{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "InvokeAsync"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpInvokeAsyncValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opInvokeAsync(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opInvokeAsync(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "InvokeAsync", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_InvokeWithResponseStream.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_InvokeWithResponseStream.go new file mode 100644 index 00000000..9e62a06f --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_InvokeWithResponseStream.go @@ -0,0 +1,320 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/lambda/types" + "github.com/aws/smithy-go/middleware" + smithysync "github.com/aws/smithy-go/sync" + "sync" +) + +// Configure your Lambda functions to stream response payloads back to clients. +// For more information, see [Configuring a Lambda function to stream responses]. +// +// This operation requires permission for the [lambda:InvokeFunction] action. For details on how to set +// up permissions for cross-account invocations, see [Granting function access to other accounts]. +// +// [Configuring a Lambda function to stream responses]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-response-streaming.html +// [lambda:InvokeFunction]: https://docs.aws.amazon.com/IAM/latest/UserGuide/list_awslambda.html +// [Granting function access to other accounts]: https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html#permissions-resource-xaccountinvoke +func (c *Client) InvokeWithResponseStream(ctx context.Context, params *InvokeWithResponseStreamInput, optFns ...func(*Options)) (*InvokeWithResponseStreamOutput, error) { + if params == nil { + params = &InvokeWithResponseStreamInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "InvokeWithResponseStream", params, optFns, c.addOperationInvokeWithResponseStreamMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*InvokeWithResponseStreamOutput) + out.ResultMetadata = metadata + return out, nil +} + +type InvokeWithResponseStreamInput struct { + + // The name or ARN of the Lambda function. + // + // Name formats + // + // - Function name – my-function . + // + // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function . + // + // - Partial ARN – 123456789012:function:my-function . + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. + // + // This member is required. + FunctionName *string + + // Up to 3,583 bytes of base64-encoded data about the invoking client to pass to + // the function in the context object. + ClientContext *string + + // Use one of the following options: + // + // - RequestResponse (default) – Invoke the function synchronously. Keep the + // connection open until the function returns a response or times out. The API + // operation response includes the function response and additional data. + // + // - DryRun – Validate parameter values and verify that the IAM user or role has + // permission to invoke the function. + InvocationType types.ResponseStreamingInvocationType + + // Set to Tail to include the execution log in the response. Applies to + // synchronously invoked functions only. + LogType types.LogType + + // The JSON that you want to provide to your Lambda function as input. + // + // You can enter the JSON directly. For example, --payload '{ "key": "value" }' . + // You can also specify a file path. For example, --payload file://payload.json . + Payload []byte + + // The alias name. + Qualifier *string + + noSmithyDocumentSerde +} + +type InvokeWithResponseStreamOutput struct { + + // The version of the function that executed. When you invoke a function with an + // alias, this indicates which version the alias resolved to. + ExecutedVersion *string + + // The type of data the stream is returning. + ResponseStreamContentType *string + + // For a successful request, the HTTP status code is in the 200 range. For the + // RequestResponse invocation type, this status code is 200. For the DryRun + // invocation type, this status code is 204. + StatusCode int32 + + eventStream *InvokeWithResponseStreamEventStream + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +// GetStream returns the type to interact with the event stream. +func (o *InvokeWithResponseStreamOutput) GetStream() *InvokeWithResponseStreamEventStream { + return o.eventStream +} + +func (c *Client) addOperationInvokeWithResponseStreamMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpInvokeWithResponseStream{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpInvokeWithResponseStream{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "InvokeWithResponseStream"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addEventStreamInvokeWithResponseStreamMiddleware(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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpInvokeWithResponseStreamValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opInvokeWithResponseStream(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opInvokeWithResponseStream(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "InvokeWithResponseStream", + } +} + +// InvokeWithResponseStreamEventStream provides the event stream handling for the InvokeWithResponseStream operation. +// +// For testing and mocking the event stream this type should be initialized via +// the NewInvokeWithResponseStreamEventStream constructor function. Using the functional options +// to pass in nested mock behavior. +type InvokeWithResponseStreamEventStream struct { + // InvokeWithResponseStreamResponseEventReader is the EventStream reader for the + // InvokeWithResponseStreamResponseEvent 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 InvokeWithResponseStreamResponseEventReader + + done chan struct{} + closeOnce sync.Once + err *smithysync.OnceErr +} + +// NewInvokeWithResponseStreamEventStream initializes an InvokeWithResponseStreamEventStream. +// This function should only be used for testing and mocking the InvokeWithResponseStreamEventStream +// stream within your application. +// +// The Reader member must be set before reading events from the stream. +func NewInvokeWithResponseStreamEventStream(optFns ...func(*InvokeWithResponseStreamEventStream)) *InvokeWithResponseStreamEventStream { + es := &InvokeWithResponseStreamEventStream{ + 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 *InvokeWithResponseStreamEventStream) Events() <-chan types.InvokeWithResponseStreamResponseEvent { + 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 *InvokeWithResponseStreamEventStream) Close() error { + es.closeOnce.Do(es.safeClose) + return es.Err() +} + +func (es *InvokeWithResponseStreamEventStream) 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 *InvokeWithResponseStreamEventStream) Err() error { + if err := es.err.Err(); err != nil { + return err + } + + if err := es.Reader.Err(); err != nil { + return err + } + + return nil +} + +func (es *InvokeWithResponseStreamEventStream) 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/lambda/api_op_ListAliases.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListAliases.go new file mode 100644 index 00000000..8634e1cc --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListAliases.go @@ -0,0 +1,278 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/lambda/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a list of [aliases] for a Lambda function. +// +// [aliases]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html +func (c *Client) ListAliases(ctx context.Context, params *ListAliasesInput, optFns ...func(*Options)) (*ListAliasesOutput, error) { + if params == nil { + params = &ListAliasesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListAliases", params, optFns, c.addOperationListAliasesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListAliasesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListAliasesInput struct { + + // The name or ARN of the Lambda function. + // + // Name formats + // + // - Function name - MyFunction . + // + // - Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction . + // + // - Partial ARN - 123456789012:function:MyFunction . + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. + // + // This member is required. + FunctionName *string + + // Specify a function version to only list aliases that invoke that version. + FunctionVersion *string + + // Specify the pagination token that's returned by a previous request to retrieve + // the next page of results. + Marker *string + + // Limit the number of aliases returned. + MaxItems *int32 + + noSmithyDocumentSerde +} + +type ListAliasesOutput struct { + + // A list of aliases. + Aliases []types.AliasConfiguration + + // The pagination token that's included if more results are available. + NextMarker *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListAliasesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListAliases{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListAliases{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListAliases"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpListAliasesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAliases(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// ListAliasesPaginatorOptions is the paginator options for ListAliases +type ListAliasesPaginatorOptions struct { + // Limit the number of aliases returned. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListAliasesPaginator is a paginator for ListAliases +type ListAliasesPaginator struct { + options ListAliasesPaginatorOptions + client ListAliasesAPIClient + params *ListAliasesInput + nextToken *string + firstPage bool +} + +// NewListAliasesPaginator returns a new ListAliasesPaginator +func NewListAliasesPaginator(client ListAliasesAPIClient, params *ListAliasesInput, optFns ...func(*ListAliasesPaginatorOptions)) *ListAliasesPaginator { + if params == nil { + params = &ListAliasesInput{} + } + + options := ListAliasesPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListAliasesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListAliasesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListAliases page. +func (p *ListAliasesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAliasesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxItems = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListAliases(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextMarker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// ListAliasesAPIClient is a client that implements the ListAliases operation. +type ListAliasesAPIClient interface { + ListAliases(context.Context, *ListAliasesInput, ...func(*Options)) (*ListAliasesOutput, error) +} + +var _ ListAliasesAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListAliases(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListAliases", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListCodeSigningConfigs.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListCodeSigningConfigs.go new file mode 100644 index 00000000..69457e3a --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListCodeSigningConfigs.go @@ -0,0 +1,259 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/lambda/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a list of [code signing configurations]. A request returns up to 10,000 configurations per call. You +// can use the MaxItems parameter to return fewer configurations per call. +// +// [code signing configurations]: https://docs.aws.amazon.com/lambda/latest/dg/configuring-codesigning.html +func (c *Client) ListCodeSigningConfigs(ctx context.Context, params *ListCodeSigningConfigsInput, optFns ...func(*Options)) (*ListCodeSigningConfigsOutput, error) { + if params == nil { + params = &ListCodeSigningConfigsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListCodeSigningConfigs", params, optFns, c.addOperationListCodeSigningConfigsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListCodeSigningConfigsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListCodeSigningConfigsInput struct { + + // Specify the pagination token that's returned by a previous request to retrieve + // the next page of results. + Marker *string + + // Maximum number of items to return. + MaxItems *int32 + + noSmithyDocumentSerde +} + +type ListCodeSigningConfigsOutput struct { + + // The code signing configurations + CodeSigningConfigs []types.CodeSigningConfig + + // The pagination token that's included if more results are available. + NextMarker *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListCodeSigningConfigsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListCodeSigningConfigs{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListCodeSigningConfigs{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListCodeSigningConfigs"); 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); 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 = addTimeOffsetBuild(stack, c); 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_opListCodeSigningConfigs(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// ListCodeSigningConfigsPaginatorOptions is the paginator options for +// ListCodeSigningConfigs +type ListCodeSigningConfigsPaginatorOptions struct { + // Maximum number of items 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 +} + +// ListCodeSigningConfigsPaginator is a paginator for ListCodeSigningConfigs +type ListCodeSigningConfigsPaginator struct { + options ListCodeSigningConfigsPaginatorOptions + client ListCodeSigningConfigsAPIClient + params *ListCodeSigningConfigsInput + nextToken *string + firstPage bool +} + +// NewListCodeSigningConfigsPaginator returns a new ListCodeSigningConfigsPaginator +func NewListCodeSigningConfigsPaginator(client ListCodeSigningConfigsAPIClient, params *ListCodeSigningConfigsInput, optFns ...func(*ListCodeSigningConfigsPaginatorOptions)) *ListCodeSigningConfigsPaginator { + if params == nil { + params = &ListCodeSigningConfigsInput{} + } + + options := ListCodeSigningConfigsPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListCodeSigningConfigsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListCodeSigningConfigsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListCodeSigningConfigs page. +func (p *ListCodeSigningConfigsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListCodeSigningConfigsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxItems = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListCodeSigningConfigs(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextMarker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// ListCodeSigningConfigsAPIClient is a client that implements the +// ListCodeSigningConfigs operation. +type ListCodeSigningConfigsAPIClient interface { + ListCodeSigningConfigs(context.Context, *ListCodeSigningConfigsInput, ...func(*Options)) (*ListCodeSigningConfigsOutput, error) +} + +var _ ListCodeSigningConfigsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListCodeSigningConfigs(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListCodeSigningConfigs", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListEventSourceMappings.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListEventSourceMappings.go new file mode 100644 index 00000000..60fe6b30 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListEventSourceMappings.go @@ -0,0 +1,297 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/lambda/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists event source mappings. Specify an EventSourceArn to show only event +// source mappings for a single event source. +func (c *Client) ListEventSourceMappings(ctx context.Context, params *ListEventSourceMappingsInput, optFns ...func(*Options)) (*ListEventSourceMappingsOutput, error) { + if params == nil { + params = &ListEventSourceMappingsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListEventSourceMappings", params, optFns, c.addOperationListEventSourceMappingsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListEventSourceMappingsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListEventSourceMappingsInput struct { + + // The Amazon Resource Name (ARN) of the event source. + // + // - Amazon Kinesis – The ARN of the data stream or a stream consumer. + // + // - Amazon DynamoDB Streams – The ARN of the stream. + // + // - Amazon Simple Queue Service – The ARN of the queue. + // + // - Amazon Managed Streaming for Apache Kafka – The ARN of the cluster or the + // ARN of the VPC connection (for [cross-account event source mappings]). + // + // - Amazon MQ – The ARN of the broker. + // + // - Amazon DocumentDB – The ARN of the DocumentDB change stream. + // + // [cross-account event source mappings]: https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#msk-multi-vpc + EventSourceArn *string + + // The name or ARN of the Lambda function. + // + // Name formats + // + // - Function name – MyFunction . + // + // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:MyFunction . + // + // - Version or Alias ARN – + // arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD . + // + // - Partial ARN – 123456789012:function:MyFunction . + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it's limited to 64 characters in length. + FunctionName *string + + // A pagination token returned by a previous call. + Marker *string + + // The maximum number of event source mappings to return. Note that + // ListEventSourceMappings returns a maximum of 100 items in each response, even if + // you set the number higher. + MaxItems *int32 + + noSmithyDocumentSerde +} + +type ListEventSourceMappingsOutput struct { + + // A list of event source mappings. + EventSourceMappings []types.EventSourceMappingConfiguration + + // A pagination token that's returned when the response doesn't contain all event + // source mappings. + NextMarker *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListEventSourceMappingsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListEventSourceMappings{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListEventSourceMappings{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListEventSourceMappings"); 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); 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 = addTimeOffsetBuild(stack, c); 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_opListEventSourceMappings(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// ListEventSourceMappingsPaginatorOptions is the paginator options for +// ListEventSourceMappings +type ListEventSourceMappingsPaginatorOptions struct { + // The maximum number of event source mappings to return. Note that + // ListEventSourceMappings returns a maximum of 100 items in each response, even if + // you set the number higher. + 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 +} + +// ListEventSourceMappingsPaginator is a paginator for ListEventSourceMappings +type ListEventSourceMappingsPaginator struct { + options ListEventSourceMappingsPaginatorOptions + client ListEventSourceMappingsAPIClient + params *ListEventSourceMappingsInput + nextToken *string + firstPage bool +} + +// NewListEventSourceMappingsPaginator returns a new +// ListEventSourceMappingsPaginator +func NewListEventSourceMappingsPaginator(client ListEventSourceMappingsAPIClient, params *ListEventSourceMappingsInput, optFns ...func(*ListEventSourceMappingsPaginatorOptions)) *ListEventSourceMappingsPaginator { + if params == nil { + params = &ListEventSourceMappingsInput{} + } + + options := ListEventSourceMappingsPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListEventSourceMappingsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListEventSourceMappingsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListEventSourceMappings page. +func (p *ListEventSourceMappingsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListEventSourceMappingsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxItems = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListEventSourceMappings(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextMarker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// ListEventSourceMappingsAPIClient is a client that implements the +// ListEventSourceMappings operation. +type ListEventSourceMappingsAPIClient interface { + ListEventSourceMappings(context.Context, *ListEventSourceMappingsInput, ...func(*Options)) (*ListEventSourceMappingsOutput, error) +} + +var _ ListEventSourceMappingsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListEventSourceMappings(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListEventSourceMappings", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListFunctionEventInvokeConfigs.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListFunctionEventInvokeConfigs.go new file mode 100644 index 00000000..edc12f5b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListFunctionEventInvokeConfigs.go @@ -0,0 +1,279 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/lambda/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves a list of configurations for asynchronous invocation for a function. +// +// To configure options for asynchronous invocation, use PutFunctionEventInvokeConfig. +func (c *Client) ListFunctionEventInvokeConfigs(ctx context.Context, params *ListFunctionEventInvokeConfigsInput, optFns ...func(*Options)) (*ListFunctionEventInvokeConfigsOutput, error) { + if params == nil { + params = &ListFunctionEventInvokeConfigsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListFunctionEventInvokeConfigs", params, optFns, c.addOperationListFunctionEventInvokeConfigsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListFunctionEventInvokeConfigsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListFunctionEventInvokeConfigsInput struct { + + // The name or ARN of the Lambda function. + // + // Name formats + // + // - Function name - my-function . + // + // - Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function . + // + // - Partial ARN - 123456789012:function:my-function . + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. + // + // This member is required. + FunctionName *string + + // Specify the pagination token that's returned by a previous request to retrieve + // the next page of results. + Marker *string + + // The maximum number of configurations to return. + MaxItems *int32 + + noSmithyDocumentSerde +} + +type ListFunctionEventInvokeConfigsOutput struct { + + // A list of configurations. + FunctionEventInvokeConfigs []types.FunctionEventInvokeConfig + + // The pagination token that's included if more results are available. + NextMarker *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListFunctionEventInvokeConfigsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListFunctionEventInvokeConfigs{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListFunctionEventInvokeConfigs{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListFunctionEventInvokeConfigs"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpListFunctionEventInvokeConfigsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListFunctionEventInvokeConfigs(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// ListFunctionEventInvokeConfigsPaginatorOptions is the paginator options for +// ListFunctionEventInvokeConfigs +type ListFunctionEventInvokeConfigsPaginatorOptions struct { + // The maximum number of configurations 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 +} + +// ListFunctionEventInvokeConfigsPaginator is a paginator for +// ListFunctionEventInvokeConfigs +type ListFunctionEventInvokeConfigsPaginator struct { + options ListFunctionEventInvokeConfigsPaginatorOptions + client ListFunctionEventInvokeConfigsAPIClient + params *ListFunctionEventInvokeConfigsInput + nextToken *string + firstPage bool +} + +// NewListFunctionEventInvokeConfigsPaginator returns a new +// ListFunctionEventInvokeConfigsPaginator +func NewListFunctionEventInvokeConfigsPaginator(client ListFunctionEventInvokeConfigsAPIClient, params *ListFunctionEventInvokeConfigsInput, optFns ...func(*ListFunctionEventInvokeConfigsPaginatorOptions)) *ListFunctionEventInvokeConfigsPaginator { + if params == nil { + params = &ListFunctionEventInvokeConfigsInput{} + } + + options := ListFunctionEventInvokeConfigsPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListFunctionEventInvokeConfigsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListFunctionEventInvokeConfigsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListFunctionEventInvokeConfigs page. +func (p *ListFunctionEventInvokeConfigsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListFunctionEventInvokeConfigsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxItems = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListFunctionEventInvokeConfigs(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextMarker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// ListFunctionEventInvokeConfigsAPIClient is a client that implements the +// ListFunctionEventInvokeConfigs operation. +type ListFunctionEventInvokeConfigsAPIClient interface { + ListFunctionEventInvokeConfigs(context.Context, *ListFunctionEventInvokeConfigsInput, ...func(*Options)) (*ListFunctionEventInvokeConfigsOutput, error) +} + +var _ ListFunctionEventInvokeConfigsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListFunctionEventInvokeConfigs(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListFunctionEventInvokeConfigs", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListFunctionUrlConfigs.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListFunctionUrlConfigs.go new file mode 100644 index 00000000..e96814a5 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListFunctionUrlConfigs.go @@ -0,0 +1,281 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/lambda/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a list of Lambda function URLs for the specified function. +func (c *Client) ListFunctionUrlConfigs(ctx context.Context, params *ListFunctionUrlConfigsInput, optFns ...func(*Options)) (*ListFunctionUrlConfigsOutput, error) { + if params == nil { + params = &ListFunctionUrlConfigsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListFunctionUrlConfigs", params, optFns, c.addOperationListFunctionUrlConfigsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListFunctionUrlConfigsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListFunctionUrlConfigsInput struct { + + // The name or ARN of the Lambda function. + // + // Name formats + // + // - Function name – my-function . + // + // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function . + // + // - Partial ARN – 123456789012:function:my-function . + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. + // + // This member is required. + FunctionName *string + + // Specify the pagination token that's returned by a previous request to retrieve + // the next page of results. + Marker *string + + // The maximum number of function URLs to return in the response. Note that + // ListFunctionUrlConfigs returns a maximum of 50 items in each response, even if + // you set the number higher. + MaxItems *int32 + + noSmithyDocumentSerde +} + +type ListFunctionUrlConfigsOutput struct { + + // A list of function URL configurations. + // + // This member is required. + FunctionUrlConfigs []types.FunctionUrlConfig + + // The pagination token that's included if more results are available. + NextMarker *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListFunctionUrlConfigsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListFunctionUrlConfigs{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListFunctionUrlConfigs{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListFunctionUrlConfigs"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpListFunctionUrlConfigsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListFunctionUrlConfigs(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// ListFunctionUrlConfigsPaginatorOptions is the paginator options for +// ListFunctionUrlConfigs +type ListFunctionUrlConfigsPaginatorOptions struct { + // The maximum number of function URLs to return in the response. Note that + // ListFunctionUrlConfigs returns a maximum of 50 items in each response, even if + // you set the number higher. + 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 +} + +// ListFunctionUrlConfigsPaginator is a paginator for ListFunctionUrlConfigs +type ListFunctionUrlConfigsPaginator struct { + options ListFunctionUrlConfigsPaginatorOptions + client ListFunctionUrlConfigsAPIClient + params *ListFunctionUrlConfigsInput + nextToken *string + firstPage bool +} + +// NewListFunctionUrlConfigsPaginator returns a new ListFunctionUrlConfigsPaginator +func NewListFunctionUrlConfigsPaginator(client ListFunctionUrlConfigsAPIClient, params *ListFunctionUrlConfigsInput, optFns ...func(*ListFunctionUrlConfigsPaginatorOptions)) *ListFunctionUrlConfigsPaginator { + if params == nil { + params = &ListFunctionUrlConfigsInput{} + } + + options := ListFunctionUrlConfigsPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListFunctionUrlConfigsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListFunctionUrlConfigsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListFunctionUrlConfigs page. +func (p *ListFunctionUrlConfigsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListFunctionUrlConfigsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxItems = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListFunctionUrlConfigs(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextMarker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// ListFunctionUrlConfigsAPIClient is a client that implements the +// ListFunctionUrlConfigs operation. +type ListFunctionUrlConfigsAPIClient interface { + ListFunctionUrlConfigs(context.Context, *ListFunctionUrlConfigsInput, ...func(*Options)) (*ListFunctionUrlConfigsOutput, error) +} + +var _ ListFunctionUrlConfigsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListFunctionUrlConfigs(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListFunctionUrlConfigs", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListFunctions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListFunctions.go new file mode 100644 index 00000000..db0042b9 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListFunctions.go @@ -0,0 +1,277 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/lambda/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a list of Lambda functions, with the version-specific configuration of +// each. Lambda returns up to 50 functions per call. +// +// Set FunctionVersion to ALL to include all published versions of each function +// in addition to the unpublished version. +// +// The ListFunctions operation returns a subset of the FunctionConfiguration fields. To get the +// additional fields (State, StateReasonCode, StateReason, LastUpdateStatus, +// LastUpdateStatusReason, LastUpdateStatusReasonCode, RuntimeVersionConfig) for a +// function or version, use GetFunction. +func (c *Client) ListFunctions(ctx context.Context, params *ListFunctionsInput, optFns ...func(*Options)) (*ListFunctionsOutput, error) { + if params == nil { + params = &ListFunctionsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListFunctions", params, optFns, c.addOperationListFunctionsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListFunctionsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListFunctionsInput struct { + + // Set to ALL to include entries for all published versions of each function. + FunctionVersion types.FunctionVersion + + // Specify the pagination token that's returned by a previous request to retrieve + // the next page of results. + Marker *string + + // For Lambda@Edge functions, the Amazon Web Services Region of the master + // function. For example, us-east-1 filters the list of functions to include only + // Lambda@Edge functions replicated from a master function in US East (N. + // Virginia). If specified, you must set FunctionVersion to ALL . + MasterRegion *string + + // The maximum number of functions to return in the response. Note that + // ListFunctions returns a maximum of 50 items in each response, even if you set + // the number higher. + MaxItems *int32 + + noSmithyDocumentSerde +} + +// A list of Lambda functions. +type ListFunctionsOutput struct { + + // A list of Lambda functions. + Functions []types.FunctionConfiguration + + // The pagination token that's included if more results are available. + NextMarker *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListFunctionsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListFunctions{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListFunctions{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListFunctions"); 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); 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 = addTimeOffsetBuild(stack, c); 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_opListFunctions(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// ListFunctionsPaginatorOptions is the paginator options for ListFunctions +type ListFunctionsPaginatorOptions struct { + // The maximum number of functions to return in the response. Note that + // ListFunctions returns a maximum of 50 items in each response, even if you set + // the number higher. + 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 +} + +// ListFunctionsPaginator is a paginator for ListFunctions +type ListFunctionsPaginator struct { + options ListFunctionsPaginatorOptions + client ListFunctionsAPIClient + params *ListFunctionsInput + nextToken *string + firstPage bool +} + +// NewListFunctionsPaginator returns a new ListFunctionsPaginator +func NewListFunctionsPaginator(client ListFunctionsAPIClient, params *ListFunctionsInput, optFns ...func(*ListFunctionsPaginatorOptions)) *ListFunctionsPaginator { + if params == nil { + params = &ListFunctionsInput{} + } + + options := ListFunctionsPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListFunctionsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListFunctionsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListFunctions page. +func (p *ListFunctionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListFunctionsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxItems = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListFunctions(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextMarker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// ListFunctionsAPIClient is a client that implements the ListFunctions operation. +type ListFunctionsAPIClient interface { + ListFunctions(context.Context, *ListFunctionsInput, ...func(*Options)) (*ListFunctionsOutput, error) +} + +var _ ListFunctionsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListFunctions(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListFunctions", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListFunctionsByCodeSigningConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListFunctionsByCodeSigningConfig.go new file mode 100644 index 00000000..c5f53f8e --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListFunctionsByCodeSigningConfig.go @@ -0,0 +1,267 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +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" +) + +// List the functions that use the specified code signing configuration. You can +// use this method prior to deleting a code signing configuration, to verify that +// no functions are using it. +func (c *Client) ListFunctionsByCodeSigningConfig(ctx context.Context, params *ListFunctionsByCodeSigningConfigInput, optFns ...func(*Options)) (*ListFunctionsByCodeSigningConfigOutput, error) { + if params == nil { + params = &ListFunctionsByCodeSigningConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListFunctionsByCodeSigningConfig", params, optFns, c.addOperationListFunctionsByCodeSigningConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListFunctionsByCodeSigningConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListFunctionsByCodeSigningConfigInput struct { + + // The The Amazon Resource Name (ARN) of the code signing configuration. + // + // This member is required. + CodeSigningConfigArn *string + + // Specify the pagination token that's returned by a previous request to retrieve + // the next page of results. + Marker *string + + // Maximum number of items to return. + MaxItems *int32 + + noSmithyDocumentSerde +} + +type ListFunctionsByCodeSigningConfigOutput struct { + + // The function ARNs. + FunctionArns []string + + // The pagination token that's included if more results are available. + NextMarker *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListFunctionsByCodeSigningConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListFunctionsByCodeSigningConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListFunctionsByCodeSigningConfig{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListFunctionsByCodeSigningConfig"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpListFunctionsByCodeSigningConfigValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListFunctionsByCodeSigningConfig(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// ListFunctionsByCodeSigningConfigPaginatorOptions is the paginator options for +// ListFunctionsByCodeSigningConfig +type ListFunctionsByCodeSigningConfigPaginatorOptions struct { + // Maximum number of items 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 +} + +// ListFunctionsByCodeSigningConfigPaginator is a paginator for +// ListFunctionsByCodeSigningConfig +type ListFunctionsByCodeSigningConfigPaginator struct { + options ListFunctionsByCodeSigningConfigPaginatorOptions + client ListFunctionsByCodeSigningConfigAPIClient + params *ListFunctionsByCodeSigningConfigInput + nextToken *string + firstPage bool +} + +// NewListFunctionsByCodeSigningConfigPaginator returns a new +// ListFunctionsByCodeSigningConfigPaginator +func NewListFunctionsByCodeSigningConfigPaginator(client ListFunctionsByCodeSigningConfigAPIClient, params *ListFunctionsByCodeSigningConfigInput, optFns ...func(*ListFunctionsByCodeSigningConfigPaginatorOptions)) *ListFunctionsByCodeSigningConfigPaginator { + if params == nil { + params = &ListFunctionsByCodeSigningConfigInput{} + } + + options := ListFunctionsByCodeSigningConfigPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListFunctionsByCodeSigningConfigPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListFunctionsByCodeSigningConfigPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListFunctionsByCodeSigningConfig page. +func (p *ListFunctionsByCodeSigningConfigPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListFunctionsByCodeSigningConfigOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxItems = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListFunctionsByCodeSigningConfig(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextMarker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// ListFunctionsByCodeSigningConfigAPIClient is a client that implements the +// ListFunctionsByCodeSigningConfig operation. +type ListFunctionsByCodeSigningConfigAPIClient interface { + ListFunctionsByCodeSigningConfig(context.Context, *ListFunctionsByCodeSigningConfigInput, ...func(*Options)) (*ListFunctionsByCodeSigningConfigOutput, error) +} + +var _ ListFunctionsByCodeSigningConfigAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListFunctionsByCodeSigningConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListFunctionsByCodeSigningConfig", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListLayerVersions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListLayerVersions.go new file mode 100644 index 00000000..93c12454 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListLayerVersions.go @@ -0,0 +1,283 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/lambda/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the versions of an [Lambda layer]. Versions that have been deleted aren't listed. +// Specify a [runtime identifier]to list only versions that indicate that they're compatible with that +// runtime. Specify a compatible architecture to include only layer versions that +// are compatible with that architecture. +// +// [Lambda layer]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html +// [runtime identifier]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html +func (c *Client) ListLayerVersions(ctx context.Context, params *ListLayerVersionsInput, optFns ...func(*Options)) (*ListLayerVersionsOutput, error) { + if params == nil { + params = &ListLayerVersionsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListLayerVersions", params, optFns, c.addOperationListLayerVersionsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListLayerVersionsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListLayerVersionsInput struct { + + // The name or Amazon Resource Name (ARN) of the layer. + // + // This member is required. + LayerName *string + + // The compatible [instruction set architecture]. + // + // [instruction set architecture]: https://docs.aws.amazon.com/lambda/latest/dg/foundation-arch.html + CompatibleArchitecture types.Architecture + + // A runtime identifier. + // + // The following list includes deprecated runtimes. For more information, see [Runtime use after deprecation]. + // + // For a list of all currently supported runtimes, see [Supported runtimes]. + // + // [Runtime use after deprecation]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-deprecation-levels + // [Supported runtimes]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtimes-supported + CompatibleRuntime types.Runtime + + // A pagination token returned by a previous call. + Marker *string + + // The maximum number of versions to return. + MaxItems *int32 + + noSmithyDocumentSerde +} + +type ListLayerVersionsOutput struct { + + // A list of versions. + LayerVersions []types.LayerVersionsListItem + + // A pagination token returned when the response doesn't contain all versions. + NextMarker *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListLayerVersionsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListLayerVersions{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListLayerVersions{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListLayerVersions"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpListLayerVersionsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListLayerVersions(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// ListLayerVersionsPaginatorOptions is the paginator options for ListLayerVersions +type ListLayerVersionsPaginatorOptions struct { + // The maximum number of versions 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 +} + +// ListLayerVersionsPaginator is a paginator for ListLayerVersions +type ListLayerVersionsPaginator struct { + options ListLayerVersionsPaginatorOptions + client ListLayerVersionsAPIClient + params *ListLayerVersionsInput + nextToken *string + firstPage bool +} + +// NewListLayerVersionsPaginator returns a new ListLayerVersionsPaginator +func NewListLayerVersionsPaginator(client ListLayerVersionsAPIClient, params *ListLayerVersionsInput, optFns ...func(*ListLayerVersionsPaginatorOptions)) *ListLayerVersionsPaginator { + if params == nil { + params = &ListLayerVersionsInput{} + } + + options := ListLayerVersionsPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListLayerVersionsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListLayerVersionsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListLayerVersions page. +func (p *ListLayerVersionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListLayerVersionsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxItems = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListLayerVersions(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextMarker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// ListLayerVersionsAPIClient is a client that implements the ListLayerVersions +// operation. +type ListLayerVersionsAPIClient interface { + ListLayerVersions(context.Context, *ListLayerVersionsInput, ...func(*Options)) (*ListLayerVersionsOutput, error) +} + +var _ ListLayerVersionsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListLayerVersions(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListLayerVersions", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListLayers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListLayers.go new file mode 100644 index 00000000..471b9fe2 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListLayers.go @@ -0,0 +1,275 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/lambda/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists [Lambda layers] and shows information about the latest version of each. Specify a [runtime identifier] to +// list only layers that indicate that they're compatible with that runtime. +// Specify a compatible architecture to include only layers that are compatible +// with that [instruction set architecture]. +// +// [instruction set architecture]: https://docs.aws.amazon.com/lambda/latest/dg/foundation-arch.html +// [runtime identifier]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html +// [Lambda layers]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-layers.html +func (c *Client) ListLayers(ctx context.Context, params *ListLayersInput, optFns ...func(*Options)) (*ListLayersOutput, error) { + if params == nil { + params = &ListLayersInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListLayers", params, optFns, c.addOperationListLayersMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListLayersOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListLayersInput struct { + + // The compatible [instruction set architecture]. + // + // [instruction set architecture]: https://docs.aws.amazon.com/lambda/latest/dg/foundation-arch.html + CompatibleArchitecture types.Architecture + + // A runtime identifier. + // + // The following list includes deprecated runtimes. For more information, see [Runtime use after deprecation]. + // + // For a list of all currently supported runtimes, see [Supported runtimes]. + // + // [Runtime use after deprecation]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-deprecation-levels + // [Supported runtimes]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtimes-supported + CompatibleRuntime types.Runtime + + // A pagination token returned by a previous call. + Marker *string + + // The maximum number of layers to return. + MaxItems *int32 + + noSmithyDocumentSerde +} + +type ListLayersOutput struct { + + // A list of function layers. + Layers []types.LayersListItem + + // A pagination token returned when the response doesn't contain all layers. + NextMarker *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListLayersMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListLayers{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListLayers{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListLayers"); 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); 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 = addTimeOffsetBuild(stack, c); 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_opListLayers(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// ListLayersPaginatorOptions is the paginator options for ListLayers +type ListLayersPaginatorOptions struct { + // The maximum number of layers 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 +} + +// ListLayersPaginator is a paginator for ListLayers +type ListLayersPaginator struct { + options ListLayersPaginatorOptions + client ListLayersAPIClient + params *ListLayersInput + nextToken *string + firstPage bool +} + +// NewListLayersPaginator returns a new ListLayersPaginator +func NewListLayersPaginator(client ListLayersAPIClient, params *ListLayersInput, optFns ...func(*ListLayersPaginatorOptions)) *ListLayersPaginator { + if params == nil { + params = &ListLayersInput{} + } + + options := ListLayersPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListLayersPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListLayersPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListLayers page. +func (p *ListLayersPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListLayersOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxItems = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListLayers(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextMarker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// ListLayersAPIClient is a client that implements the ListLayers operation. +type ListLayersAPIClient interface { + ListLayers(context.Context, *ListLayersInput, ...func(*Options)) (*ListLayersOutput, error) +} + +var _ ListLayersAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListLayers(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListLayers", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListProvisionedConcurrencyConfigs.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListProvisionedConcurrencyConfigs.go new file mode 100644 index 00000000..1e80fa1c --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListProvisionedConcurrencyConfigs.go @@ -0,0 +1,277 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/lambda/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves a list of provisioned concurrency configurations for a function. +func (c *Client) ListProvisionedConcurrencyConfigs(ctx context.Context, params *ListProvisionedConcurrencyConfigsInput, optFns ...func(*Options)) (*ListProvisionedConcurrencyConfigsOutput, error) { + if params == nil { + params = &ListProvisionedConcurrencyConfigsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListProvisionedConcurrencyConfigs", params, optFns, c.addOperationListProvisionedConcurrencyConfigsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListProvisionedConcurrencyConfigsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListProvisionedConcurrencyConfigsInput struct { + + // The name or ARN of the Lambda function. + // + // Name formats + // + // - Function name – my-function . + // + // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function . + // + // - Partial ARN – 123456789012:function:my-function . + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. + // + // This member is required. + FunctionName *string + + // Specify the pagination token that's returned by a previous request to retrieve + // the next page of results. + Marker *string + + // Specify a number to limit the number of configurations returned. + MaxItems *int32 + + noSmithyDocumentSerde +} + +type ListProvisionedConcurrencyConfigsOutput struct { + + // The pagination token that's included if more results are available. + NextMarker *string + + // A list of provisioned concurrency configurations. + ProvisionedConcurrencyConfigs []types.ProvisionedConcurrencyConfigListItem + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListProvisionedConcurrencyConfigsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListProvisionedConcurrencyConfigs{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListProvisionedConcurrencyConfigs{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListProvisionedConcurrencyConfigs"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpListProvisionedConcurrencyConfigsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListProvisionedConcurrencyConfigs(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// ListProvisionedConcurrencyConfigsPaginatorOptions is the paginator options for +// ListProvisionedConcurrencyConfigs +type ListProvisionedConcurrencyConfigsPaginatorOptions struct { + // Specify a number to limit the number of configurations returned. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListProvisionedConcurrencyConfigsPaginator is a paginator for +// ListProvisionedConcurrencyConfigs +type ListProvisionedConcurrencyConfigsPaginator struct { + options ListProvisionedConcurrencyConfigsPaginatorOptions + client ListProvisionedConcurrencyConfigsAPIClient + params *ListProvisionedConcurrencyConfigsInput + nextToken *string + firstPage bool +} + +// NewListProvisionedConcurrencyConfigsPaginator returns a new +// ListProvisionedConcurrencyConfigsPaginator +func NewListProvisionedConcurrencyConfigsPaginator(client ListProvisionedConcurrencyConfigsAPIClient, params *ListProvisionedConcurrencyConfigsInput, optFns ...func(*ListProvisionedConcurrencyConfigsPaginatorOptions)) *ListProvisionedConcurrencyConfigsPaginator { + if params == nil { + params = &ListProvisionedConcurrencyConfigsInput{} + } + + options := ListProvisionedConcurrencyConfigsPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListProvisionedConcurrencyConfigsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListProvisionedConcurrencyConfigsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListProvisionedConcurrencyConfigs page. +func (p *ListProvisionedConcurrencyConfigsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListProvisionedConcurrencyConfigsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxItems = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListProvisionedConcurrencyConfigs(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextMarker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// ListProvisionedConcurrencyConfigsAPIClient is a client that implements the +// ListProvisionedConcurrencyConfigs operation. +type ListProvisionedConcurrencyConfigsAPIClient interface { + ListProvisionedConcurrencyConfigs(context.Context, *ListProvisionedConcurrencyConfigsInput, ...func(*Options)) (*ListProvisionedConcurrencyConfigsOutput, error) +} + +var _ ListProvisionedConcurrencyConfigsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListProvisionedConcurrencyConfigs(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListProvisionedConcurrencyConfigs", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListTags.go new file mode 100644 index 00000000..aa140911 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListTags.go @@ -0,0 +1,163 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +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 function, event source mapping, or code signing configuration's [tags]. You +// can also view function tags with GetFunction. +// +// [tags]: https://docs.aws.amazon.com/lambda/latest/dg/tagging.html +func (c *Client) ListTags(ctx context.Context, params *ListTagsInput, optFns ...func(*Options)) (*ListTagsOutput, error) { + if params == nil { + params = &ListTagsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListTags", params, optFns, c.addOperationListTagsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListTagsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListTagsInput struct { + + // The resource's Amazon Resource Name (ARN). Note: Lambda does not support adding + // tags to function aliases or versions. + // + // This member is required. + Resource *string + + noSmithyDocumentSerde +} + +type ListTagsOutput struct { + + // The function's tags. + Tags map[string]string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListTagsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListTags{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListTags{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListTags"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpListTagsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTags(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListTags(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListTags", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListVersionsByFunction.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListVersionsByFunction.go new file mode 100644 index 00000000..fca5741c --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_ListVersionsByFunction.go @@ -0,0 +1,282 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/lambda/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a list of [versions], with the version-specific configuration of each. Lambda +// returns up to 50 versions per call. +// +// [versions]: https://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html +func (c *Client) ListVersionsByFunction(ctx context.Context, params *ListVersionsByFunctionInput, optFns ...func(*Options)) (*ListVersionsByFunctionOutput, error) { + if params == nil { + params = &ListVersionsByFunctionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListVersionsByFunction", params, optFns, c.addOperationListVersionsByFunctionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListVersionsByFunctionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListVersionsByFunctionInput struct { + + // The name or ARN of the Lambda function. + // + // Name formats + // + // - Function name - MyFunction . + // + // - Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction . + // + // - Partial ARN - 123456789012:function:MyFunction . + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. + // + // This member is required. + FunctionName *string + + // Specify the pagination token that's returned by a previous request to retrieve + // the next page of results. + Marker *string + + // The maximum number of versions to return. Note that ListVersionsByFunction + // returns a maximum of 50 items in each response, even if you set the number + // higher. + MaxItems *int32 + + noSmithyDocumentSerde +} + +type ListVersionsByFunctionOutput struct { + + // The pagination token that's included if more results are available. + NextMarker *string + + // A list of Lambda function versions. + Versions []types.FunctionConfiguration + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListVersionsByFunctionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListVersionsByFunction{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListVersionsByFunction{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListVersionsByFunction"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpListVersionsByFunctionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListVersionsByFunction(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// ListVersionsByFunctionPaginatorOptions is the paginator options for +// ListVersionsByFunction +type ListVersionsByFunctionPaginatorOptions struct { + // The maximum number of versions to return. Note that ListVersionsByFunction + // returns a maximum of 50 items in each response, even if you set the number + // higher. + 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 +} + +// ListVersionsByFunctionPaginator is a paginator for ListVersionsByFunction +type ListVersionsByFunctionPaginator struct { + options ListVersionsByFunctionPaginatorOptions + client ListVersionsByFunctionAPIClient + params *ListVersionsByFunctionInput + nextToken *string + firstPage bool +} + +// NewListVersionsByFunctionPaginator returns a new ListVersionsByFunctionPaginator +func NewListVersionsByFunctionPaginator(client ListVersionsByFunctionAPIClient, params *ListVersionsByFunctionInput, optFns ...func(*ListVersionsByFunctionPaginatorOptions)) *ListVersionsByFunctionPaginator { + if params == nil { + params = &ListVersionsByFunctionInput{} + } + + options := ListVersionsByFunctionPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListVersionsByFunctionPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListVersionsByFunctionPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListVersionsByFunction page. +func (p *ListVersionsByFunctionPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListVersionsByFunctionOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxItems = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListVersionsByFunction(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextMarker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// ListVersionsByFunctionAPIClient is a client that implements the +// ListVersionsByFunction operation. +type ListVersionsByFunctionAPIClient interface { + ListVersionsByFunction(context.Context, *ListVersionsByFunctionInput, ...func(*Options)) (*ListVersionsByFunctionOutput, error) +} + +var _ ListVersionsByFunctionAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListVersionsByFunction(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListVersionsByFunction", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_PublishLayerVersion.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_PublishLayerVersion.go new file mode 100644 index 00000000..223a273b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_PublishLayerVersion.go @@ -0,0 +1,233 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/lambda/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates an [Lambda layer] from a ZIP archive. Each time you call PublishLayerVersion with the +// same layer name, a new version is created. +// +// Add layers to your function with CreateFunction or UpdateFunctionConfiguration. +// +// [Lambda layer]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html +func (c *Client) PublishLayerVersion(ctx context.Context, params *PublishLayerVersionInput, optFns ...func(*Options)) (*PublishLayerVersionOutput, error) { + if params == nil { + params = &PublishLayerVersionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PublishLayerVersion", params, optFns, c.addOperationPublishLayerVersionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PublishLayerVersionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PublishLayerVersionInput struct { + + // The function layer archive. + // + // This member is required. + Content *types.LayerVersionContentInput + + // The name or Amazon Resource Name (ARN) of the layer. + // + // This member is required. + LayerName *string + + // A list of compatible [instruction set architectures]. + // + // [instruction set architectures]: https://docs.aws.amazon.com/lambda/latest/dg/foundation-arch.html + CompatibleArchitectures []types.Architecture + + // A list of compatible [function runtimes]. Used for filtering with ListLayers and ListLayerVersions. + // + // The following list includes deprecated runtimes. For more information, see [Runtime deprecation policy]. + // + // [function runtimes]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html + // [Runtime deprecation policy]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-support-policy + CompatibleRuntimes []types.Runtime + + // The description of the version. + Description *string + + // The layer's software license. It can be any of the following: + // + // - An [SPDX license identifier]. For example, MIT . + // + // - The URL of a license hosted on the internet. For example, + // https://opensource.org/licenses/MIT . + // + // - The full text of the license. + // + // [SPDX license identifier]: https://spdx.org/licenses/ + LicenseInfo *string + + noSmithyDocumentSerde +} + +type PublishLayerVersionOutput struct { + + // A list of compatible [instruction set architectures]. + // + // [instruction set architectures]: https://docs.aws.amazon.com/lambda/latest/dg/foundation-arch.html + CompatibleArchitectures []types.Architecture + + // The layer's compatible runtimes. + // + // The following list includes deprecated runtimes. For more information, see [Runtime use after deprecation]. + // + // For a list of all currently supported runtimes, see [Supported runtimes]. + // + // [Runtime use after deprecation]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-deprecation-levels + // [Supported runtimes]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtimes-supported + CompatibleRuntimes []types.Runtime + + // Details about the layer version. + Content *types.LayerVersionContentOutput + + // The date that the layer version was created, in [ISO-8601 format] (YYYY-MM-DDThh:mm:ss.sTZD). + // + // [ISO-8601 format]: https://www.w3.org/TR/NOTE-datetime + CreatedDate *string + + // The description of the version. + Description *string + + // The ARN of the layer. + LayerArn *string + + // The ARN of the layer version. + LayerVersionArn *string + + // The layer's software license. + LicenseInfo *string + + // The version number. + Version int64 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPublishLayerVersionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpPublishLayerVersion{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPublishLayerVersion{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "PublishLayerVersion"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpPublishLayerVersionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPublishLayerVersion(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opPublishLayerVersion(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "PublishLayerVersion", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_PublishVersion.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_PublishVersion.go new file mode 100644 index 00000000..15b0cbb1 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_PublishVersion.go @@ -0,0 +1,359 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/lambda/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a [version] from the current code and configuration of a function. Use versions +// to create a snapshot of your function code and configuration that doesn't +// change. +// +// Lambda doesn't publish a version if the function's configuration and code +// haven't changed since the last version. Use UpdateFunctionCodeor UpdateFunctionConfiguration to update the function before +// publishing a version. +// +// Clients can invoke versions directly or with an alias. To create an alias, use CreateAlias. +// +// [version]: https://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html +func (c *Client) PublishVersion(ctx context.Context, params *PublishVersionInput, optFns ...func(*Options)) (*PublishVersionOutput, error) { + if params == nil { + params = &PublishVersionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PublishVersion", params, optFns, c.addOperationPublishVersionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PublishVersionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PublishVersionInput struct { + + // The name or ARN of the Lambda function. + // + // Name formats + // + // - Function name - MyFunction . + // + // - Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction . + // + // - Partial ARN - 123456789012:function:MyFunction . + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. + // + // This member is required. + FunctionName *string + + // Only publish a version if the hash value matches the value that's specified. + // Use this option to avoid publishing a version if the function code has changed + // since you last updated it. You can get the hash for the version that you + // uploaded from the output of UpdateFunctionCode. + CodeSha256 *string + + // A description for the version to override the description in the function + // configuration. + Description *string + + // Only update the function if the revision ID matches the ID that's specified. + // Use this option to avoid publishing a version if the function configuration has + // changed since you last updated it. + RevisionId *string + + noSmithyDocumentSerde +} + +// Details about a function's configuration. +type PublishVersionOutput struct { + + // The instruction set architecture that the function supports. Architecture is a + // string array with one of the valid values. The default architecture value is + // x86_64 . + Architectures []types.Architecture + + // The SHA256 hash of the function's deployment package. + CodeSha256 *string + + // The size of the function's deployment package, in bytes. + CodeSize int64 + + // The function's dead letter queue. + DeadLetterConfig *types.DeadLetterConfig + + // The function's description. + Description *string + + // The function's [environment variables]. Omitted from CloudTrail logs. + // + // [environment variables]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html + Environment *types.EnvironmentResponse + + // The size of the function's /tmp directory in MB. The default value is 512, but + // can be any whole number between 512 and 10,240 MB. For more information, see [Configuring ephemeral storage (console)]. + // + // [Configuring ephemeral storage (console)]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-ephemeral-storage + EphemeralStorage *types.EphemeralStorage + + // Connection settings for an [Amazon EFS file system]. + // + // [Amazon EFS file system]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-filesystem.html + FileSystemConfigs []types.FileSystemConfig + + // The function's Amazon Resource Name (ARN). + FunctionArn *string + + // The name of the function. + FunctionName *string + + // The function that Lambda calls to begin running your function. + Handler *string + + // The function's image configuration values. + ImageConfigResponse *types.ImageConfigResponse + + // The ARN of the Key Management Service (KMS) customer managed key that's used to + // encrypt the following resources: + // + // - The function's [environment variables]. + // + // - The function's [Lambda SnapStart]snapshots. + // + // - When used with SourceKMSKeyArn , the unzipped version of the .zip deployment + // package that's used for function invocations. For more information, see [Specifying a customer managed key for Lambda]. + // + // - The optimized version of the container image that's used for function + // invocations. Note that this is not the same key that's used to protect your + // container image in the Amazon Elastic Container Registry (Amazon ECR). For more + // information, see [Function lifecycle]. + // + // If you don't provide a customer managed key, Lambda uses an [Amazon Web Services owned key] or an [Amazon Web Services managed key]. + // + // [Amazon Web Services owned key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk + // [Specifying a customer managed key for Lambda]: https://docs.aws.amazon.com/lambda/latest/dg/encrypt-zip-package.html#enable-zip-custom-encryption + // [Lambda SnapStart]: https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html + // [environment variables]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-encryption + // [Function lifecycle]: https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-lifecycle + // [Amazon Web Services managed key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk + KMSKeyArn *string + + // The date and time that the function was last updated, in [ISO-8601 format] + // (YYYY-MM-DDThh:mm:ss.sTZD). + // + // [ISO-8601 format]: https://www.w3.org/TR/NOTE-datetime + LastModified *string + + // The status of the last update that was performed on the function. This is first + // set to Successful after function creation completes. + LastUpdateStatus types.LastUpdateStatus + + // The reason for the last update that was performed on the function. + LastUpdateStatusReason *string + + // The reason code for the last update that was performed on the function. + LastUpdateStatusReasonCode types.LastUpdateStatusReasonCode + + // The function's [layers]. + // + // [layers]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html + Layers []types.Layer + + // The function's Amazon CloudWatch Logs configuration settings. + LoggingConfig *types.LoggingConfig + + // For Lambda@Edge functions, the ARN of the main function. + MasterArn *string + + // The amount of memory available to the function at runtime. + MemorySize *int32 + + // The type of deployment package. Set to Image for container image and set Zip + // for .zip file archive. + PackageType types.PackageType + + // The latest updated revision of the function or alias. + RevisionId *string + + // The function's execution role. + Role *string + + // The identifier of the function's [runtime]. Runtime is required if the deployment + // package is a .zip file archive. Specifying a runtime results in an error if + // you're deploying a function using a container image. + // + // The following list includes deprecated runtimes. Lambda blocks creating new + // functions and updating existing functions shortly after each runtime is + // deprecated. For more information, see [Runtime use after deprecation]. + // + // For a list of all currently supported runtimes, see [Supported runtimes]. + // + // [Runtime use after deprecation]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-deprecation-levels + // [runtime]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html + // [Supported runtimes]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtimes-supported + Runtime types.Runtime + + // The ARN of the runtime and any errors that occured. + RuntimeVersionConfig *types.RuntimeVersionConfig + + // The ARN of the signing job. + SigningJobArn *string + + // The ARN of the signing profile version. + SigningProfileVersionArn *string + + // Set ApplyOn to PublishedVersions to create a snapshot of the initialized + // execution environment when you publish a function version. For more information, + // see [Improving startup performance with Lambda SnapStart]. + // + // [Improving startup performance with Lambda SnapStart]: https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html + SnapStart *types.SnapStartResponse + + // The current state of the function. When the state is Inactive , you can + // reactivate the function by invoking it. + State types.State + + // The reason for the function's current state. + StateReason *string + + // The reason code for the function's current state. When the code is Creating , + // you can't invoke or modify the function. + StateReasonCode types.StateReasonCode + + // The amount of time in seconds that Lambda allows a function to run before + // stopping it. + Timeout *int32 + + // The function's X-Ray tracing configuration. + TracingConfig *types.TracingConfigResponse + + // The version of the Lambda function. + Version *string + + // The function's networking configuration. + VpcConfig *types.VpcConfigResponse + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPublishVersionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpPublishVersion{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPublishVersion{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "PublishVersion"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpPublishVersionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPublishVersion(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opPublishVersion(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "PublishVersion", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_PutFunctionCodeSigningConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_PutFunctionCodeSigningConfig.go new file mode 100644 index 00000000..b6ce4301 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_PutFunctionCodeSigningConfig.go @@ -0,0 +1,195 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +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" +) + +// Update the code signing configuration for the function. Changes to the code +// signing configuration take effect the next time a user tries to deploy a code +// package to the function. +func (c *Client) PutFunctionCodeSigningConfig(ctx context.Context, params *PutFunctionCodeSigningConfigInput, optFns ...func(*Options)) (*PutFunctionCodeSigningConfigOutput, error) { + if params == nil { + params = &PutFunctionCodeSigningConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutFunctionCodeSigningConfig", params, optFns, c.addOperationPutFunctionCodeSigningConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutFunctionCodeSigningConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutFunctionCodeSigningConfigInput struct { + + // The The Amazon Resource Name (ARN) of the code signing configuration. + // + // This member is required. + CodeSigningConfigArn *string + + // The name or ARN of the Lambda function. + // + // Name formats + // + // - Function name - MyFunction . + // + // - Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction . + // + // - Partial ARN - 123456789012:function:MyFunction . + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. + // + // This member is required. + FunctionName *string + + noSmithyDocumentSerde +} + +type PutFunctionCodeSigningConfigOutput struct { + + // The The Amazon Resource Name (ARN) of the code signing configuration. + // + // This member is required. + CodeSigningConfigArn *string + + // The name or ARN of the Lambda function. + // + // Name formats + // + // - Function name - MyFunction . + // + // - Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction . + // + // - Partial ARN - 123456789012:function:MyFunction . + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. + // + // This member is required. + FunctionName *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutFunctionCodeSigningConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpPutFunctionCodeSigningConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutFunctionCodeSigningConfig{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "PutFunctionCodeSigningConfig"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpPutFunctionCodeSigningConfigValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutFunctionCodeSigningConfig(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opPutFunctionCodeSigningConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "PutFunctionCodeSigningConfig", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_PutFunctionConcurrency.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_PutFunctionConcurrency.go new file mode 100644 index 00000000..46720967 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_PutFunctionConcurrency.go @@ -0,0 +1,192 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +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 maximum number of simultaneous executions for a function, and reserves +// capacity for that concurrency level. +// +// Concurrency settings apply to the function as a whole, including all published +// versions and the unpublished version. Reserving concurrency both ensures that +// your function has capacity to process the specified number of events +// simultaneously, and prevents it from scaling beyond that level. Use GetFunctionto see the +// current setting for a function. +// +// Use GetAccountSettings to see your Regional concurrency limit. You can reserve concurrency for as +// many functions as you like, as long as you leave at least 100 simultaneous +// executions unreserved for functions that aren't configured with a per-function +// limit. For more information, see [Lambda function scaling]. +// +// [Lambda function scaling]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-scaling.html +func (c *Client) PutFunctionConcurrency(ctx context.Context, params *PutFunctionConcurrencyInput, optFns ...func(*Options)) (*PutFunctionConcurrencyOutput, error) { + if params == nil { + params = &PutFunctionConcurrencyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutFunctionConcurrency", params, optFns, c.addOperationPutFunctionConcurrencyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutFunctionConcurrencyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutFunctionConcurrencyInput struct { + + // The name or ARN of the Lambda function. + // + // Name formats + // + // - Function name – my-function . + // + // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function . + // + // - Partial ARN – 123456789012:function:my-function . + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. + // + // This member is required. + FunctionName *string + + // The number of simultaneous executions to reserve for the function. + // + // This member is required. + ReservedConcurrentExecutions *int32 + + noSmithyDocumentSerde +} + +type PutFunctionConcurrencyOutput struct { + + // The number of concurrent executions that are reserved for this function. For + // more information, see [Managing Lambda reserved concurrency]. + // + // [Managing Lambda reserved concurrency]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-concurrency.html + ReservedConcurrentExecutions *int32 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutFunctionConcurrencyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpPutFunctionConcurrency{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutFunctionConcurrency{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "PutFunctionConcurrency"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpPutFunctionConcurrencyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutFunctionConcurrency(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opPutFunctionConcurrency(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "PutFunctionConcurrency", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_PutFunctionEventInvokeConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_PutFunctionEventInvokeConfig.go new file mode 100644 index 00000000..9d6a0e4d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_PutFunctionEventInvokeConfig.go @@ -0,0 +1,248 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/lambda/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Configures options for [asynchronous invocation] on a function, version, or alias. If a configuration +// already exists for a function, version, or alias, this operation overwrites it. +// If you exclude any settings, they are removed. To set one option without +// affecting existing settings for other options, use UpdateFunctionEventInvokeConfig. +// +// By default, Lambda retries an asynchronous invocation twice if the function +// returns an error. It retains events in a queue for up to six hours. When an +// event fails all processing attempts or stays in the asynchronous invocation +// queue for too long, Lambda discards it. To retain discarded events, configure a +// dead-letter queue with UpdateFunctionConfiguration. +// +// To send an invocation record to a queue, topic, S3 bucket, function, or event +// bus, specify a [destination]. You can configure separate destinations for successful +// invocations (on-success) and events that fail all processing attempts +// (on-failure). You can configure destinations in addition to or instead of a +// dead-letter queue. +// +// S3 buckets are supported only for on-failure destinations. To retain records of +// successful invocations, use another destination type. +// +// [asynchronous invocation]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html +// [destination]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-async-destinations +func (c *Client) PutFunctionEventInvokeConfig(ctx context.Context, params *PutFunctionEventInvokeConfigInput, optFns ...func(*Options)) (*PutFunctionEventInvokeConfigOutput, error) { + if params == nil { + params = &PutFunctionEventInvokeConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutFunctionEventInvokeConfig", params, optFns, c.addOperationPutFunctionEventInvokeConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutFunctionEventInvokeConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutFunctionEventInvokeConfigInput struct { + + // The name or ARN of the Lambda function, version, or alias. + // + // Name formats + // + // - Function name - my-function (name-only), my-function:v1 (with alias). + // + // - Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function . + // + // - Partial ARN - 123456789012:function:my-function . + // + // You can append a version number or alias to any of the formats. The length + // constraint applies only to the full ARN. If you specify only the function name, + // it is limited to 64 characters in length. + // + // This member is required. + FunctionName *string + + // A destination for events after they have been sent to a function for processing. + // + // Destinations + // + // - Function - The Amazon Resource Name (ARN) of a Lambda function. + // + // - Queue - The ARN of a standard SQS queue. + // + // - Bucket - The ARN of an Amazon S3 bucket. + // + // - Topic - The ARN of a standard SNS topic. + // + // - Event Bus - The ARN of an Amazon EventBridge event bus. + // + // S3 buckets are supported only for on-failure destinations. To retain records of + // successful invocations, use another destination type. + DestinationConfig *types.DestinationConfig + + // The maximum age of a request that Lambda sends to a function for processing. + MaximumEventAgeInSeconds *int32 + + // The maximum number of times to retry when the function returns an error. + MaximumRetryAttempts *int32 + + // A version number or alias name. + Qualifier *string + + noSmithyDocumentSerde +} + +type PutFunctionEventInvokeConfigOutput struct { + + // A destination for events after they have been sent to a function for processing. + // + // Destinations + // + // - Function - The Amazon Resource Name (ARN) of a Lambda function. + // + // - Queue - The ARN of a standard SQS queue. + // + // - Bucket - The ARN of an Amazon S3 bucket. + // + // - Topic - The ARN of a standard SNS topic. + // + // - Event Bus - The ARN of an Amazon EventBridge event bus. + // + // S3 buckets are supported only for on-failure destinations. To retain records of + // successful invocations, use another destination type. + DestinationConfig *types.DestinationConfig + + // The Amazon Resource Name (ARN) of the function. + FunctionArn *string + + // The date and time that the configuration was last updated. + LastModified *time.Time + + // The maximum age of a request that Lambda sends to a function for processing. + MaximumEventAgeInSeconds *int32 + + // The maximum number of times to retry when the function returns an error. + MaximumRetryAttempts *int32 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutFunctionEventInvokeConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpPutFunctionEventInvokeConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutFunctionEventInvokeConfig{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "PutFunctionEventInvokeConfig"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpPutFunctionEventInvokeConfigValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutFunctionEventInvokeConfig(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opPutFunctionEventInvokeConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "PutFunctionEventInvokeConfig", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_PutFunctionRecursionConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_PutFunctionRecursionConfig.go new file mode 100644 index 00000000..78ee7b84 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_PutFunctionRecursionConfig.go @@ -0,0 +1,215 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/lambda/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Sets your function's [recursive loop detection] configuration. +// +// When you configure a Lambda function to output to the same service or resource +// that invokes the function, it's possible to create an infinite recursive loop. +// For example, a Lambda function might write a message to an Amazon Simple Queue +// Service (Amazon SQS) queue, which then invokes the same function. This +// invocation causes the function to write another message to the queue, which in +// turn invokes the function again. +// +// Lambda can detect certain types of recursive loops shortly after they occur. +// When Lambda detects a recursive loop and your function's recursive loop +// detection configuration is set to Terminate , it stops your function being +// invoked and notifies you. +// +// [recursive loop detection]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-recursion.html +func (c *Client) PutFunctionRecursionConfig(ctx context.Context, params *PutFunctionRecursionConfigInput, optFns ...func(*Options)) (*PutFunctionRecursionConfigOutput, error) { + if params == nil { + params = &PutFunctionRecursionConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutFunctionRecursionConfig", params, optFns, c.addOperationPutFunctionRecursionConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutFunctionRecursionConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutFunctionRecursionConfigInput struct { + + // The name or ARN of the Lambda function. + // + // Name formats + // + // - Function name – my-function . + // + // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function . + // + // - Partial ARN – 123456789012:function:my-function . + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. + // + // This member is required. + FunctionName *string + + // If you set your function's recursive loop detection configuration to Allow , + // Lambda doesn't take any action when it detects your function being invoked as + // part of a recursive loop. We recommend that you only use this setting if your + // design intentionally uses a Lambda function to write data back to the same + // Amazon Web Services resource that invokes it. + // + // If you set your function's recursive loop detection configuration to Terminate , + // Lambda stops your function being invoked and notifies you when it detects your + // function being invoked as part of a recursive loop. + // + // By default, Lambda sets your function's configuration to Terminate . + // + // If your design intentionally uses a Lambda function to write data back to the + // same Amazon Web Services resource that invokes the function, then use caution + // and implement suitable guard rails to prevent unexpected charges being billed to + // your Amazon Web Services account. To learn more about best practices for using + // recursive invocation patterns, see [Recursive patterns that cause run-away Lambda functions]in Serverless Land. + // + // [Recursive patterns that cause run-away Lambda functions]: https://serverlessland.com/content/service/lambda/guides/aws-lambda-operator-guide/recursive-runaway + // + // This member is required. + RecursiveLoop types.RecursiveLoop + + noSmithyDocumentSerde +} + +type PutFunctionRecursionConfigOutput struct { + + // The status of your function's recursive loop detection configuration. + // + // When this value is set to Allow and Lambda detects your function being invoked + // as part of a recursive loop, it doesn't take any action. + // + // When this value is set to Terminate and Lambda detects your function being + // invoked as part of a recursive loop, it stops your function being invoked and + // notifies you. + RecursiveLoop types.RecursiveLoop + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutFunctionRecursionConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpPutFunctionRecursionConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutFunctionRecursionConfig{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "PutFunctionRecursionConfig"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpPutFunctionRecursionConfigValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutFunctionRecursionConfig(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opPutFunctionRecursionConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "PutFunctionRecursionConfig", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_PutProvisionedConcurrencyConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_PutProvisionedConcurrencyConfig.go new file mode 100644 index 00000000..7dbb42af --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_PutProvisionedConcurrencyConfig.go @@ -0,0 +1,201 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/lambda/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Adds a provisioned concurrency configuration to a function's alias or version. +func (c *Client) PutProvisionedConcurrencyConfig(ctx context.Context, params *PutProvisionedConcurrencyConfigInput, optFns ...func(*Options)) (*PutProvisionedConcurrencyConfigOutput, error) { + if params == nil { + params = &PutProvisionedConcurrencyConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutProvisionedConcurrencyConfig", params, optFns, c.addOperationPutProvisionedConcurrencyConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutProvisionedConcurrencyConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutProvisionedConcurrencyConfigInput struct { + + // The name or ARN of the Lambda function. + // + // Name formats + // + // - Function name – my-function . + // + // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function . + // + // - Partial ARN – 123456789012:function:my-function . + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. + // + // This member is required. + FunctionName *string + + // The amount of provisioned concurrency to allocate for the version or alias. + // + // This member is required. + ProvisionedConcurrentExecutions *int32 + + // The version number or alias name. + // + // This member is required. + Qualifier *string + + noSmithyDocumentSerde +} + +type PutProvisionedConcurrencyConfigOutput struct { + + // The amount of provisioned concurrency allocated. When a weighted alias is used + // during linear and canary deployments, this value fluctuates depending on the + // amount of concurrency that is provisioned for the function versions. + AllocatedProvisionedConcurrentExecutions *int32 + + // The amount of provisioned concurrency available. + AvailableProvisionedConcurrentExecutions *int32 + + // The date and time that a user last updated the configuration, in [ISO 8601 format]. + // + // [ISO 8601 format]: https://www.iso.org/iso-8601-date-and-time-format.html + LastModified *string + + // The amount of provisioned concurrency requested. + RequestedProvisionedConcurrentExecutions *int32 + + // The status of the allocation process. + Status types.ProvisionedConcurrencyStatusEnum + + // For failed allocations, the reason that provisioned concurrency could not be + // allocated. + StatusReason *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutProvisionedConcurrencyConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpPutProvisionedConcurrencyConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutProvisionedConcurrencyConfig{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "PutProvisionedConcurrencyConfig"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpPutProvisionedConcurrencyConfigValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutProvisionedConcurrencyConfig(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opPutProvisionedConcurrencyConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "PutProvisionedConcurrencyConfig", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_PutRuntimeManagementConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_PutRuntimeManagementConfig.go new file mode 100644 index 00000000..f514d2f8 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_PutRuntimeManagementConfig.go @@ -0,0 +1,220 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/lambda/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Sets the runtime management configuration for a function's version. For more +// information, see [Runtime updates]. +// +// [Runtime updates]: https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html +func (c *Client) PutRuntimeManagementConfig(ctx context.Context, params *PutRuntimeManagementConfigInput, optFns ...func(*Options)) (*PutRuntimeManagementConfigOutput, error) { + if params == nil { + params = &PutRuntimeManagementConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutRuntimeManagementConfig", params, optFns, c.addOperationPutRuntimeManagementConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutRuntimeManagementConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutRuntimeManagementConfigInput struct { + + // The name or ARN of the Lambda function. + // + // Name formats + // + // - Function name – my-function . + // + // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function . + // + // - Partial ARN – 123456789012:function:my-function . + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. + // + // This member is required. + FunctionName *string + + // Specify the runtime update mode. + // + // - Auto (default) - Automatically update to the most recent and secure runtime + // version using a [Two-phase runtime version rollout]. This is the best choice for most customers to ensure they + // always benefit from runtime updates. + // + // - Function update - Lambda updates the runtime of your function to the most + // recent and secure runtime version when you update your function. This approach + // synchronizes runtime updates with function deployments, giving you control over + // when runtime updates are applied and allowing you to detect and mitigate rare + // runtime update incompatibilities early. When using this setting, you need to + // regularly update your functions to keep their runtime up-to-date. + // + // - Manual - You specify a runtime version in your function configuration. The + // function will use this runtime version indefinitely. In the rare case where a + // new runtime version is incompatible with an existing function, this allows you + // to roll back your function to an earlier runtime version. For more information, + // see [Roll back a runtime version]. + // + // [Two-phase runtime version rollout]: https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html#runtime-management-two-phase + // [Roll back a runtime version]: https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html#runtime-management-rollback + // + // This member is required. + UpdateRuntimeOn types.UpdateRuntimeOn + + // Specify a version of the function. This can be $LATEST or a published version + // number. If no value is specified, the configuration for the $LATEST version is + // returned. + Qualifier *string + + // The ARN of the runtime version you want the function to use. + // + // This is only required if you're using the Manual runtime update mode. + RuntimeVersionArn *string + + noSmithyDocumentSerde +} + +type PutRuntimeManagementConfigOutput struct { + + // The ARN of the function + // + // This member is required. + FunctionArn *string + + // The runtime update mode. + // + // This member is required. + UpdateRuntimeOn types.UpdateRuntimeOn + + // The ARN of the runtime the function is configured to use. If the runtime update + // mode is manual, the ARN is returned, otherwise null is returned. + RuntimeVersionArn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutRuntimeManagementConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpPutRuntimeManagementConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutRuntimeManagementConfig{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "PutRuntimeManagementConfig"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpPutRuntimeManagementConfigValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutRuntimeManagementConfig(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opPutRuntimeManagementConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "PutRuntimeManagementConfig", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_RemoveLayerVersionPermission.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_RemoveLayerVersionPermission.go new file mode 100644 index 00000000..ee2ed14a --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_RemoveLayerVersionPermission.go @@ -0,0 +1,172 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +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 a statement from the permissions policy for a version of an [Lambda layer]. For more +// information, see AddLayerVersionPermission. +// +// [Lambda layer]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html +func (c *Client) RemoveLayerVersionPermission(ctx context.Context, params *RemoveLayerVersionPermissionInput, optFns ...func(*Options)) (*RemoveLayerVersionPermissionOutput, error) { + if params == nil { + params = &RemoveLayerVersionPermissionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "RemoveLayerVersionPermission", params, optFns, c.addOperationRemoveLayerVersionPermissionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*RemoveLayerVersionPermissionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type RemoveLayerVersionPermissionInput struct { + + // The name or Amazon Resource Name (ARN) of the layer. + // + // This member is required. + LayerName *string + + // The identifier that was specified when the statement was added. + // + // This member is required. + StatementId *string + + // The version number. + // + // This member is required. + VersionNumber *int64 + + // Only update the policy if the revision ID matches the ID specified. Use this + // option to avoid modifying a policy that has changed since you last read it. + RevisionId *string + + noSmithyDocumentSerde +} + +type RemoveLayerVersionPermissionOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationRemoveLayerVersionPermissionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpRemoveLayerVersionPermission{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpRemoveLayerVersionPermission{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "RemoveLayerVersionPermission"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpRemoveLayerVersionPermissionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRemoveLayerVersionPermission(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opRemoveLayerVersionPermission(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "RemoveLayerVersionPermission", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_RemovePermission.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_RemovePermission.go new file mode 100644 index 00000000..b9132292 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_RemovePermission.go @@ -0,0 +1,182 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +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" +) + +// Revokes function-use permission from an Amazon Web Services service or another +// Amazon Web Services account. You can get the ID of the statement from the output +// of GetPolicy. +func (c *Client) RemovePermission(ctx context.Context, params *RemovePermissionInput, optFns ...func(*Options)) (*RemovePermissionOutput, error) { + if params == nil { + params = &RemovePermissionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "RemovePermission", params, optFns, c.addOperationRemovePermissionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*RemovePermissionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type RemovePermissionInput struct { + + // The name or ARN of the Lambda function, version, or alias. + // + // Name formats + // + // - Function name – my-function (name-only), my-function:v1 (with alias). + // + // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function . + // + // - Partial ARN – 123456789012:function:my-function . + // + // You can append a version number or alias to any of the formats. The length + // constraint applies only to the full ARN. If you specify only the function name, + // it is limited to 64 characters in length. + // + // This member is required. + FunctionName *string + + // Statement ID of the permission to remove. + // + // This member is required. + StatementId *string + + // Specify a version or alias to remove permissions from a published version of + // the function. + Qualifier *string + + // Update the policy only if the revision ID matches the ID that's specified. Use + // this option to avoid modifying a policy that has changed since you last read it. + RevisionId *string + + noSmithyDocumentSerde +} + +type RemovePermissionOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationRemovePermissionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpRemovePermission{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpRemovePermission{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "RemovePermission"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpRemovePermissionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRemovePermission(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opRemovePermission(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "RemovePermission", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_TagResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_TagResource.go new file mode 100644 index 00000000..f58cad0a --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_TagResource.go @@ -0,0 +1,162 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +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" +) + +// Adds [tags] to a function, event source mapping, or code signing configuration. +// +// [tags]: https://docs.aws.amazon.com/lambda/latest/dg/tagging.html +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 resource's Amazon Resource Name (ARN). + // + // This member is required. + Resource *string + + // A list of tags to apply to 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(&awsRestjson1_serializeOpTagResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_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); 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 = addTimeOffsetBuild(stack, c); 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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); 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/lambda/api_op_UntagResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_UntagResource.go new file mode 100644 index 00000000..13a7707a --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_UntagResource.go @@ -0,0 +1,162 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +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 [tags] from a function, event source mapping, or code signing configuration. +// +// [tags]: https://docs.aws.amazon.com/lambda/latest/dg/tagging.html +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 resource's Amazon Resource Name (ARN). + // + // This member is required. + Resource *string + + // A 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(&awsRestjson1_serializeOpUntagResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_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); 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 = addTimeOffsetBuild(stack, c); 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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); 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/lambda/api_op_UpdateAlias.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_UpdateAlias.go new file mode 100644 index 00000000..646e0487 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_UpdateAlias.go @@ -0,0 +1,213 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/lambda/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates the configuration of a Lambda function [alias]. +// +// [alias]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html +func (c *Client) UpdateAlias(ctx context.Context, params *UpdateAliasInput, optFns ...func(*Options)) (*UpdateAliasOutput, error) { + if params == nil { + params = &UpdateAliasInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateAlias", params, optFns, c.addOperationUpdateAliasMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateAliasOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateAliasInput struct { + + // The name or ARN of the Lambda function. + // + // Name formats + // + // - Function name - MyFunction . + // + // - Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction . + // + // - Partial ARN - 123456789012:function:MyFunction . + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. + // + // This member is required. + FunctionName *string + + // The name of the alias. + // + // This member is required. + Name *string + + // A description of the alias. + Description *string + + // The function version that the alias invokes. + FunctionVersion *string + + // Only update the alias if the revision ID matches the ID that's specified. Use + // this option to avoid modifying an alias that has changed since you last read it. + RevisionId *string + + // The [routing configuration] of the alias. + // + // [routing configuration]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html#configuring-alias-routing + RoutingConfig *types.AliasRoutingConfiguration + + noSmithyDocumentSerde +} + +// Provides configuration information about a Lambda function [alias]. +// +// [alias]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html +type UpdateAliasOutput struct { + + // The Amazon Resource Name (ARN) of the alias. + AliasArn *string + + // A description of the alias. + Description *string + + // The function version that the alias invokes. + FunctionVersion *string + + // The name of the alias. + Name *string + + // A unique identifier that changes when you update the alias. + RevisionId *string + + // The [routing configuration] of the alias. + // + // [routing configuration]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html + RoutingConfig *types.AliasRoutingConfiguration + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateAliasMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateAlias{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateAlias{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateAlias"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpUpdateAliasValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateAlias(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateAlias(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateAlias", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_UpdateCodeSigningConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_UpdateCodeSigningConfig.go new file mode 100644 index 00000000..39e1e8d9 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_UpdateCodeSigningConfig.go @@ -0,0 +1,173 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/lambda/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Update the code signing configuration. Changes to the code signing +// configuration take effect the next time a user tries to deploy a code package to +// the function. +func (c *Client) UpdateCodeSigningConfig(ctx context.Context, params *UpdateCodeSigningConfigInput, optFns ...func(*Options)) (*UpdateCodeSigningConfigOutput, error) { + if params == nil { + params = &UpdateCodeSigningConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateCodeSigningConfig", params, optFns, c.addOperationUpdateCodeSigningConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateCodeSigningConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateCodeSigningConfigInput struct { + + // The The Amazon Resource Name (ARN) of the code signing configuration. + // + // This member is required. + CodeSigningConfigArn *string + + // Signing profiles for this code signing configuration. + AllowedPublishers *types.AllowedPublishers + + // The code signing policy. + CodeSigningPolicies *types.CodeSigningPolicies + + // Descriptive name for this code signing configuration. + Description *string + + noSmithyDocumentSerde +} + +type UpdateCodeSigningConfigOutput struct { + + // The code signing configuration + // + // This member is required. + CodeSigningConfig *types.CodeSigningConfig + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateCodeSigningConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateCodeSigningConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateCodeSigningConfig{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateCodeSigningConfig"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpUpdateCodeSigningConfigValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateCodeSigningConfig(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateCodeSigningConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateCodeSigningConfig", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_UpdateEventSourceMapping.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_UpdateEventSourceMapping.go new file mode 100644 index 00000000..8120f418 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_UpdateEventSourceMapping.go @@ -0,0 +1,519 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/lambda/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Updates an event source mapping. You can change the function that Lambda +// invokes, or pause invocation and resume later from the same location. +// +// For details about how to configure different event sources, see the following +// topics. +// +// [Amazon DynamoDB Streams] +// +// [Amazon Kinesis] +// +// [Amazon SQS] +// +// [Amazon MQ and RabbitMQ] +// +// [Amazon MSK] +// +// [Apache Kafka] +// +// [Amazon DocumentDB] +// +// The following error handling options are available only for DynamoDB and +// Kinesis event sources: +// +// - BisectBatchOnFunctionError – If the function returns an error, split the +// batch in two and retry. +// +// - MaximumRecordAgeInSeconds – Discard records older than the specified age. +// The default value is infinite (-1). When set to infinite (-1), failed records +// are retried until the record expires +// +// - MaximumRetryAttempts – Discard records after the specified number of +// retries. The default value is infinite (-1). When set to infinite (-1), failed +// records are retried until the record expires. +// +// - ParallelizationFactor – Process multiple batches from each shard +// concurrently. +// +// For stream sources (DynamoDB, Kinesis, Amazon MSK, and self-managed Apache +// Kafka), the following option is also available: +// +// - DestinationConfig – Send discarded records to an Amazon SQS queue, Amazon +// SNS topic, or Amazon S3 bucket. +// +// For information about which configuration parameters apply to each event +// source, see the following topics. +// +// [Amazon DynamoDB Streams] +// +// [Amazon Kinesis] +// +// [Amazon SQS] +// +// [Amazon MQ and RabbitMQ] +// +// [Amazon MSK] +// +// [Apache Kafka] +// +// [Amazon DocumentDB] +// +// [Amazon DynamoDB Streams]: https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html#services-ddb-params +// [Amazon SQS]: https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#services-sqs-params +// [Amazon MSK]: https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#services-msk-parms +// [Amazon Kinesis]: https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html#services-kinesis-params +// [Amazon MQ and RabbitMQ]: https://docs.aws.amazon.com/lambda/latest/dg/with-mq.html#services-mq-params +// [Apache Kafka]: https://docs.aws.amazon.com/lambda/latest/dg/with-kafka.html#services-kafka-parms +// [Amazon DocumentDB]: https://docs.aws.amazon.com/lambda/latest/dg/with-documentdb.html#docdb-configuration +func (c *Client) UpdateEventSourceMapping(ctx context.Context, params *UpdateEventSourceMappingInput, optFns ...func(*Options)) (*UpdateEventSourceMappingOutput, error) { + if params == nil { + params = &UpdateEventSourceMappingInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateEventSourceMapping", params, optFns, c.addOperationUpdateEventSourceMappingMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateEventSourceMappingOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateEventSourceMappingInput struct { + + // The identifier of the event source mapping. + // + // This member is required. + UUID *string + + // The maximum number of records in each batch that Lambda pulls from your stream + // or queue and sends to your function. Lambda passes all of the records in the + // batch to the function in a single call, up to the payload limit for synchronous + // invocation (6 MB). + // + // - Amazon Kinesis – Default 100. Max 10,000. + // + // - Amazon DynamoDB Streams – Default 100. Max 10,000. + // + // - Amazon Simple Queue Service – Default 10. For standard queues the max is + // 10,000. For FIFO queues the max is 10. + // + // - Amazon Managed Streaming for Apache Kafka – Default 100. Max 10,000. + // + // - Self-managed Apache Kafka – Default 100. Max 10,000. + // + // - Amazon MQ (ActiveMQ and RabbitMQ) – Default 100. Max 10,000. + // + // - DocumentDB – Default 100. Max 10,000. + BatchSize *int32 + + // (Kinesis and DynamoDB Streams only) If the function returns an error, split the + // batch in two and retry. + BisectBatchOnFunctionError *bool + + // (Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Kafka only) A + // configuration object that specifies the destination of an event after Lambda + // processes it. + DestinationConfig *types.DestinationConfig + + // Specific configuration settings for a DocumentDB event source. + DocumentDBEventSourceConfig *types.DocumentDBEventSourceConfig + + // When true, the event source mapping is active. When false, Lambda pauses + // polling and invocation. + // + // Default: True + Enabled *bool + + // An object that defines the filter criteria that determine whether Lambda should + // process an event. For more information, see [Lambda event filtering]. + // + // [Lambda event filtering]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html + FilterCriteria *types.FilterCriteria + + // The name or ARN of the Lambda function. + // + // Name formats + // + // - Function name – MyFunction . + // + // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:MyFunction . + // + // - Version or Alias ARN – + // arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD . + // + // - Partial ARN – 123456789012:function:MyFunction . + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it's limited to 64 characters in length. + FunctionName *string + + // (Kinesis, DynamoDB Streams, and Amazon SQS) A list of current response type + // enums applied to the event source mapping. + FunctionResponseTypes []types.FunctionResponseType + + // The ARN of the Key Management Service (KMS) customer managed key that Lambda + // uses to encrypt your function's [filter criteria]. By default, Lambda does not encrypt your + // filter criteria object. Specify this property to encrypt data using your own + // customer managed key. + // + // [filter criteria]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html#filtering-basics + KMSKeyArn *string + + // The maximum amount of time, in seconds, that Lambda spends gathering records + // before invoking the function. You can configure MaximumBatchingWindowInSeconds + // to any value from 0 seconds to 300 seconds in increments of seconds. + // + // For Kinesis, DynamoDB, and Amazon SQS event sources, the default batching + // window is 0 seconds. For Amazon MSK, Self-managed Apache Kafka, Amazon MQ, and + // DocumentDB event sources, the default batching window is 500 ms. Note that + // because you can only change MaximumBatchingWindowInSeconds in increments of + // seconds, you cannot revert back to the 500 ms default batching window after you + // have changed it. To restore the default batching window, you must create a new + // event source mapping. + // + // Related setting: For Kinesis, DynamoDB, and Amazon SQS event sources, when you + // set BatchSize to a value greater than 10, you must set + // MaximumBatchingWindowInSeconds to at least 1. + MaximumBatchingWindowInSeconds *int32 + + // (Kinesis and DynamoDB Streams only) Discard records older than the specified + // age. The default value is infinite (-1). + MaximumRecordAgeInSeconds *int32 + + // (Kinesis and DynamoDB Streams only) Discard records after the specified number + // of retries. The default value is infinite (-1). When set to infinite (-1), + // failed records are retried until the record expires. + MaximumRetryAttempts *int32 + + // The metrics configuration for your event source. For more information, see [Event source mapping metrics]. + // + // [Event source mapping metrics]: https://docs.aws.amazon.com/lambda/latest/dg/monitoring-metrics-types.html#event-source-mapping-metrics + MetricsConfig *types.EventSourceMappingMetricsConfig + + // (Kinesis and DynamoDB Streams only) The number of batches to process from each + // shard concurrently. + ParallelizationFactor *int32 + + // (Amazon MSK and self-managed Apache Kafka only) The provisioned mode + // configuration for the event source. For more information, see [provisioned mode]. + // + // [provisioned mode]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html#invocation-eventsourcemapping-provisioned-mode + ProvisionedPollerConfig *types.ProvisionedPollerConfig + + // (Amazon SQS only) The scaling configuration for the event source. For more + // information, see [Configuring maximum concurrency for Amazon SQS event sources]. + // + // [Configuring maximum concurrency for Amazon SQS event sources]: https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-max-concurrency + ScalingConfig *types.ScalingConfig + + // An array of authentication protocols or VPC components required to secure your + // event source. + SourceAccessConfigurations []types.SourceAccessConfiguration + + // (Kinesis and DynamoDB Streams only) The duration in seconds of a processing + // window for DynamoDB and Kinesis Streams event sources. A value of 0 seconds + // indicates no tumbling window. + TumblingWindowInSeconds *int32 + + noSmithyDocumentSerde +} + +// A mapping between an Amazon Web Services resource and a Lambda function. For +// details, see CreateEventSourceMapping. +type UpdateEventSourceMappingOutput struct { + + // Specific configuration settings for an Amazon Managed Streaming for Apache + // Kafka (Amazon MSK) event source. + AmazonManagedKafkaEventSourceConfig *types.AmazonManagedKafkaEventSourceConfig + + // The maximum number of records in each batch that Lambda pulls from your stream + // or queue and sends to your function. Lambda passes all of the records in the + // batch to the function in a single call, up to the payload limit for synchronous + // invocation (6 MB). + // + // Default value: Varies by service. For Amazon SQS, the default is 10. For all + // other services, the default is 100. + // + // Related setting: When you set BatchSize to a value greater than 10, you must + // set MaximumBatchingWindowInSeconds to at least 1. + BatchSize *int32 + + // (Kinesis and DynamoDB Streams only) If the function returns an error, split the + // batch in two and retry. The default value is false. + BisectBatchOnFunctionError *bool + + // (Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka event + // sources only) A configuration object that specifies the destination of an event + // after Lambda processes it. + DestinationConfig *types.DestinationConfig + + // Specific configuration settings for a DocumentDB event source. + DocumentDBEventSourceConfig *types.DocumentDBEventSourceConfig + + // The Amazon Resource Name (ARN) of the event source. + EventSourceArn *string + + // The Amazon Resource Name (ARN) of the event source mapping. + EventSourceMappingArn *string + + // An object that defines the filter criteria that determine whether Lambda should + // process an event. For more information, see [Lambda event filtering]. + // + // If filter criteria is encrypted, this field shows up as null in the response of + // ListEventSourceMapping API calls. You can view this field in plaintext in the + // response of GetEventSourceMapping and DeleteEventSourceMapping calls if you have + // kms:Decrypt permissions for the correct KMS key. + // + // [Lambda event filtering]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html + FilterCriteria *types.FilterCriteria + + // An object that contains details about an error related to filter criteria + // encryption. + FilterCriteriaError *types.FilterCriteriaError + + // The ARN of the Lambda function. + FunctionArn *string + + // (Kinesis, DynamoDB Streams, and Amazon SQS) A list of current response type + // enums applied to the event source mapping. + FunctionResponseTypes []types.FunctionResponseType + + // The ARN of the Key Management Service (KMS) customer managed key that Lambda + // uses to encrypt your function's [filter criteria]. + // + // [filter criteria]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html#filtering-basics + KMSKeyArn *string + + // The date that the event source mapping was last updated or that its state + // changed. + LastModified *time.Time + + // The result of the last Lambda invocation of your function. + LastProcessingResult *string + + // The maximum amount of time, in seconds, that Lambda spends gathering records + // before invoking the function. You can configure MaximumBatchingWindowInSeconds + // to any value from 0 seconds to 300 seconds in increments of seconds. + // + // For streams and Amazon SQS event sources, the default batching window is 0 + // seconds. For Amazon MSK, Self-managed Apache Kafka, Amazon MQ, and DocumentDB + // event sources, the default batching window is 500 ms. Note that because you can + // only change MaximumBatchingWindowInSeconds in increments of seconds, you cannot + // revert back to the 500 ms default batching window after you have changed it. To + // restore the default batching window, you must create a new event source mapping. + // + // Related setting: For streams and Amazon SQS event sources, when you set + // BatchSize to a value greater than 10, you must set + // MaximumBatchingWindowInSeconds to at least 1. + MaximumBatchingWindowInSeconds *int32 + + // (Kinesis and DynamoDB Streams only) Discard records older than the specified + // age. The default value is -1, which sets the maximum age to infinite. When the + // value is set to infinite, Lambda never discards old records. + // + // The minimum valid value for maximum record age is 60s. Although values less + // than 60 and greater than -1 fall within the parameter's absolute range, they are + // not allowed + MaximumRecordAgeInSeconds *int32 + + // (Kinesis and DynamoDB Streams only) Discard records after the specified number + // of retries. The default value is -1, which sets the maximum number of retries to + // infinite. When MaximumRetryAttempts is infinite, Lambda retries failed records + // until the record expires in the event source. + MaximumRetryAttempts *int32 + + // The metrics configuration for your event source. For more information, see [Event source mapping metrics]. + // + // [Event source mapping metrics]: https://docs.aws.amazon.com/lambda/latest/dg/monitoring-metrics-types.html#event-source-mapping-metrics + MetricsConfig *types.EventSourceMappingMetricsConfig + + // (Kinesis and DynamoDB Streams only) The number of batches to process + // concurrently from each shard. The default value is 1. + ParallelizationFactor *int32 + + // (Amazon MSK and self-managed Apache Kafka only) The provisioned mode + // configuration for the event source. For more information, see [provisioned mode]. + // + // [provisioned mode]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html#invocation-eventsourcemapping-provisioned-mode + ProvisionedPollerConfig *types.ProvisionedPollerConfig + + // (Amazon MQ) The name of the Amazon MQ broker destination queue to consume. + Queues []string + + // (Amazon SQS only) The scaling configuration for the event source. For more + // information, see [Configuring maximum concurrency for Amazon SQS event sources]. + // + // [Configuring maximum concurrency for Amazon SQS event sources]: https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-max-concurrency + ScalingConfig *types.ScalingConfig + + // The self-managed Apache Kafka cluster for your event source. + SelfManagedEventSource *types.SelfManagedEventSource + + // Specific configuration settings for a self-managed Apache Kafka event source. + SelfManagedKafkaEventSourceConfig *types.SelfManagedKafkaEventSourceConfig + + // An array of the authentication protocol, VPC components, or virtual host to + // secure and define your event source. + SourceAccessConfigurations []types.SourceAccessConfiguration + + // The position in a stream from which to start reading. Required for Amazon + // Kinesis and Amazon DynamoDB Stream event sources. AT_TIMESTAMP is supported + // only for Amazon Kinesis streams, Amazon DocumentDB, Amazon MSK, and self-managed + // Apache Kafka. + StartingPosition types.EventSourcePosition + + // With StartingPosition set to AT_TIMESTAMP , the time from which to start + // reading. StartingPositionTimestamp cannot be in the future. + StartingPositionTimestamp *time.Time + + // The state of the event source mapping. It can be one of the following: Creating + // , Enabling , Enabled , Disabling , Disabled , Updating , or Deleting . + State *string + + // Indicates whether a user or Lambda made the last change to the event source + // mapping. + StateTransitionReason *string + + // The name of the Kafka topic. + Topics []string + + // (Kinesis and DynamoDB Streams only) The duration in seconds of a processing + // window for DynamoDB and Kinesis Streams event sources. A value of 0 seconds + // indicates no tumbling window. + TumblingWindowInSeconds *int32 + + // The identifier of the event source mapping. + UUID *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateEventSourceMappingMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateEventSourceMapping{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateEventSourceMapping{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateEventSourceMapping"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpUpdateEventSourceMappingValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateEventSourceMapping(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateEventSourceMapping(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateEventSourceMapping", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_UpdateFunctionCode.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_UpdateFunctionCode.go new file mode 100644 index 00000000..746b6707 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_UpdateFunctionCode.go @@ -0,0 +1,401 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/lambda/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates a Lambda function's code. If code signing is enabled for the function, +// the code package must be signed by a trusted publisher. For more information, +// see [Configuring code signing for Lambda]. +// +// If the function's package type is Image , then you must specify the code package +// in ImageUri as the URI of a [container image] in the Amazon ECR registry. +// +// If the function's package type is Zip , then you must specify the deployment +// package as a [.zip file archive]. Enter the Amazon S3 bucket and key of the code .zip file +// location. You can also provide the function code inline using the ZipFile field. +// +// The code in the deployment package must be compatible with the target +// instruction set architecture of the function ( x86-64 or arm64 ). +// +// The function's code is locked when you publish a version. You can't modify the +// code of a published version, only the unpublished version. +// +// For a function defined as a container image, Lambda resolves the image tag to +// an image digest. In Amazon ECR, if you update the image tag to a new image, +// Lambda does not automatically update the function. +// +// [.zip file archive]: https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-package.html#gettingstarted-package-zip +// [Configuring code signing for Lambda]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-codesigning.html +// [container image]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-images.html +func (c *Client) UpdateFunctionCode(ctx context.Context, params *UpdateFunctionCodeInput, optFns ...func(*Options)) (*UpdateFunctionCodeOutput, error) { + if params == nil { + params = &UpdateFunctionCodeInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateFunctionCode", params, optFns, c.addOperationUpdateFunctionCodeMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateFunctionCodeOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateFunctionCodeInput struct { + + // The name or ARN of the Lambda function. + // + // Name formats + // + // - Function name – my-function . + // + // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function . + // + // - Partial ARN – 123456789012:function:my-function . + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. + // + // This member is required. + FunctionName *string + + // The instruction set architecture that the function supports. Enter a string + // array with one of the valid values (arm64 or x86_64). The default value is + // x86_64 . + Architectures []types.Architecture + + // Set to true to validate the request parameters and access permissions without + // modifying the function code. + DryRun bool + + // URI of a container image in the Amazon ECR registry. Do not use for a function + // defined with a .zip file archive. + ImageUri *string + + // Set to true to publish a new version of the function after updating the code. + // This has the same effect as calling PublishVersionseparately. + Publish bool + + // Update the function only if the revision ID matches the ID that's specified. + // Use this option to avoid modifying a function that has changed since you last + // read it. + RevisionId *string + + // An Amazon S3 bucket in the same Amazon Web Services Region as your function. + // The bucket can be in a different Amazon Web Services account. Use only with a + // function defined with a .zip file archive deployment package. + S3Bucket *string + + // The Amazon S3 key of the deployment package. Use only with a function defined + // with a .zip file archive deployment package. + S3Key *string + + // For versioned objects, the version of the deployment package object to use. + S3ObjectVersion *string + + // The ARN of the Key Management Service (KMS) customer managed key that's used to + // encrypt your function's .zip deployment package. If you don't provide a customer + // managed key, Lambda uses an Amazon Web Services managed key. + SourceKMSKeyArn *string + + // The base64-encoded contents of the deployment package. Amazon Web Services SDK + // and CLI clients handle the encoding for you. Use only with a function defined + // with a .zip file archive deployment package. + ZipFile []byte + + noSmithyDocumentSerde +} + +// Details about a function's configuration. +type UpdateFunctionCodeOutput struct { + + // The instruction set architecture that the function supports. Architecture is a + // string array with one of the valid values. The default architecture value is + // x86_64 . + Architectures []types.Architecture + + // The SHA256 hash of the function's deployment package. + CodeSha256 *string + + // The size of the function's deployment package, in bytes. + CodeSize int64 + + // The function's dead letter queue. + DeadLetterConfig *types.DeadLetterConfig + + // The function's description. + Description *string + + // The function's [environment variables]. Omitted from CloudTrail logs. + // + // [environment variables]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html + Environment *types.EnvironmentResponse + + // The size of the function's /tmp directory in MB. The default value is 512, but + // can be any whole number between 512 and 10,240 MB. For more information, see [Configuring ephemeral storage (console)]. + // + // [Configuring ephemeral storage (console)]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-ephemeral-storage + EphemeralStorage *types.EphemeralStorage + + // Connection settings for an [Amazon EFS file system]. + // + // [Amazon EFS file system]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-filesystem.html + FileSystemConfigs []types.FileSystemConfig + + // The function's Amazon Resource Name (ARN). + FunctionArn *string + + // The name of the function. + FunctionName *string + + // The function that Lambda calls to begin running your function. + Handler *string + + // The function's image configuration values. + ImageConfigResponse *types.ImageConfigResponse + + // The ARN of the Key Management Service (KMS) customer managed key that's used to + // encrypt the following resources: + // + // - The function's [environment variables]. + // + // - The function's [Lambda SnapStart]snapshots. + // + // - When used with SourceKMSKeyArn , the unzipped version of the .zip deployment + // package that's used for function invocations. For more information, see [Specifying a customer managed key for Lambda]. + // + // - The optimized version of the container image that's used for function + // invocations. Note that this is not the same key that's used to protect your + // container image in the Amazon Elastic Container Registry (Amazon ECR). For more + // information, see [Function lifecycle]. + // + // If you don't provide a customer managed key, Lambda uses an [Amazon Web Services owned key] or an [Amazon Web Services managed key]. + // + // [Amazon Web Services owned key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk + // [Specifying a customer managed key for Lambda]: https://docs.aws.amazon.com/lambda/latest/dg/encrypt-zip-package.html#enable-zip-custom-encryption + // [Lambda SnapStart]: https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html + // [environment variables]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-encryption + // [Function lifecycle]: https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-lifecycle + // [Amazon Web Services managed key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk + KMSKeyArn *string + + // The date and time that the function was last updated, in [ISO-8601 format] + // (YYYY-MM-DDThh:mm:ss.sTZD). + // + // [ISO-8601 format]: https://www.w3.org/TR/NOTE-datetime + LastModified *string + + // The status of the last update that was performed on the function. This is first + // set to Successful after function creation completes. + LastUpdateStatus types.LastUpdateStatus + + // The reason for the last update that was performed on the function. + LastUpdateStatusReason *string + + // The reason code for the last update that was performed on the function. + LastUpdateStatusReasonCode types.LastUpdateStatusReasonCode + + // The function's [layers]. + // + // [layers]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html + Layers []types.Layer + + // The function's Amazon CloudWatch Logs configuration settings. + LoggingConfig *types.LoggingConfig + + // For Lambda@Edge functions, the ARN of the main function. + MasterArn *string + + // The amount of memory available to the function at runtime. + MemorySize *int32 + + // The type of deployment package. Set to Image for container image and set Zip + // for .zip file archive. + PackageType types.PackageType + + // The latest updated revision of the function or alias. + RevisionId *string + + // The function's execution role. + Role *string + + // The identifier of the function's [runtime]. Runtime is required if the deployment + // package is a .zip file archive. Specifying a runtime results in an error if + // you're deploying a function using a container image. + // + // The following list includes deprecated runtimes. Lambda blocks creating new + // functions and updating existing functions shortly after each runtime is + // deprecated. For more information, see [Runtime use after deprecation]. + // + // For a list of all currently supported runtimes, see [Supported runtimes]. + // + // [Runtime use after deprecation]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-deprecation-levels + // [runtime]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html + // [Supported runtimes]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtimes-supported + Runtime types.Runtime + + // The ARN of the runtime and any errors that occured. + RuntimeVersionConfig *types.RuntimeVersionConfig + + // The ARN of the signing job. + SigningJobArn *string + + // The ARN of the signing profile version. + SigningProfileVersionArn *string + + // Set ApplyOn to PublishedVersions to create a snapshot of the initialized + // execution environment when you publish a function version. For more information, + // see [Improving startup performance with Lambda SnapStart]. + // + // [Improving startup performance with Lambda SnapStart]: https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html + SnapStart *types.SnapStartResponse + + // The current state of the function. When the state is Inactive , you can + // reactivate the function by invoking it. + State types.State + + // The reason for the function's current state. + StateReason *string + + // The reason code for the function's current state. When the code is Creating , + // you can't invoke or modify the function. + StateReasonCode types.StateReasonCode + + // The amount of time in seconds that Lambda allows a function to run before + // stopping it. + Timeout *int32 + + // The function's X-Ray tracing configuration. + TracingConfig *types.TracingConfigResponse + + // The version of the Lambda function. + Version *string + + // The function's networking configuration. + VpcConfig *types.VpcConfigResponse + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateFunctionCodeMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateFunctionCode{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateFunctionCode{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateFunctionCode"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpUpdateFunctionCodeValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateFunctionCode(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateFunctionCode(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateFunctionCode", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_UpdateFunctionConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_UpdateFunctionConfiguration.go new file mode 100644 index 00000000..82139327 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_UpdateFunctionConfiguration.go @@ -0,0 +1,475 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/lambda/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Modify the version-specific settings of a Lambda function. +// +// When you update a function, Lambda provisions an instance of the function and +// its supporting resources. If your function connects to a VPC, this process can +// take a minute. During this time, you can't modify the function, but you can +// still invoke it. The LastUpdateStatus , LastUpdateStatusReason , and +// LastUpdateStatusReasonCode fields in the response from GetFunctionConfiguration indicate when the +// update is complete and the function is processing events with the new +// configuration. For more information, see [Lambda function states]. +// +// These settings can vary between versions of a function and are locked when you +// publish a version. You can't modify the configuration of a published version, +// only the unpublished version. +// +// To configure function concurrency, use PutFunctionConcurrency. To grant invoke permissions to an +// Amazon Web Services account or Amazon Web Services service, use AddPermission. +// +// [Lambda function states]: https://docs.aws.amazon.com/lambda/latest/dg/functions-states.html +func (c *Client) UpdateFunctionConfiguration(ctx context.Context, params *UpdateFunctionConfigurationInput, optFns ...func(*Options)) (*UpdateFunctionConfigurationOutput, error) { + if params == nil { + params = &UpdateFunctionConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateFunctionConfiguration", params, optFns, c.addOperationUpdateFunctionConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateFunctionConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateFunctionConfigurationInput struct { + + // The name or ARN of the Lambda function. + // + // Name formats + // + // - Function name – my-function . + // + // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function . + // + // - Partial ARN – 123456789012:function:my-function . + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. + // + // This member is required. + FunctionName *string + + // A dead-letter queue configuration that specifies the queue or topic where + // Lambda sends asynchronous events when they fail processing. For more + // information, see [Dead-letter queues]. + // + // [Dead-letter queues]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-dlq + DeadLetterConfig *types.DeadLetterConfig + + // A description of the function. + Description *string + + // Environment variables that are accessible from function code during execution. + Environment *types.Environment + + // The size of the function's /tmp directory in MB. The default value is 512, but + // can be any whole number between 512 and 10,240 MB. For more information, see [Configuring ephemeral storage (console)]. + // + // [Configuring ephemeral storage (console)]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-ephemeral-storage + EphemeralStorage *types.EphemeralStorage + + // Connection settings for an Amazon EFS file system. + FileSystemConfigs []types.FileSystemConfig + + // The name of the method within your code that Lambda calls to run your function. + // Handler is required if the deployment package is a .zip file archive. The format + // includes the file name. It can also include namespaces and other qualifiers, + // depending on the runtime. For more information, see [Lambda programming model]. + // + // [Lambda programming model]: https://docs.aws.amazon.com/lambda/latest/dg/foundation-progmodel.html + Handler *string + + // [Container image configuration values] that override the values in the container image Docker file. + // + // [Container image configuration values]: https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-parms + ImageConfig *types.ImageConfig + + // The ARN of the Key Management Service (KMS) customer managed key that's used to + // encrypt the following resources: + // + // - The function's [environment variables]. + // + // - The function's [Lambda SnapStart]snapshots. + // + // - When used with SourceKMSKeyArn , the unzipped version of the .zip deployment + // package that's used for function invocations. For more information, see [Specifying a customer managed key for Lambda]. + // + // - The optimized version of the container image that's used for function + // invocations. Note that this is not the same key that's used to protect your + // container image in the Amazon Elastic Container Registry (Amazon ECR). For more + // information, see [Function lifecycle]. + // + // If you don't provide a customer managed key, Lambda uses an [Amazon Web Services owned key] or an [Amazon Web Services managed key]. + // + // [Amazon Web Services owned key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk + // [Specifying a customer managed key for Lambda]: https://docs.aws.amazon.com/lambda/latest/dg/encrypt-zip-package.html#enable-zip-custom-encryption + // [Lambda SnapStart]: https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html + // [environment variables]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-encryption + // [Function lifecycle]: https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-lifecycle + // [Amazon Web Services managed key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk + KMSKeyArn *string + + // A list of [function layers] to add to the function's execution environment. Specify each layer + // by its ARN, including the version. + // + // [function layers]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html + Layers []string + + // The function's Amazon CloudWatch Logs configuration settings. + LoggingConfig *types.LoggingConfig + + // The amount of [memory available to the function] at runtime. Increasing the function memory also increases its + // CPU allocation. The default value is 128 MB. The value can be any multiple of 1 + // MB. + // + // [memory available to the function]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-memory-console + MemorySize *int32 + + // Update the function only if the revision ID matches the ID that's specified. + // Use this option to avoid modifying a function that has changed since you last + // read it. + RevisionId *string + + // The Amazon Resource Name (ARN) of the function's execution role. + Role *string + + // The identifier of the function's [runtime]. Runtime is required if the deployment + // package is a .zip file archive. Specifying a runtime results in an error if + // you're deploying a function using a container image. + // + // The following list includes deprecated runtimes. Lambda blocks creating new + // functions and updating existing functions shortly after each runtime is + // deprecated. For more information, see [Runtime use after deprecation]. + // + // For a list of all currently supported runtimes, see [Supported runtimes]. + // + // [Runtime use after deprecation]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-deprecation-levels + // [runtime]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html + // [Supported runtimes]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtimes-supported + Runtime types.Runtime + + // The function's [SnapStart] setting. + // + // [SnapStart]: https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html + SnapStart *types.SnapStart + + // The amount of time (in seconds) that Lambda allows a function to run before + // stopping it. The default is 3 seconds. The maximum allowed value is 900 seconds. + // For more information, see [Lambda execution environment]. + // + // [Lambda execution environment]: https://docs.aws.amazon.com/lambda/latest/dg/runtimes-context.html + Timeout *int32 + + // Set Mode to Active to sample and trace a subset of incoming requests with [X-Ray]. + // + // [X-Ray]: https://docs.aws.amazon.com/lambda/latest/dg/services-xray.html + TracingConfig *types.TracingConfig + + // For network connectivity to Amazon Web Services resources in a VPC, specify a + // list of security groups and subnets in the VPC. When you connect a function to a + // VPC, it can access resources and the internet only through that VPC. For more + // information, see [Configuring a Lambda function to access resources in a VPC]. + // + // [Configuring a Lambda function to access resources in a VPC]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html + VpcConfig *types.VpcConfig + + noSmithyDocumentSerde +} + +// Details about a function's configuration. +type UpdateFunctionConfigurationOutput struct { + + // The instruction set architecture that the function supports. Architecture is a + // string array with one of the valid values. The default architecture value is + // x86_64 . + Architectures []types.Architecture + + // The SHA256 hash of the function's deployment package. + CodeSha256 *string + + // The size of the function's deployment package, in bytes. + CodeSize int64 + + // The function's dead letter queue. + DeadLetterConfig *types.DeadLetterConfig + + // The function's description. + Description *string + + // The function's [environment variables]. Omitted from CloudTrail logs. + // + // [environment variables]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html + Environment *types.EnvironmentResponse + + // The size of the function's /tmp directory in MB. The default value is 512, but + // can be any whole number between 512 and 10,240 MB. For more information, see [Configuring ephemeral storage (console)]. + // + // [Configuring ephemeral storage (console)]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-ephemeral-storage + EphemeralStorage *types.EphemeralStorage + + // Connection settings for an [Amazon EFS file system]. + // + // [Amazon EFS file system]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-filesystem.html + FileSystemConfigs []types.FileSystemConfig + + // The function's Amazon Resource Name (ARN). + FunctionArn *string + + // The name of the function. + FunctionName *string + + // The function that Lambda calls to begin running your function. + Handler *string + + // The function's image configuration values. + ImageConfigResponse *types.ImageConfigResponse + + // The ARN of the Key Management Service (KMS) customer managed key that's used to + // encrypt the following resources: + // + // - The function's [environment variables]. + // + // - The function's [Lambda SnapStart]snapshots. + // + // - When used with SourceKMSKeyArn , the unzipped version of the .zip deployment + // package that's used for function invocations. For more information, see [Specifying a customer managed key for Lambda]. + // + // - The optimized version of the container image that's used for function + // invocations. Note that this is not the same key that's used to protect your + // container image in the Amazon Elastic Container Registry (Amazon ECR). For more + // information, see [Function lifecycle]. + // + // If you don't provide a customer managed key, Lambda uses an [Amazon Web Services owned key] or an [Amazon Web Services managed key]. + // + // [Amazon Web Services owned key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk + // [Specifying a customer managed key for Lambda]: https://docs.aws.amazon.com/lambda/latest/dg/encrypt-zip-package.html#enable-zip-custom-encryption + // [Lambda SnapStart]: https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html + // [environment variables]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-encryption + // [Function lifecycle]: https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-lifecycle + // [Amazon Web Services managed key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk + KMSKeyArn *string + + // The date and time that the function was last updated, in [ISO-8601 format] + // (YYYY-MM-DDThh:mm:ss.sTZD). + // + // [ISO-8601 format]: https://www.w3.org/TR/NOTE-datetime + LastModified *string + + // The status of the last update that was performed on the function. This is first + // set to Successful after function creation completes. + LastUpdateStatus types.LastUpdateStatus + + // The reason for the last update that was performed on the function. + LastUpdateStatusReason *string + + // The reason code for the last update that was performed on the function. + LastUpdateStatusReasonCode types.LastUpdateStatusReasonCode + + // The function's [layers]. + // + // [layers]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html + Layers []types.Layer + + // The function's Amazon CloudWatch Logs configuration settings. + LoggingConfig *types.LoggingConfig + + // For Lambda@Edge functions, the ARN of the main function. + MasterArn *string + + // The amount of memory available to the function at runtime. + MemorySize *int32 + + // The type of deployment package. Set to Image for container image and set Zip + // for .zip file archive. + PackageType types.PackageType + + // The latest updated revision of the function or alias. + RevisionId *string + + // The function's execution role. + Role *string + + // The identifier of the function's [runtime]. Runtime is required if the deployment + // package is a .zip file archive. Specifying a runtime results in an error if + // you're deploying a function using a container image. + // + // The following list includes deprecated runtimes. Lambda blocks creating new + // functions and updating existing functions shortly after each runtime is + // deprecated. For more information, see [Runtime use after deprecation]. + // + // For a list of all currently supported runtimes, see [Supported runtimes]. + // + // [Runtime use after deprecation]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-deprecation-levels + // [runtime]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html + // [Supported runtimes]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtimes-supported + Runtime types.Runtime + + // The ARN of the runtime and any errors that occured. + RuntimeVersionConfig *types.RuntimeVersionConfig + + // The ARN of the signing job. + SigningJobArn *string + + // The ARN of the signing profile version. + SigningProfileVersionArn *string + + // Set ApplyOn to PublishedVersions to create a snapshot of the initialized + // execution environment when you publish a function version. For more information, + // see [Improving startup performance with Lambda SnapStart]. + // + // [Improving startup performance with Lambda SnapStart]: https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html + SnapStart *types.SnapStartResponse + + // The current state of the function. When the state is Inactive , you can + // reactivate the function by invoking it. + State types.State + + // The reason for the function's current state. + StateReason *string + + // The reason code for the function's current state. When the code is Creating , + // you can't invoke or modify the function. + StateReasonCode types.StateReasonCode + + // The amount of time in seconds that Lambda allows a function to run before + // stopping it. + Timeout *int32 + + // The function's X-Ray tracing configuration. + TracingConfig *types.TracingConfigResponse + + // The version of the Lambda function. + Version *string + + // The function's networking configuration. + VpcConfig *types.VpcConfigResponse + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateFunctionConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateFunctionConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateFunctionConfiguration{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateFunctionConfiguration"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpUpdateFunctionConfigurationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateFunctionConfiguration(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateFunctionConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateFunctionConfiguration", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_UpdateFunctionEventInvokeConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_UpdateFunctionEventInvokeConfig.go new file mode 100644 index 00000000..556c9bcf --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_UpdateFunctionEventInvokeConfig.go @@ -0,0 +1,230 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/lambda/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Updates the configuration for asynchronous invocation for a function, version, +// or alias. +// +// To configure options for asynchronous invocation, use PutFunctionEventInvokeConfig. +func (c *Client) UpdateFunctionEventInvokeConfig(ctx context.Context, params *UpdateFunctionEventInvokeConfigInput, optFns ...func(*Options)) (*UpdateFunctionEventInvokeConfigOutput, error) { + if params == nil { + params = &UpdateFunctionEventInvokeConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateFunctionEventInvokeConfig", params, optFns, c.addOperationUpdateFunctionEventInvokeConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateFunctionEventInvokeConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateFunctionEventInvokeConfigInput struct { + + // The name or ARN of the Lambda function, version, or alias. + // + // Name formats + // + // - Function name - my-function (name-only), my-function:v1 (with alias). + // + // - Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function . + // + // - Partial ARN - 123456789012:function:my-function . + // + // You can append a version number or alias to any of the formats. The length + // constraint applies only to the full ARN. If you specify only the function name, + // it is limited to 64 characters in length. + // + // This member is required. + FunctionName *string + + // A destination for events after they have been sent to a function for processing. + // + // Destinations + // + // - Function - The Amazon Resource Name (ARN) of a Lambda function. + // + // - Queue - The ARN of a standard SQS queue. + // + // - Bucket - The ARN of an Amazon S3 bucket. + // + // - Topic - The ARN of a standard SNS topic. + // + // - Event Bus - The ARN of an Amazon EventBridge event bus. + // + // S3 buckets are supported only for on-failure destinations. To retain records of + // successful invocations, use another destination type. + DestinationConfig *types.DestinationConfig + + // The maximum age of a request that Lambda sends to a function for processing. + MaximumEventAgeInSeconds *int32 + + // The maximum number of times to retry when the function returns an error. + MaximumRetryAttempts *int32 + + // A version number or alias name. + Qualifier *string + + noSmithyDocumentSerde +} + +type UpdateFunctionEventInvokeConfigOutput struct { + + // A destination for events after they have been sent to a function for processing. + // + // Destinations + // + // - Function - The Amazon Resource Name (ARN) of a Lambda function. + // + // - Queue - The ARN of a standard SQS queue. + // + // - Bucket - The ARN of an Amazon S3 bucket. + // + // - Topic - The ARN of a standard SNS topic. + // + // - Event Bus - The ARN of an Amazon EventBridge event bus. + // + // S3 buckets are supported only for on-failure destinations. To retain records of + // successful invocations, use another destination type. + DestinationConfig *types.DestinationConfig + + // The Amazon Resource Name (ARN) of the function. + FunctionArn *string + + // The date and time that the configuration was last updated. + LastModified *time.Time + + // The maximum age of a request that Lambda sends to a function for processing. + MaximumEventAgeInSeconds *int32 + + // The maximum number of times to retry when the function returns an error. + MaximumRetryAttempts *int32 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateFunctionEventInvokeConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateFunctionEventInvokeConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateFunctionEventInvokeConfig{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateFunctionEventInvokeConfig"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpUpdateFunctionEventInvokeConfigValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateFunctionEventInvokeConfig(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateFunctionEventInvokeConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateFunctionEventInvokeConfig", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_UpdateFunctionUrlConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_UpdateFunctionUrlConfig.go new file mode 100644 index 00000000..6d4d451a --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/api_op_UpdateFunctionUrlConfig.go @@ -0,0 +1,250 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/lambda/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates the configuration for a Lambda function URL. +func (c *Client) UpdateFunctionUrlConfig(ctx context.Context, params *UpdateFunctionUrlConfigInput, optFns ...func(*Options)) (*UpdateFunctionUrlConfigOutput, error) { + if params == nil { + params = &UpdateFunctionUrlConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateFunctionUrlConfig", params, optFns, c.addOperationUpdateFunctionUrlConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateFunctionUrlConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateFunctionUrlConfigInput struct { + + // The name or ARN of the Lambda function. + // + // Name formats + // + // - Function name – my-function . + // + // - Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function . + // + // - Partial ARN – 123456789012:function:my-function . + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. + // + // This member is required. + FunctionName *string + + // The type of authentication that your function URL uses. Set to AWS_IAM if you + // want to restrict access to authenticated users only. Set to NONE if you want to + // bypass IAM authentication to create a public endpoint. For more information, see + // [Security and auth model for Lambda function URLs]. + // + // [Security and auth model for Lambda function URLs]: https://docs.aws.amazon.com/lambda/latest/dg/urls-auth.html + AuthType types.FunctionUrlAuthType + + // The [cross-origin resource sharing (CORS)] settings for your function URL. + // + // [cross-origin resource sharing (CORS)]: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS + Cors *types.Cors + + // Use one of the following options: + // + // - BUFFERED – This is the default option. Lambda invokes your function using + // the Invoke API operation. Invocation results are available when the payload is + // complete. The maximum payload size is 6 MB. + // + // - RESPONSE_STREAM – Your function streams payload results as they become + // available. Lambda invokes your function using the InvokeWithResponseStream API + // operation. The maximum response payload size is 20 MB, however, you can [request a quota increase]. + // + // [request a quota increase]: https://docs.aws.amazon.com/servicequotas/latest/userguide/request-quota-increase.html + InvokeMode types.InvokeMode + + // The alias name. + Qualifier *string + + noSmithyDocumentSerde +} + +type UpdateFunctionUrlConfigOutput struct { + + // The type of authentication that your function URL uses. Set to AWS_IAM if you + // want to restrict access to authenticated users only. Set to NONE if you want to + // bypass IAM authentication to create a public endpoint. For more information, see + // [Security and auth model for Lambda function URLs]. + // + // [Security and auth model for Lambda function URLs]: https://docs.aws.amazon.com/lambda/latest/dg/urls-auth.html + // + // This member is required. + AuthType types.FunctionUrlAuthType + + // When the function URL was created, in [ISO-8601 format] (YYYY-MM-DDThh:mm:ss.sTZD). + // + // [ISO-8601 format]: https://www.w3.org/TR/NOTE-datetime + // + // This member is required. + CreationTime *string + + // The Amazon Resource Name (ARN) of your function. + // + // This member is required. + FunctionArn *string + + // The HTTP URL endpoint for your function. + // + // This member is required. + FunctionUrl *string + + // When the function URL configuration was last updated, in [ISO-8601 format] + // (YYYY-MM-DDThh:mm:ss.sTZD). + // + // [ISO-8601 format]: https://www.w3.org/TR/NOTE-datetime + // + // This member is required. + LastModifiedTime *string + + // The [cross-origin resource sharing (CORS)] settings for your function URL. + // + // [cross-origin resource sharing (CORS)]: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS + Cors *types.Cors + + // Use one of the following options: + // + // - BUFFERED – This is the default option. Lambda invokes your function using + // the Invoke API operation. Invocation results are available when the payload is + // complete. The maximum payload size is 6 MB. + // + // - RESPONSE_STREAM – Your function streams payload results as they become + // available. Lambda invokes your function using the InvokeWithResponseStream API + // operation. The maximum response payload size is 20 MB, however, you can [request a quota increase]. + // + // [request a quota increase]: https://docs.aws.amazon.com/servicequotas/latest/userguide/request-quota-increase.html + InvokeMode types.InvokeMode + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateFunctionUrlConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateFunctionUrlConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateFunctionUrlConfig{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateFunctionUrlConfig"); 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); 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 = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpUpdateFunctionUrlConfigValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateFunctionUrlConfig(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 = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateFunctionUrlConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateFunctionUrlConfig", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/auth.go new file mode 100644 index 00000000..a96cd4dc --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/auth.go @@ -0,0 +1,313 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +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" +) + +func bindAuthParamsRegion(_ interface{}, params *AuthResolverParameters, _ interface{}, options Options) { + params.Region = options.Region +} + +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 { + params := &AuthResolverParameters{ + Operation: operation, + } + + bindAuthParamsRegion(ctx, params, input, options) + + return params +} + +// 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, "lambda") + 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 := bindAuthResolverParams(ctx, m.operation, getOperationInput(ctx), m.options) + 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) { + for _, option := range options { + 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 +} + +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/lambda/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/deserializers.go new file mode 100644 index 00000000..c04976e2 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/deserializers.go @@ -0,0 +1,21699 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +import ( + "bytes" + "context" + "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/lambda/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" + "io/ioutil" + "math" + "strings" + "time" +) + +func deserializeS3Expires(v string) (*time.Time, error) { + t, err := smithytime.ParseHTTPDate(v) + if err != nil { + return nil, nil + } + return &t, nil +} + +type awsRestjson1_deserializeOpAddLayerVersionPermission struct { +} + +func (*awsRestjson1_deserializeOpAddLayerVersionPermission) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpAddLayerVersionPermission) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorAddLayerVersionPermission(response, &metadata) + } + output := &AddLayerVersionPermissionOutput{} + 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 = awsRestjson1_deserializeOpDocumentAddLayerVersionPermissionOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorAddLayerVersionPermission(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("PolicyLengthExceededException", errorCode): + return awsRestjson1_deserializeErrorPolicyLengthExceededException(response, errorBody) + + case strings.EqualFold("PreconditionFailedException", errorCode): + return awsRestjson1_deserializeErrorPreconditionFailedException(response, errorBody) + + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentAddLayerVersionPermissionOutput(v **AddLayerVersionPermissionOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *AddLayerVersionPermissionOutput + if *v == nil { + sv = &AddLayerVersionPermissionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "RevisionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RevisionId = ptr.String(jtv) + } + + case "Statement": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Statement = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpAddPermission struct { +} + +func (*awsRestjson1_deserializeOpAddPermission) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpAddPermission) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorAddPermission(response, &metadata) + } + output := &AddPermissionOutput{} + 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 = awsRestjson1_deserializeOpDocumentAddPermissionOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorAddPermission(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("PolicyLengthExceededException", errorCode): + return awsRestjson1_deserializeErrorPolicyLengthExceededException(response, errorBody) + + case strings.EqualFold("PreconditionFailedException", errorCode): + return awsRestjson1_deserializeErrorPreconditionFailedException(response, errorBody) + + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentAddPermissionOutput(v **AddPermissionOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *AddPermissionOutput + if *v == nil { + sv = &AddPermissionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Statement": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Statement = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpCreateAlias struct { +} + +func (*awsRestjson1_deserializeOpCreateAlias) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateAlias) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorCreateAlias(response, &metadata) + } + output := &CreateAliasOutput{} + 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 = awsRestjson1_deserializeOpDocumentCreateAliasOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorCreateAlias(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateAliasOutput(v **CreateAliasOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateAliasOutput + if *v == nil { + sv = &CreateAliasOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AliasArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value) + } + sv.AliasArn = 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 "FunctionVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Version to be of type string, got %T instead", value) + } + sv.FunctionVersion = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Alias to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "RevisionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RevisionId = ptr.String(jtv) + } + + case "RoutingConfig": + if err := awsRestjson1_deserializeDocumentAliasRoutingConfiguration(&sv.RoutingConfig, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpCreateCodeSigningConfig struct { +} + +func (*awsRestjson1_deserializeOpCreateCodeSigningConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateCodeSigningConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorCreateCodeSigningConfig(response, &metadata) + } + output := &CreateCodeSigningConfigOutput{} + 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 = awsRestjson1_deserializeOpDocumentCreateCodeSigningConfigOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorCreateCodeSigningConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateCodeSigningConfigOutput(v **CreateCodeSigningConfigOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateCodeSigningConfigOutput + if *v == nil { + sv = &CreateCodeSigningConfigOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CodeSigningConfig": + if err := awsRestjson1_deserializeDocumentCodeSigningConfig(&sv.CodeSigningConfig, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpCreateEventSourceMapping struct { +} + +func (*awsRestjson1_deserializeOpCreateEventSourceMapping) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateEventSourceMapping) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorCreateEventSourceMapping(response, &metadata) + } + output := &CreateEventSourceMappingOutput{} + 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 = awsRestjson1_deserializeOpDocumentCreateEventSourceMappingOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorCreateEventSourceMapping(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateEventSourceMappingOutput(v **CreateEventSourceMappingOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateEventSourceMappingOutput + if *v == nil { + sv = &CreateEventSourceMappingOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AmazonManagedKafkaEventSourceConfig": + if err := awsRestjson1_deserializeDocumentAmazonManagedKafkaEventSourceConfig(&sv.AmazonManagedKafkaEventSourceConfig, value); err != nil { + return err + } + + case "BatchSize": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected BatchSize to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.BatchSize = ptr.Int32(int32(i64)) + } + + case "BisectBatchOnFunctionError": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected BisectBatchOnFunctionError to be of type *bool, got %T instead", value) + } + sv.BisectBatchOnFunctionError = ptr.Bool(jtv) + } + + case "DestinationConfig": + if err := awsRestjson1_deserializeDocumentDestinationConfig(&sv.DestinationConfig, value); err != nil { + return err + } + + case "DocumentDBEventSourceConfig": + if err := awsRestjson1_deserializeDocumentDocumentDBEventSourceConfig(&sv.DocumentDBEventSourceConfig, value); err != nil { + return err + } + + case "EventSourceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.EventSourceArn = ptr.String(jtv) + } + + case "EventSourceMappingArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EventSourceMappingArn to be of type string, got %T instead", value) + } + sv.EventSourceMappingArn = ptr.String(jtv) + } + + case "FilterCriteria": + if err := awsRestjson1_deserializeDocumentFilterCriteria(&sv.FilterCriteria, value); err != nil { + return err + } + + case "FilterCriteriaError": + if err := awsRestjson1_deserializeDocumentFilterCriteriaError(&sv.FilterCriteriaError, value); err != nil { + return err + } + + case "FunctionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value) + } + sv.FunctionArn = ptr.String(jtv) + } + + case "FunctionResponseTypes": + if err := awsRestjson1_deserializeDocumentFunctionResponseTypeList(&sv.FunctionResponseTypes, value); err != nil { + return err + } + + case "KMSKeyArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected KMSKeyArn to be of type string, got %T instead", value) + } + sv.KMSKeyArn = 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 Date to be a JSON Number, got %T instead", value) + + } + } + + case "LastProcessingResult": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.LastProcessingResult = ptr.String(jtv) + } + + case "MaximumBatchingWindowInSeconds": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MaximumBatchingWindowInSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaximumBatchingWindowInSeconds = ptr.Int32(int32(i64)) + } + + case "MaximumRecordAgeInSeconds": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MaximumRecordAgeInSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaximumRecordAgeInSeconds = ptr.Int32(int32(i64)) + } + + case "MaximumRetryAttempts": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MaximumRetryAttemptsEventSourceMapping to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaximumRetryAttempts = ptr.Int32(int32(i64)) + } + + case "MetricsConfig": + if err := awsRestjson1_deserializeDocumentEventSourceMappingMetricsConfig(&sv.MetricsConfig, value); err != nil { + return err + } + + case "ParallelizationFactor": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ParallelizationFactor to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ParallelizationFactor = ptr.Int32(int32(i64)) + } + + case "ProvisionedPollerConfig": + if err := awsRestjson1_deserializeDocumentProvisionedPollerConfig(&sv.ProvisionedPollerConfig, value); err != nil { + return err + } + + case "Queues": + if err := awsRestjson1_deserializeDocumentQueues(&sv.Queues, value); err != nil { + return err + } + + case "ScalingConfig": + if err := awsRestjson1_deserializeDocumentScalingConfig(&sv.ScalingConfig, value); err != nil { + return err + } + + case "SelfManagedEventSource": + if err := awsRestjson1_deserializeDocumentSelfManagedEventSource(&sv.SelfManagedEventSource, value); err != nil { + return err + } + + case "SelfManagedKafkaEventSourceConfig": + if err := awsRestjson1_deserializeDocumentSelfManagedKafkaEventSourceConfig(&sv.SelfManagedKafkaEventSourceConfig, value); err != nil { + return err + } + + case "SourceAccessConfigurations": + if err := awsRestjson1_deserializeDocumentSourceAccessConfigurations(&sv.SourceAccessConfigurations, value); err != nil { + return err + } + + case "StartingPosition": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EventSourcePosition to be of type string, got %T instead", value) + } + sv.StartingPosition = types.EventSourcePosition(jtv) + } + + case "StartingPositionTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartingPositionTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + + } + } + + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.State = ptr.String(jtv) + } + + case "StateTransitionReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.StateTransitionReason = ptr.String(jtv) + } + + case "Topics": + if err := awsRestjson1_deserializeDocumentTopics(&sv.Topics, value); err != nil { + return err + } + + case "TumblingWindowInSeconds": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected TumblingWindowInSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TumblingWindowInSeconds = ptr.Int32(int32(i64)) + } + + case "UUID": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.UUID = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpCreateFunction struct { +} + +func (*awsRestjson1_deserializeOpCreateFunction) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateFunction) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorCreateFunction(response, &metadata) + } + output := &CreateFunctionOutput{} + 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 = awsRestjson1_deserializeOpDocumentCreateFunctionOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorCreateFunction(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("CodeSigningConfigNotFoundException", errorCode): + return awsRestjson1_deserializeErrorCodeSigningConfigNotFoundException(response, errorBody) + + case strings.EqualFold("CodeStorageExceededException", errorCode): + return awsRestjson1_deserializeErrorCodeStorageExceededException(response, errorBody) + + case strings.EqualFold("CodeVerificationFailedException", errorCode): + return awsRestjson1_deserializeErrorCodeVerificationFailedException(response, errorBody) + + case strings.EqualFold("InvalidCodeSignatureException", errorCode): + return awsRestjson1_deserializeErrorInvalidCodeSignatureException(response, errorBody) + + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateFunctionOutput(v **CreateFunctionOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateFunctionOutput + if *v == nil { + sv = &CreateFunctionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Architectures": + if err := awsRestjson1_deserializeDocumentArchitecturesList(&sv.Architectures, value); err != nil { + return err + } + + case "CodeSha256": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.CodeSha256 = ptr.String(jtv) + } + + case "CodeSize": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.CodeSize = i64 + } + + case "DeadLetterConfig": + if err := awsRestjson1_deserializeDocumentDeadLetterConfig(&sv.DeadLetterConfig, value); err != nil { + return err + } + + 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 "Environment": + if err := awsRestjson1_deserializeDocumentEnvironmentResponse(&sv.Environment, value); err != nil { + return err + } + + case "EphemeralStorage": + if err := awsRestjson1_deserializeDocumentEphemeralStorage(&sv.EphemeralStorage, value); err != nil { + return err + } + + case "FileSystemConfigs": + if err := awsRestjson1_deserializeDocumentFileSystemConfigList(&sv.FileSystemConfigs, value); err != nil { + return err + } + + case "FunctionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NameSpacedFunctionArn to be of type string, got %T instead", value) + } + sv.FunctionArn = ptr.String(jtv) + } + + case "FunctionName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NamespacedFunctionName to be of type string, got %T instead", value) + } + sv.FunctionName = ptr.String(jtv) + } + + case "Handler": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Handler to be of type string, got %T instead", value) + } + sv.Handler = ptr.String(jtv) + } + + case "ImageConfigResponse": + if err := awsRestjson1_deserializeDocumentImageConfigResponse(&sv.ImageConfigResponse, value); err != nil { + return err + } + + case "KMSKeyArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected KMSKeyArn to be of type string, got %T instead", value) + } + sv.KMSKeyArn = ptr.String(jtv) + } + + case "LastModified": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + sv.LastModified = ptr.String(jtv) + } + + case "LastUpdateStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LastUpdateStatus to be of type string, got %T instead", value) + } + sv.LastUpdateStatus = types.LastUpdateStatus(jtv) + } + + case "LastUpdateStatusReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LastUpdateStatusReason to be of type string, got %T instead", value) + } + sv.LastUpdateStatusReason = ptr.String(jtv) + } + + case "LastUpdateStatusReasonCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LastUpdateStatusReasonCode to be of type string, got %T instead", value) + } + sv.LastUpdateStatusReasonCode = types.LastUpdateStatusReasonCode(jtv) + } + + case "Layers": + if err := awsRestjson1_deserializeDocumentLayersReferenceList(&sv.Layers, value); err != nil { + return err + } + + case "LoggingConfig": + if err := awsRestjson1_deserializeDocumentLoggingConfig(&sv.LoggingConfig, value); err != nil { + return err + } + + case "MasterArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value) + } + sv.MasterArn = ptr.String(jtv) + } + + case "MemorySize": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MemorySize to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MemorySize = ptr.Int32(int32(i64)) + } + + case "PackageType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PackageType to be of type string, got %T instead", value) + } + sv.PackageType = types.PackageType(jtv) + } + + case "RevisionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RevisionId = ptr.String(jtv) + } + + case "Role": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value) + } + sv.Role = ptr.String(jtv) + } + + case "Runtime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Runtime to be of type string, got %T instead", value) + } + sv.Runtime = types.Runtime(jtv) + } + + case "RuntimeVersionConfig": + if err := awsRestjson1_deserializeDocumentRuntimeVersionConfig(&sv.RuntimeVersionConfig, value); err != nil { + return err + } + + case "SigningJobArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.SigningJobArn = ptr.String(jtv) + } + + case "SigningProfileVersionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.SigningProfileVersionArn = ptr.String(jtv) + } + + case "SnapStart": + if err := awsRestjson1_deserializeDocumentSnapStartResponse(&sv.SnapStart, value); err != nil { + return err + } + + 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 "StateReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StateReason to be of type string, got %T instead", value) + } + sv.StateReason = ptr.String(jtv) + } + + case "StateReasonCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StateReasonCode to be of type string, got %T instead", value) + } + sv.StateReasonCode = types.StateReasonCode(jtv) + } + + case "Timeout": + 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.Timeout = ptr.Int32(int32(i64)) + } + + case "TracingConfig": + if err := awsRestjson1_deserializeDocumentTracingConfigResponse(&sv.TracingConfig, value); err != nil { + return err + } + + case "Version": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Version to be of type string, got %T instead", value) + } + sv.Version = ptr.String(jtv) + } + + case "VpcConfig": + if err := awsRestjson1_deserializeDocumentVpcConfigResponse(&sv.VpcConfig, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpCreateFunctionUrlConfig struct { +} + +func (*awsRestjson1_deserializeOpCreateFunctionUrlConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateFunctionUrlConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorCreateFunctionUrlConfig(response, &metadata) + } + output := &CreateFunctionUrlConfigOutput{} + 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 = awsRestjson1_deserializeOpDocumentCreateFunctionUrlConfigOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorCreateFunctionUrlConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateFunctionUrlConfigOutput(v **CreateFunctionUrlConfigOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateFunctionUrlConfigOutput + if *v == nil { + sv = &CreateFunctionUrlConfigOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AuthType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FunctionUrlAuthType to be of type string, got %T instead", value) + } + sv.AuthType = types.FunctionUrlAuthType(jtv) + } + + case "Cors": + if err := awsRestjson1_deserializeDocumentCors(&sv.Cors, value); err != nil { + return err + } + + case "CreationTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + sv.CreationTime = ptr.String(jtv) + } + + case "FunctionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value) + } + sv.FunctionArn = ptr.String(jtv) + } + + case "FunctionUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FunctionUrl to be of type string, got %T instead", value) + } + sv.FunctionUrl = ptr.String(jtv) + } + + case "InvokeMode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InvokeMode to be of type string, got %T instead", value) + } + sv.InvokeMode = types.InvokeMode(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDeleteAlias struct { +} + +func (*awsRestjson1_deserializeOpDeleteAlias) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteAlias) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorDeleteAlias(response, &metadata) + } + output := &DeleteAliasOutput{} + 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), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteAlias(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpDeleteCodeSigningConfig struct { +} + +func (*awsRestjson1_deserializeOpDeleteCodeSigningConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteCodeSigningConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorDeleteCodeSigningConfig(response, &metadata) + } + output := &DeleteCodeSigningConfigOutput{} + out.Result = output + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteCodeSigningConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpDeleteEventSourceMapping struct { +} + +func (*awsRestjson1_deserializeOpDeleteEventSourceMapping) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteEventSourceMapping) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorDeleteEventSourceMapping(response, &metadata) + } + output := &DeleteEventSourceMappingOutput{} + 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 = awsRestjson1_deserializeOpDocumentDeleteEventSourceMappingOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteEventSourceMapping(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) + + case strings.EqualFold("ResourceInUseException", errorCode): + return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDeleteEventSourceMappingOutput(v **DeleteEventSourceMappingOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeleteEventSourceMappingOutput + if *v == nil { + sv = &DeleteEventSourceMappingOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AmazonManagedKafkaEventSourceConfig": + if err := awsRestjson1_deserializeDocumentAmazonManagedKafkaEventSourceConfig(&sv.AmazonManagedKafkaEventSourceConfig, value); err != nil { + return err + } + + case "BatchSize": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected BatchSize to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.BatchSize = ptr.Int32(int32(i64)) + } + + case "BisectBatchOnFunctionError": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected BisectBatchOnFunctionError to be of type *bool, got %T instead", value) + } + sv.BisectBatchOnFunctionError = ptr.Bool(jtv) + } + + case "DestinationConfig": + if err := awsRestjson1_deserializeDocumentDestinationConfig(&sv.DestinationConfig, value); err != nil { + return err + } + + case "DocumentDBEventSourceConfig": + if err := awsRestjson1_deserializeDocumentDocumentDBEventSourceConfig(&sv.DocumentDBEventSourceConfig, value); err != nil { + return err + } + + case "EventSourceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.EventSourceArn = ptr.String(jtv) + } + + case "EventSourceMappingArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EventSourceMappingArn to be of type string, got %T instead", value) + } + sv.EventSourceMappingArn = ptr.String(jtv) + } + + case "FilterCriteria": + if err := awsRestjson1_deserializeDocumentFilterCriteria(&sv.FilterCriteria, value); err != nil { + return err + } + + case "FilterCriteriaError": + if err := awsRestjson1_deserializeDocumentFilterCriteriaError(&sv.FilterCriteriaError, value); err != nil { + return err + } + + case "FunctionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value) + } + sv.FunctionArn = ptr.String(jtv) + } + + case "FunctionResponseTypes": + if err := awsRestjson1_deserializeDocumentFunctionResponseTypeList(&sv.FunctionResponseTypes, value); err != nil { + return err + } + + case "KMSKeyArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected KMSKeyArn to be of type string, got %T instead", value) + } + sv.KMSKeyArn = 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 Date to be a JSON Number, got %T instead", value) + + } + } + + case "LastProcessingResult": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.LastProcessingResult = ptr.String(jtv) + } + + case "MaximumBatchingWindowInSeconds": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MaximumBatchingWindowInSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaximumBatchingWindowInSeconds = ptr.Int32(int32(i64)) + } + + case "MaximumRecordAgeInSeconds": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MaximumRecordAgeInSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaximumRecordAgeInSeconds = ptr.Int32(int32(i64)) + } + + case "MaximumRetryAttempts": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MaximumRetryAttemptsEventSourceMapping to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaximumRetryAttempts = ptr.Int32(int32(i64)) + } + + case "MetricsConfig": + if err := awsRestjson1_deserializeDocumentEventSourceMappingMetricsConfig(&sv.MetricsConfig, value); err != nil { + return err + } + + case "ParallelizationFactor": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ParallelizationFactor to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ParallelizationFactor = ptr.Int32(int32(i64)) + } + + case "ProvisionedPollerConfig": + if err := awsRestjson1_deserializeDocumentProvisionedPollerConfig(&sv.ProvisionedPollerConfig, value); err != nil { + return err + } + + case "Queues": + if err := awsRestjson1_deserializeDocumentQueues(&sv.Queues, value); err != nil { + return err + } + + case "ScalingConfig": + if err := awsRestjson1_deserializeDocumentScalingConfig(&sv.ScalingConfig, value); err != nil { + return err + } + + case "SelfManagedEventSource": + if err := awsRestjson1_deserializeDocumentSelfManagedEventSource(&sv.SelfManagedEventSource, value); err != nil { + return err + } + + case "SelfManagedKafkaEventSourceConfig": + if err := awsRestjson1_deserializeDocumentSelfManagedKafkaEventSourceConfig(&sv.SelfManagedKafkaEventSourceConfig, value); err != nil { + return err + } + + case "SourceAccessConfigurations": + if err := awsRestjson1_deserializeDocumentSourceAccessConfigurations(&sv.SourceAccessConfigurations, value); err != nil { + return err + } + + case "StartingPosition": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EventSourcePosition to be of type string, got %T instead", value) + } + sv.StartingPosition = types.EventSourcePosition(jtv) + } + + case "StartingPositionTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartingPositionTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + + } + } + + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.State = ptr.String(jtv) + } + + case "StateTransitionReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.StateTransitionReason = ptr.String(jtv) + } + + case "Topics": + if err := awsRestjson1_deserializeDocumentTopics(&sv.Topics, value); err != nil { + return err + } + + case "TumblingWindowInSeconds": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected TumblingWindowInSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TumblingWindowInSeconds = ptr.Int32(int32(i64)) + } + + case "UUID": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.UUID = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDeleteFunction struct { +} + +func (*awsRestjson1_deserializeOpDeleteFunction) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteFunction) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorDeleteFunction(response, &metadata) + } + output := &DeleteFunctionOutput{} + 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), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteFunction(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpDeleteFunctionCodeSigningConfig struct { +} + +func (*awsRestjson1_deserializeOpDeleteFunctionCodeSigningConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteFunctionCodeSigningConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorDeleteFunctionCodeSigningConfig(response, &metadata) + } + output := &DeleteFunctionCodeSigningConfigOutput{} + 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), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteFunctionCodeSigningConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("CodeSigningConfigNotFoundException", errorCode): + return awsRestjson1_deserializeErrorCodeSigningConfigNotFoundException(response, errorBody) + + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpDeleteFunctionConcurrency struct { +} + +func (*awsRestjson1_deserializeOpDeleteFunctionConcurrency) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteFunctionConcurrency) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorDeleteFunctionConcurrency(response, &metadata) + } + output := &DeleteFunctionConcurrencyOutput{} + 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), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteFunctionConcurrency(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpDeleteFunctionEventInvokeConfig struct { +} + +func (*awsRestjson1_deserializeOpDeleteFunctionEventInvokeConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteFunctionEventInvokeConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorDeleteFunctionEventInvokeConfig(response, &metadata) + } + output := &DeleteFunctionEventInvokeConfigOutput{} + 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), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteFunctionEventInvokeConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpDeleteFunctionUrlConfig struct { +} + +func (*awsRestjson1_deserializeOpDeleteFunctionUrlConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteFunctionUrlConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorDeleteFunctionUrlConfig(response, &metadata) + } + output := &DeleteFunctionUrlConfigOutput{} + 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), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteFunctionUrlConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpDeleteLayerVersion struct { +} + +func (*awsRestjson1_deserializeOpDeleteLayerVersion) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteLayerVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorDeleteLayerVersion(response, &metadata) + } + output := &DeleteLayerVersionOutput{} + 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), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteLayerVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpDeleteProvisionedConcurrencyConfig struct { +} + +func (*awsRestjson1_deserializeOpDeleteProvisionedConcurrencyConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteProvisionedConcurrencyConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorDeleteProvisionedConcurrencyConfig(response, &metadata) + } + output := &DeleteProvisionedConcurrencyConfigOutput{} + 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), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteProvisionedConcurrencyConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpGetAccountSettings struct { +} + +func (*awsRestjson1_deserializeOpGetAccountSettings) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetAccountSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorGetAccountSettings(response, &metadata) + } + output := &GetAccountSettingsOutput{} + 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 = awsRestjson1_deserializeOpDocumentGetAccountSettingsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetAccountSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetAccountSettingsOutput(v **GetAccountSettingsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetAccountSettingsOutput + if *v == nil { + sv = &GetAccountSettingsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AccountLimit": + if err := awsRestjson1_deserializeDocumentAccountLimit(&sv.AccountLimit, value); err != nil { + return err + } + + case "AccountUsage": + if err := awsRestjson1_deserializeDocumentAccountUsage(&sv.AccountUsage, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetAlias struct { +} + +func (*awsRestjson1_deserializeOpGetAlias) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetAlias) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorGetAlias(response, &metadata) + } + output := &GetAliasOutput{} + 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 = awsRestjson1_deserializeOpDocumentGetAliasOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetAlias(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetAliasOutput(v **GetAliasOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetAliasOutput + if *v == nil { + sv = &GetAliasOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AliasArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value) + } + sv.AliasArn = 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 "FunctionVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Version to be of type string, got %T instead", value) + } + sv.FunctionVersion = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Alias to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "RevisionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RevisionId = ptr.String(jtv) + } + + case "RoutingConfig": + if err := awsRestjson1_deserializeDocumentAliasRoutingConfiguration(&sv.RoutingConfig, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetCodeSigningConfig struct { +} + +func (*awsRestjson1_deserializeOpGetCodeSigningConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetCodeSigningConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorGetCodeSigningConfig(response, &metadata) + } + output := &GetCodeSigningConfigOutput{} + 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 = awsRestjson1_deserializeOpDocumentGetCodeSigningConfigOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetCodeSigningConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetCodeSigningConfigOutput(v **GetCodeSigningConfigOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetCodeSigningConfigOutput + if *v == nil { + sv = &GetCodeSigningConfigOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CodeSigningConfig": + if err := awsRestjson1_deserializeDocumentCodeSigningConfig(&sv.CodeSigningConfig, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetEventSourceMapping struct { +} + +func (*awsRestjson1_deserializeOpGetEventSourceMapping) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetEventSourceMapping) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorGetEventSourceMapping(response, &metadata) + } + output := &GetEventSourceMappingOutput{} + 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 = awsRestjson1_deserializeOpDocumentGetEventSourceMappingOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetEventSourceMapping(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetEventSourceMappingOutput(v **GetEventSourceMappingOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetEventSourceMappingOutput + if *v == nil { + sv = &GetEventSourceMappingOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AmazonManagedKafkaEventSourceConfig": + if err := awsRestjson1_deserializeDocumentAmazonManagedKafkaEventSourceConfig(&sv.AmazonManagedKafkaEventSourceConfig, value); err != nil { + return err + } + + case "BatchSize": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected BatchSize to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.BatchSize = ptr.Int32(int32(i64)) + } + + case "BisectBatchOnFunctionError": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected BisectBatchOnFunctionError to be of type *bool, got %T instead", value) + } + sv.BisectBatchOnFunctionError = ptr.Bool(jtv) + } + + case "DestinationConfig": + if err := awsRestjson1_deserializeDocumentDestinationConfig(&sv.DestinationConfig, value); err != nil { + return err + } + + case "DocumentDBEventSourceConfig": + if err := awsRestjson1_deserializeDocumentDocumentDBEventSourceConfig(&sv.DocumentDBEventSourceConfig, value); err != nil { + return err + } + + case "EventSourceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.EventSourceArn = ptr.String(jtv) + } + + case "EventSourceMappingArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EventSourceMappingArn to be of type string, got %T instead", value) + } + sv.EventSourceMappingArn = ptr.String(jtv) + } + + case "FilterCriteria": + if err := awsRestjson1_deserializeDocumentFilterCriteria(&sv.FilterCriteria, value); err != nil { + return err + } + + case "FilterCriteriaError": + if err := awsRestjson1_deserializeDocumentFilterCriteriaError(&sv.FilterCriteriaError, value); err != nil { + return err + } + + case "FunctionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value) + } + sv.FunctionArn = ptr.String(jtv) + } + + case "FunctionResponseTypes": + if err := awsRestjson1_deserializeDocumentFunctionResponseTypeList(&sv.FunctionResponseTypes, value); err != nil { + return err + } + + case "KMSKeyArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected KMSKeyArn to be of type string, got %T instead", value) + } + sv.KMSKeyArn = 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 Date to be a JSON Number, got %T instead", value) + + } + } + + case "LastProcessingResult": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.LastProcessingResult = ptr.String(jtv) + } + + case "MaximumBatchingWindowInSeconds": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MaximumBatchingWindowInSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaximumBatchingWindowInSeconds = ptr.Int32(int32(i64)) + } + + case "MaximumRecordAgeInSeconds": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MaximumRecordAgeInSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaximumRecordAgeInSeconds = ptr.Int32(int32(i64)) + } + + case "MaximumRetryAttempts": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MaximumRetryAttemptsEventSourceMapping to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaximumRetryAttempts = ptr.Int32(int32(i64)) + } + + case "MetricsConfig": + if err := awsRestjson1_deserializeDocumentEventSourceMappingMetricsConfig(&sv.MetricsConfig, value); err != nil { + return err + } + + case "ParallelizationFactor": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ParallelizationFactor to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ParallelizationFactor = ptr.Int32(int32(i64)) + } + + case "ProvisionedPollerConfig": + if err := awsRestjson1_deserializeDocumentProvisionedPollerConfig(&sv.ProvisionedPollerConfig, value); err != nil { + return err + } + + case "Queues": + if err := awsRestjson1_deserializeDocumentQueues(&sv.Queues, value); err != nil { + return err + } + + case "ScalingConfig": + if err := awsRestjson1_deserializeDocumentScalingConfig(&sv.ScalingConfig, value); err != nil { + return err + } + + case "SelfManagedEventSource": + if err := awsRestjson1_deserializeDocumentSelfManagedEventSource(&sv.SelfManagedEventSource, value); err != nil { + return err + } + + case "SelfManagedKafkaEventSourceConfig": + if err := awsRestjson1_deserializeDocumentSelfManagedKafkaEventSourceConfig(&sv.SelfManagedKafkaEventSourceConfig, value); err != nil { + return err + } + + case "SourceAccessConfigurations": + if err := awsRestjson1_deserializeDocumentSourceAccessConfigurations(&sv.SourceAccessConfigurations, value); err != nil { + return err + } + + case "StartingPosition": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EventSourcePosition to be of type string, got %T instead", value) + } + sv.StartingPosition = types.EventSourcePosition(jtv) + } + + case "StartingPositionTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartingPositionTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + + } + } + + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.State = ptr.String(jtv) + } + + case "StateTransitionReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.StateTransitionReason = ptr.String(jtv) + } + + case "Topics": + if err := awsRestjson1_deserializeDocumentTopics(&sv.Topics, value); err != nil { + return err + } + + case "TumblingWindowInSeconds": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected TumblingWindowInSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TumblingWindowInSeconds = ptr.Int32(int32(i64)) + } + + case "UUID": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.UUID = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetFunction struct { +} + +func (*awsRestjson1_deserializeOpGetFunction) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetFunction) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorGetFunction(response, &metadata) + } + output := &GetFunctionOutput{} + 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 = awsRestjson1_deserializeOpDocumentGetFunctionOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetFunction(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetFunctionOutput(v **GetFunctionOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetFunctionOutput + if *v == nil { + sv = &GetFunctionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Code": + if err := awsRestjson1_deserializeDocumentFunctionCodeLocation(&sv.Code, value); err != nil { + return err + } + + case "Concurrency": + if err := awsRestjson1_deserializeDocumentConcurrency(&sv.Concurrency, value); err != nil { + return err + } + + case "Configuration": + if err := awsRestjson1_deserializeDocumentFunctionConfiguration(&sv.Configuration, value); err != nil { + return err + } + + case "Tags": + if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { + return err + } + + case "TagsError": + if err := awsRestjson1_deserializeDocumentTagsError(&sv.TagsError, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetFunctionCodeSigningConfig struct { +} + +func (*awsRestjson1_deserializeOpGetFunctionCodeSigningConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetFunctionCodeSigningConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorGetFunctionCodeSigningConfig(response, &metadata) + } + output := &GetFunctionCodeSigningConfigOutput{} + 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 = awsRestjson1_deserializeOpDocumentGetFunctionCodeSigningConfigOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetFunctionCodeSigningConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetFunctionCodeSigningConfigOutput(v **GetFunctionCodeSigningConfigOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetFunctionCodeSigningConfigOutput + if *v == nil { + sv = &GetFunctionCodeSigningConfigOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CodeSigningConfigArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CodeSigningConfigArn to be of type string, got %T instead", value) + } + sv.CodeSigningConfigArn = ptr.String(jtv) + } + + case "FunctionName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FunctionName to be of type string, got %T instead", value) + } + sv.FunctionName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetFunctionConcurrency struct { +} + +func (*awsRestjson1_deserializeOpGetFunctionConcurrency) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetFunctionConcurrency) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorGetFunctionConcurrency(response, &metadata) + } + output := &GetFunctionConcurrencyOutput{} + 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 = awsRestjson1_deserializeOpDocumentGetFunctionConcurrencyOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetFunctionConcurrency(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetFunctionConcurrencyOutput(v **GetFunctionConcurrencyOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetFunctionConcurrencyOutput + if *v == nil { + sv = &GetFunctionConcurrencyOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ReservedConcurrentExecutions": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ReservedConcurrentExecutions to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ReservedConcurrentExecutions = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetFunctionConfiguration struct { +} + +func (*awsRestjson1_deserializeOpGetFunctionConfiguration) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetFunctionConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorGetFunctionConfiguration(response, &metadata) + } + output := &GetFunctionConfigurationOutput{} + 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 = awsRestjson1_deserializeOpDocumentGetFunctionConfigurationOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetFunctionConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetFunctionConfigurationOutput(v **GetFunctionConfigurationOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetFunctionConfigurationOutput + if *v == nil { + sv = &GetFunctionConfigurationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Architectures": + if err := awsRestjson1_deserializeDocumentArchitecturesList(&sv.Architectures, value); err != nil { + return err + } + + case "CodeSha256": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.CodeSha256 = ptr.String(jtv) + } + + case "CodeSize": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.CodeSize = i64 + } + + case "DeadLetterConfig": + if err := awsRestjson1_deserializeDocumentDeadLetterConfig(&sv.DeadLetterConfig, value); err != nil { + return err + } + + 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 "Environment": + if err := awsRestjson1_deserializeDocumentEnvironmentResponse(&sv.Environment, value); err != nil { + return err + } + + case "EphemeralStorage": + if err := awsRestjson1_deserializeDocumentEphemeralStorage(&sv.EphemeralStorage, value); err != nil { + return err + } + + case "FileSystemConfigs": + if err := awsRestjson1_deserializeDocumentFileSystemConfigList(&sv.FileSystemConfigs, value); err != nil { + return err + } + + case "FunctionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NameSpacedFunctionArn to be of type string, got %T instead", value) + } + sv.FunctionArn = ptr.String(jtv) + } + + case "FunctionName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NamespacedFunctionName to be of type string, got %T instead", value) + } + sv.FunctionName = ptr.String(jtv) + } + + case "Handler": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Handler to be of type string, got %T instead", value) + } + sv.Handler = ptr.String(jtv) + } + + case "ImageConfigResponse": + if err := awsRestjson1_deserializeDocumentImageConfigResponse(&sv.ImageConfigResponse, value); err != nil { + return err + } + + case "KMSKeyArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected KMSKeyArn to be of type string, got %T instead", value) + } + sv.KMSKeyArn = ptr.String(jtv) + } + + case "LastModified": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + sv.LastModified = ptr.String(jtv) + } + + case "LastUpdateStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LastUpdateStatus to be of type string, got %T instead", value) + } + sv.LastUpdateStatus = types.LastUpdateStatus(jtv) + } + + case "LastUpdateStatusReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LastUpdateStatusReason to be of type string, got %T instead", value) + } + sv.LastUpdateStatusReason = ptr.String(jtv) + } + + case "LastUpdateStatusReasonCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LastUpdateStatusReasonCode to be of type string, got %T instead", value) + } + sv.LastUpdateStatusReasonCode = types.LastUpdateStatusReasonCode(jtv) + } + + case "Layers": + if err := awsRestjson1_deserializeDocumentLayersReferenceList(&sv.Layers, value); err != nil { + return err + } + + case "LoggingConfig": + if err := awsRestjson1_deserializeDocumentLoggingConfig(&sv.LoggingConfig, value); err != nil { + return err + } + + case "MasterArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value) + } + sv.MasterArn = ptr.String(jtv) + } + + case "MemorySize": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MemorySize to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MemorySize = ptr.Int32(int32(i64)) + } + + case "PackageType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PackageType to be of type string, got %T instead", value) + } + sv.PackageType = types.PackageType(jtv) + } + + case "RevisionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RevisionId = ptr.String(jtv) + } + + case "Role": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value) + } + sv.Role = ptr.String(jtv) + } + + case "Runtime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Runtime to be of type string, got %T instead", value) + } + sv.Runtime = types.Runtime(jtv) + } + + case "RuntimeVersionConfig": + if err := awsRestjson1_deserializeDocumentRuntimeVersionConfig(&sv.RuntimeVersionConfig, value); err != nil { + return err + } + + case "SigningJobArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.SigningJobArn = ptr.String(jtv) + } + + case "SigningProfileVersionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.SigningProfileVersionArn = ptr.String(jtv) + } + + case "SnapStart": + if err := awsRestjson1_deserializeDocumentSnapStartResponse(&sv.SnapStart, value); err != nil { + return err + } + + 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 "StateReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StateReason to be of type string, got %T instead", value) + } + sv.StateReason = ptr.String(jtv) + } + + case "StateReasonCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StateReasonCode to be of type string, got %T instead", value) + } + sv.StateReasonCode = types.StateReasonCode(jtv) + } + + case "Timeout": + 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.Timeout = ptr.Int32(int32(i64)) + } + + case "TracingConfig": + if err := awsRestjson1_deserializeDocumentTracingConfigResponse(&sv.TracingConfig, value); err != nil { + return err + } + + case "Version": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Version to be of type string, got %T instead", value) + } + sv.Version = ptr.String(jtv) + } + + case "VpcConfig": + if err := awsRestjson1_deserializeDocumentVpcConfigResponse(&sv.VpcConfig, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetFunctionEventInvokeConfig struct { +} + +func (*awsRestjson1_deserializeOpGetFunctionEventInvokeConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetFunctionEventInvokeConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorGetFunctionEventInvokeConfig(response, &metadata) + } + output := &GetFunctionEventInvokeConfigOutput{} + 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 = awsRestjson1_deserializeOpDocumentGetFunctionEventInvokeConfigOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetFunctionEventInvokeConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetFunctionEventInvokeConfigOutput(v **GetFunctionEventInvokeConfigOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetFunctionEventInvokeConfigOutput + if *v == nil { + sv = &GetFunctionEventInvokeConfigOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DestinationConfig": + if err := awsRestjson1_deserializeDocumentDestinationConfig(&sv.DestinationConfig, value); err != nil { + return err + } + + case "FunctionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value) + } + sv.FunctionArn = 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 Date to be a JSON Number, got %T instead", value) + + } + } + + case "MaximumEventAgeInSeconds": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MaximumEventAgeInSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaximumEventAgeInSeconds = ptr.Int32(int32(i64)) + } + + case "MaximumRetryAttempts": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MaximumRetryAttempts to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaximumRetryAttempts = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetFunctionRecursionConfig struct { +} + +func (*awsRestjson1_deserializeOpGetFunctionRecursionConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetFunctionRecursionConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorGetFunctionRecursionConfig(response, &metadata) + } + output := &GetFunctionRecursionConfigOutput{} + 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 = awsRestjson1_deserializeOpDocumentGetFunctionRecursionConfigOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetFunctionRecursionConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetFunctionRecursionConfigOutput(v **GetFunctionRecursionConfigOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetFunctionRecursionConfigOutput + if *v == nil { + sv = &GetFunctionRecursionConfigOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "RecursiveLoop": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RecursiveLoop to be of type string, got %T instead", value) + } + sv.RecursiveLoop = types.RecursiveLoop(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetFunctionUrlConfig struct { +} + +func (*awsRestjson1_deserializeOpGetFunctionUrlConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetFunctionUrlConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorGetFunctionUrlConfig(response, &metadata) + } + output := &GetFunctionUrlConfigOutput{} + 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 = awsRestjson1_deserializeOpDocumentGetFunctionUrlConfigOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetFunctionUrlConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetFunctionUrlConfigOutput(v **GetFunctionUrlConfigOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetFunctionUrlConfigOutput + if *v == nil { + sv = &GetFunctionUrlConfigOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AuthType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FunctionUrlAuthType to be of type string, got %T instead", value) + } + sv.AuthType = types.FunctionUrlAuthType(jtv) + } + + case "Cors": + if err := awsRestjson1_deserializeDocumentCors(&sv.Cors, value); err != nil { + return err + } + + case "CreationTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + sv.CreationTime = ptr.String(jtv) + } + + case "FunctionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value) + } + sv.FunctionArn = ptr.String(jtv) + } + + case "FunctionUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FunctionUrl to be of type string, got %T instead", value) + } + sv.FunctionUrl = ptr.String(jtv) + } + + case "InvokeMode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InvokeMode to be of type string, got %T instead", value) + } + sv.InvokeMode = types.InvokeMode(jtv) + } + + case "LastModifiedTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + sv.LastModifiedTime = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetLayerVersion struct { +} + +func (*awsRestjson1_deserializeOpGetLayerVersion) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetLayerVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorGetLayerVersion(response, &metadata) + } + output := &GetLayerVersionOutput{} + 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 = awsRestjson1_deserializeOpDocumentGetLayerVersionOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetLayerVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetLayerVersionOutput(v **GetLayerVersionOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetLayerVersionOutput + if *v == nil { + sv = &GetLayerVersionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CompatibleArchitectures": + if err := awsRestjson1_deserializeDocumentCompatibleArchitectures(&sv.CompatibleArchitectures, value); err != nil { + return err + } + + case "CompatibleRuntimes": + if err := awsRestjson1_deserializeDocumentCompatibleRuntimes(&sv.CompatibleRuntimes, value); err != nil { + return err + } + + case "Content": + if err := awsRestjson1_deserializeDocumentLayerVersionContentOutput(&sv.Content, value); err != nil { + return err + } + + case "CreatedDate": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + sv.CreatedDate = 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 "LayerArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LayerArn to be of type string, got %T instead", value) + } + sv.LayerArn = ptr.String(jtv) + } + + case "LayerVersionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LayerVersionArn to be of type string, got %T instead", value) + } + sv.LayerVersionArn = ptr.String(jtv) + } + + case "LicenseInfo": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LicenseInfo to be of type string, got %T instead", value) + } + sv.LicenseInfo = ptr.String(jtv) + } + + case "Version": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected LayerVersionNumber to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Version = i64 + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetLayerVersionByArn struct { +} + +func (*awsRestjson1_deserializeOpGetLayerVersionByArn) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetLayerVersionByArn) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorGetLayerVersionByArn(response, &metadata) + } + output := &GetLayerVersionByArnOutput{} + 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 = awsRestjson1_deserializeOpDocumentGetLayerVersionByArnOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetLayerVersionByArn(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetLayerVersionByArnOutput(v **GetLayerVersionByArnOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetLayerVersionByArnOutput + if *v == nil { + sv = &GetLayerVersionByArnOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CompatibleArchitectures": + if err := awsRestjson1_deserializeDocumentCompatibleArchitectures(&sv.CompatibleArchitectures, value); err != nil { + return err + } + + case "CompatibleRuntimes": + if err := awsRestjson1_deserializeDocumentCompatibleRuntimes(&sv.CompatibleRuntimes, value); err != nil { + return err + } + + case "Content": + if err := awsRestjson1_deserializeDocumentLayerVersionContentOutput(&sv.Content, value); err != nil { + return err + } + + case "CreatedDate": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + sv.CreatedDate = 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 "LayerArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LayerArn to be of type string, got %T instead", value) + } + sv.LayerArn = ptr.String(jtv) + } + + case "LayerVersionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LayerVersionArn to be of type string, got %T instead", value) + } + sv.LayerVersionArn = ptr.String(jtv) + } + + case "LicenseInfo": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LicenseInfo to be of type string, got %T instead", value) + } + sv.LicenseInfo = ptr.String(jtv) + } + + case "Version": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected LayerVersionNumber to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Version = i64 + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetLayerVersionPolicy struct { +} + +func (*awsRestjson1_deserializeOpGetLayerVersionPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetLayerVersionPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorGetLayerVersionPolicy(response, &metadata) + } + output := &GetLayerVersionPolicyOutput{} + 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 = awsRestjson1_deserializeOpDocumentGetLayerVersionPolicyOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetLayerVersionPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetLayerVersionPolicyOutput(v **GetLayerVersionPolicyOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetLayerVersionPolicyOutput + if *v == nil { + sv = &GetLayerVersionPolicyOutput{} + } 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 String to be of type string, got %T instead", value) + } + sv.Policy = ptr.String(jtv) + } + + case "RevisionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RevisionId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetPolicy struct { +} + +func (*awsRestjson1_deserializeOpGetPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorGetPolicy(response, &metadata) + } + output := &GetPolicyOutput{} + 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 = awsRestjson1_deserializeOpDocumentGetPolicyOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetPolicyOutput(v **GetPolicyOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetPolicyOutput + if *v == nil { + sv = &GetPolicyOutput{} + } 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 String to be of type string, got %T instead", value) + } + sv.Policy = ptr.String(jtv) + } + + case "RevisionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RevisionId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetProvisionedConcurrencyConfig struct { +} + +func (*awsRestjson1_deserializeOpGetProvisionedConcurrencyConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetProvisionedConcurrencyConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorGetProvisionedConcurrencyConfig(response, &metadata) + } + output := &GetProvisionedConcurrencyConfigOutput{} + 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 = awsRestjson1_deserializeOpDocumentGetProvisionedConcurrencyConfigOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetProvisionedConcurrencyConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ProvisionedConcurrencyConfigNotFoundException", errorCode): + return awsRestjson1_deserializeErrorProvisionedConcurrencyConfigNotFoundException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetProvisionedConcurrencyConfigOutput(v **GetProvisionedConcurrencyConfigOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetProvisionedConcurrencyConfigOutput + if *v == nil { + sv = &GetProvisionedConcurrencyConfigOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AllocatedProvisionedConcurrentExecutions": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected NonNegativeInteger to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.AllocatedProvisionedConcurrentExecutions = ptr.Int32(int32(i64)) + } + + case "AvailableProvisionedConcurrentExecutions": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected NonNegativeInteger to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.AvailableProvisionedConcurrentExecutions = ptr.Int32(int32(i64)) + } + + case "LastModified": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + sv.LastModified = ptr.String(jtv) + } + + case "RequestedProvisionedConcurrentExecutions": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected PositiveInteger to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.RequestedProvisionedConcurrentExecutions = ptr.Int32(int32(i64)) + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProvisionedConcurrencyStatusEnum to be of type string, got %T instead", value) + } + sv.Status = types.ProvisionedConcurrencyStatusEnum(jtv) + } + + case "StatusReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.StatusReason = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetRuntimeManagementConfig struct { +} + +func (*awsRestjson1_deserializeOpGetRuntimeManagementConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetRuntimeManagementConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorGetRuntimeManagementConfig(response, &metadata) + } + output := &GetRuntimeManagementConfigOutput{} + 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 = awsRestjson1_deserializeOpDocumentGetRuntimeManagementConfigOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetRuntimeManagementConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetRuntimeManagementConfigOutput(v **GetRuntimeManagementConfigOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetRuntimeManagementConfigOutput + if *v == nil { + sv = &GetRuntimeManagementConfigOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "FunctionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NameSpacedFunctionArn to be of type string, got %T instead", value) + } + sv.FunctionArn = ptr.String(jtv) + } + + case "RuntimeVersionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RuntimeVersionArn to be of type string, got %T instead", value) + } + sv.RuntimeVersionArn = ptr.String(jtv) + } + + case "UpdateRuntimeOn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UpdateRuntimeOn to be of type string, got %T instead", value) + } + sv.UpdateRuntimeOn = types.UpdateRuntimeOn(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpInvoke struct { +} + +func (*awsRestjson1_deserializeOpInvoke) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpInvoke) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorInvoke(response, &metadata) + } + output := &InvokeOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsInvokeOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + err = awsRestjson1_deserializeOpDocumentInvokeOutput(output, response.Body, response.ContentLength) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to deserialize response payload, %w", err)} + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorInvoke(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("EC2AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorEC2AccessDeniedException(response, errorBody) + + case strings.EqualFold("EC2ThrottledException", errorCode): + return awsRestjson1_deserializeErrorEC2ThrottledException(response, errorBody) + + case strings.EqualFold("EC2UnexpectedException", errorCode): + return awsRestjson1_deserializeErrorEC2UnexpectedException(response, errorBody) + + case strings.EqualFold("EFSIOException", errorCode): + return awsRestjson1_deserializeErrorEFSIOException(response, errorBody) + + case strings.EqualFold("EFSMountConnectivityException", errorCode): + return awsRestjson1_deserializeErrorEFSMountConnectivityException(response, errorBody) + + case strings.EqualFold("EFSMountFailureException", errorCode): + return awsRestjson1_deserializeErrorEFSMountFailureException(response, errorBody) + + case strings.EqualFold("EFSMountTimeoutException", errorCode): + return awsRestjson1_deserializeErrorEFSMountTimeoutException(response, errorBody) + + case strings.EqualFold("ENILimitReachedException", errorCode): + return awsRestjson1_deserializeErrorENILimitReachedException(response, errorBody) + + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("InvalidRequestContentException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestContentException(response, errorBody) + + case strings.EqualFold("InvalidRuntimeException", errorCode): + return awsRestjson1_deserializeErrorInvalidRuntimeException(response, errorBody) + + case strings.EqualFold("InvalidSecurityGroupIDException", errorCode): + return awsRestjson1_deserializeErrorInvalidSecurityGroupIDException(response, errorBody) + + case strings.EqualFold("InvalidSubnetIDException", errorCode): + return awsRestjson1_deserializeErrorInvalidSubnetIDException(response, errorBody) + + case strings.EqualFold("InvalidZipFileException", errorCode): + return awsRestjson1_deserializeErrorInvalidZipFileException(response, errorBody) + + case strings.EqualFold("KMSAccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorKMSAccessDeniedException(response, errorBody) + + case strings.EqualFold("KMSDisabledException", errorCode): + return awsRestjson1_deserializeErrorKMSDisabledException(response, errorBody) + + case strings.EqualFold("KMSInvalidStateException", errorCode): + return awsRestjson1_deserializeErrorKMSInvalidStateException(response, errorBody) + + case strings.EqualFold("KMSNotFoundException", errorCode): + return awsRestjson1_deserializeErrorKMSNotFoundException(response, errorBody) + + case strings.EqualFold("RecursiveInvocationException", errorCode): + return awsRestjson1_deserializeErrorRecursiveInvocationException(response, errorBody) + + case strings.EqualFold("RequestTooLargeException", errorCode): + return awsRestjson1_deserializeErrorRequestTooLargeException(response, errorBody) + + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ResourceNotReadyException", errorCode): + return awsRestjson1_deserializeErrorResourceNotReadyException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("SnapStartException", errorCode): + return awsRestjson1_deserializeErrorSnapStartException(response, errorBody) + + case strings.EqualFold("SnapStartNotReadyException", errorCode): + return awsRestjson1_deserializeErrorSnapStartNotReadyException(response, errorBody) + + case strings.EqualFold("SnapStartTimeoutException", errorCode): + return awsRestjson1_deserializeErrorSnapStartTimeoutException(response, errorBody) + + case strings.EqualFold("SubnetIPAddressLimitReachedException", errorCode): + return awsRestjson1_deserializeErrorSubnetIPAddressLimitReachedException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + case strings.EqualFold("UnsupportedMediaTypeException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedMediaTypeException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsInvokeOutput(v *InvokeOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("X-Amz-Executed-Version"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ExecutedVersion = ptr.String(headerValues[0]) + } + + if headerValues := response.Header.Values("X-Amz-Function-Error"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.FunctionError = ptr.String(headerValues[0]) + } + + if headerValues := response.Header.Values("X-Amz-Log-Result"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.LogResult = ptr.String(headerValues[0]) + } + + v.StatusCode = int32(response.StatusCode) + + return nil +} +func awsRestjson1_deserializeOpDocumentInvokeOutput(v *InvokeOutput, body io.ReadCloser, contentLength int64) error { + if v == nil { + return fmt.Errorf("unsupported deserialization of nil %T", v) + } + + var buf bytes.Buffer + if contentLength > 0 { + buf.Grow(int(contentLength)) + } else { + buf.Grow(512) + } + + _, err := buf.ReadFrom(body) + if err != nil { + return err + } + if buf.Len() > 0 { + v.Payload = buf.Bytes() + } + return nil +} + +type awsRestjson1_deserializeOpInvokeAsync struct { +} + +func (*awsRestjson1_deserializeOpInvokeAsync) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpInvokeAsync) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorInvokeAsync(response, &metadata) + } + output := &InvokeAsyncOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsInvokeAsyncOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorInvokeAsync(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidRequestContentException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestContentException(response, errorBody) + + case strings.EqualFold("InvalidRuntimeException", errorCode): + return awsRestjson1_deserializeErrorInvalidRuntimeException(response, errorBody) + + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsInvokeAsyncOutput(v *InvokeAsyncOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + v.Status = int32(response.StatusCode) + + return nil +} + +type awsRestjson1_deserializeOpInvokeWithResponseStream struct { +} + +func (*awsRestjson1_deserializeOpInvokeWithResponseStream) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpInvokeWithResponseStream) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorInvokeWithResponseStream(response, &metadata) + } + output := &InvokeWithResponseStreamOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsInvokeWithResponseStreamOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorInvokeWithResponseStream(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("EC2AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorEC2AccessDeniedException(response, errorBody) + + case strings.EqualFold("EC2ThrottledException", errorCode): + return awsRestjson1_deserializeErrorEC2ThrottledException(response, errorBody) + + case strings.EqualFold("EC2UnexpectedException", errorCode): + return awsRestjson1_deserializeErrorEC2UnexpectedException(response, errorBody) + + case strings.EqualFold("EFSIOException", errorCode): + return awsRestjson1_deserializeErrorEFSIOException(response, errorBody) + + case strings.EqualFold("EFSMountConnectivityException", errorCode): + return awsRestjson1_deserializeErrorEFSMountConnectivityException(response, errorBody) + + case strings.EqualFold("EFSMountFailureException", errorCode): + return awsRestjson1_deserializeErrorEFSMountFailureException(response, errorBody) + + case strings.EqualFold("EFSMountTimeoutException", errorCode): + return awsRestjson1_deserializeErrorEFSMountTimeoutException(response, errorBody) + + case strings.EqualFold("ENILimitReachedException", errorCode): + return awsRestjson1_deserializeErrorENILimitReachedException(response, errorBody) + + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("InvalidRequestContentException", errorCode): + return awsRestjson1_deserializeErrorInvalidRequestContentException(response, errorBody) + + case strings.EqualFold("InvalidRuntimeException", errorCode): + return awsRestjson1_deserializeErrorInvalidRuntimeException(response, errorBody) + + case strings.EqualFold("InvalidSecurityGroupIDException", errorCode): + return awsRestjson1_deserializeErrorInvalidSecurityGroupIDException(response, errorBody) + + case strings.EqualFold("InvalidSubnetIDException", errorCode): + return awsRestjson1_deserializeErrorInvalidSubnetIDException(response, errorBody) + + case strings.EqualFold("InvalidZipFileException", errorCode): + return awsRestjson1_deserializeErrorInvalidZipFileException(response, errorBody) + + case strings.EqualFold("KMSAccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorKMSAccessDeniedException(response, errorBody) + + case strings.EqualFold("KMSDisabledException", errorCode): + return awsRestjson1_deserializeErrorKMSDisabledException(response, errorBody) + + case strings.EqualFold("KMSInvalidStateException", errorCode): + return awsRestjson1_deserializeErrorKMSInvalidStateException(response, errorBody) + + case strings.EqualFold("KMSNotFoundException", errorCode): + return awsRestjson1_deserializeErrorKMSNotFoundException(response, errorBody) + + case strings.EqualFold("RecursiveInvocationException", errorCode): + return awsRestjson1_deserializeErrorRecursiveInvocationException(response, errorBody) + + case strings.EqualFold("RequestTooLargeException", errorCode): + return awsRestjson1_deserializeErrorRequestTooLargeException(response, errorBody) + + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ResourceNotReadyException", errorCode): + return awsRestjson1_deserializeErrorResourceNotReadyException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("SnapStartException", errorCode): + return awsRestjson1_deserializeErrorSnapStartException(response, errorBody) + + case strings.EqualFold("SnapStartNotReadyException", errorCode): + return awsRestjson1_deserializeErrorSnapStartNotReadyException(response, errorBody) + + case strings.EqualFold("SnapStartTimeoutException", errorCode): + return awsRestjson1_deserializeErrorSnapStartTimeoutException(response, errorBody) + + case strings.EqualFold("SubnetIPAddressLimitReachedException", errorCode): + return awsRestjson1_deserializeErrorSubnetIPAddressLimitReachedException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + case strings.EqualFold("UnsupportedMediaTypeException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedMediaTypeException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsInvokeWithResponseStreamOutput(v *InvokeWithResponseStreamOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("X-Amz-Executed-Version"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ExecutedVersion = ptr.String(headerValues[0]) + } + + if headerValues := response.Header.Values("Content-Type"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ResponseStreamContentType = ptr.String(headerValues[0]) + } + + v.StatusCode = int32(response.StatusCode) + + return nil +} + +type awsRestjson1_deserializeOpListAliases struct { +} + +func (*awsRestjson1_deserializeOpListAliases) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListAliases) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorListAliases(response, &metadata) + } + output := &ListAliasesOutput{} + 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 = awsRestjson1_deserializeOpDocumentListAliasesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListAliases(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListAliasesOutput(v **ListAliasesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListAliasesOutput + if *v == nil { + sv = &ListAliasesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Aliases": + if err := awsRestjson1_deserializeDocumentAliasList(&sv.Aliases, value); err != nil { + return err + } + + case "NextMarker": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextMarker = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListCodeSigningConfigs struct { +} + +func (*awsRestjson1_deserializeOpListCodeSigningConfigs) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListCodeSigningConfigs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorListCodeSigningConfigs(response, &metadata) + } + output := &ListCodeSigningConfigsOutput{} + 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 = awsRestjson1_deserializeOpDocumentListCodeSigningConfigsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListCodeSigningConfigs(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListCodeSigningConfigsOutput(v **ListCodeSigningConfigsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListCodeSigningConfigsOutput + if *v == nil { + sv = &ListCodeSigningConfigsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CodeSigningConfigs": + if err := awsRestjson1_deserializeDocumentCodeSigningConfigList(&sv.CodeSigningConfigs, value); err != nil { + return err + } + + case "NextMarker": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextMarker = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListEventSourceMappings struct { +} + +func (*awsRestjson1_deserializeOpListEventSourceMappings) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListEventSourceMappings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorListEventSourceMappings(response, &metadata) + } + output := &ListEventSourceMappingsOutput{} + 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 = awsRestjson1_deserializeOpDocumentListEventSourceMappingsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListEventSourceMappings(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListEventSourceMappingsOutput(v **ListEventSourceMappingsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListEventSourceMappingsOutput + if *v == nil { + sv = &ListEventSourceMappingsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "EventSourceMappings": + if err := awsRestjson1_deserializeDocumentEventSourceMappingsList(&sv.EventSourceMappings, value); err != nil { + return err + } + + case "NextMarker": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextMarker = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListFunctionEventInvokeConfigs struct { +} + +func (*awsRestjson1_deserializeOpListFunctionEventInvokeConfigs) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListFunctionEventInvokeConfigs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorListFunctionEventInvokeConfigs(response, &metadata) + } + output := &ListFunctionEventInvokeConfigsOutput{} + 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 = awsRestjson1_deserializeOpDocumentListFunctionEventInvokeConfigsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListFunctionEventInvokeConfigs(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListFunctionEventInvokeConfigsOutput(v **ListFunctionEventInvokeConfigsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListFunctionEventInvokeConfigsOutput + if *v == nil { + sv = &ListFunctionEventInvokeConfigsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "FunctionEventInvokeConfigs": + if err := awsRestjson1_deserializeDocumentFunctionEventInvokeConfigList(&sv.FunctionEventInvokeConfigs, value); err != nil { + return err + } + + case "NextMarker": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextMarker = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListFunctions struct { +} + +func (*awsRestjson1_deserializeOpListFunctions) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListFunctions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorListFunctions(response, &metadata) + } + output := &ListFunctionsOutput{} + 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 = awsRestjson1_deserializeOpDocumentListFunctionsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListFunctions(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListFunctionsOutput(v **ListFunctionsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListFunctionsOutput + if *v == nil { + sv = &ListFunctionsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Functions": + if err := awsRestjson1_deserializeDocumentFunctionList(&sv.Functions, value); err != nil { + return err + } + + case "NextMarker": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextMarker = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListFunctionsByCodeSigningConfig struct { +} + +func (*awsRestjson1_deserializeOpListFunctionsByCodeSigningConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListFunctionsByCodeSigningConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorListFunctionsByCodeSigningConfig(response, &metadata) + } + output := &ListFunctionsByCodeSigningConfigOutput{} + 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 = awsRestjson1_deserializeOpDocumentListFunctionsByCodeSigningConfigOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListFunctionsByCodeSigningConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListFunctionsByCodeSigningConfigOutput(v **ListFunctionsByCodeSigningConfigOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListFunctionsByCodeSigningConfigOutput + if *v == nil { + sv = &ListFunctionsByCodeSigningConfigOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "FunctionArns": + if err := awsRestjson1_deserializeDocumentFunctionArnList(&sv.FunctionArns, value); err != nil { + return err + } + + case "NextMarker": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextMarker = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListFunctionUrlConfigs struct { +} + +func (*awsRestjson1_deserializeOpListFunctionUrlConfigs) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListFunctionUrlConfigs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorListFunctionUrlConfigs(response, &metadata) + } + output := &ListFunctionUrlConfigsOutput{} + 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 = awsRestjson1_deserializeOpDocumentListFunctionUrlConfigsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListFunctionUrlConfigs(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListFunctionUrlConfigsOutput(v **ListFunctionUrlConfigsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListFunctionUrlConfigsOutput + if *v == nil { + sv = &ListFunctionUrlConfigsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "FunctionUrlConfigs": + if err := awsRestjson1_deserializeDocumentFunctionUrlConfigList(&sv.FunctionUrlConfigs, value); err != nil { + return err + } + + case "NextMarker": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextMarker = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListLayers struct { +} + +func (*awsRestjson1_deserializeOpListLayers) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListLayers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorListLayers(response, &metadata) + } + output := &ListLayersOutput{} + 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 = awsRestjson1_deserializeOpDocumentListLayersOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListLayers(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListLayersOutput(v **ListLayersOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListLayersOutput + if *v == nil { + sv = &ListLayersOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Layers": + if err := awsRestjson1_deserializeDocumentLayersList(&sv.Layers, value); err != nil { + return err + } + + case "NextMarker": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextMarker = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListLayerVersions struct { +} + +func (*awsRestjson1_deserializeOpListLayerVersions) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListLayerVersions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorListLayerVersions(response, &metadata) + } + output := &ListLayerVersionsOutput{} + 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 = awsRestjson1_deserializeOpDocumentListLayerVersionsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListLayerVersions(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListLayerVersionsOutput(v **ListLayerVersionsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListLayerVersionsOutput + if *v == nil { + sv = &ListLayerVersionsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "LayerVersions": + if err := awsRestjson1_deserializeDocumentLayerVersionsList(&sv.LayerVersions, value); err != nil { + return err + } + + case "NextMarker": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextMarker = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListProvisionedConcurrencyConfigs struct { +} + +func (*awsRestjson1_deserializeOpListProvisionedConcurrencyConfigs) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListProvisionedConcurrencyConfigs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorListProvisionedConcurrencyConfigs(response, &metadata) + } + output := &ListProvisionedConcurrencyConfigsOutput{} + 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 = awsRestjson1_deserializeOpDocumentListProvisionedConcurrencyConfigsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListProvisionedConcurrencyConfigs(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListProvisionedConcurrencyConfigsOutput(v **ListProvisionedConcurrencyConfigsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListProvisionedConcurrencyConfigsOutput + if *v == nil { + sv = &ListProvisionedConcurrencyConfigsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextMarker": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextMarker = ptr.String(jtv) + } + + case "ProvisionedConcurrencyConfigs": + if err := awsRestjson1_deserializeDocumentProvisionedConcurrencyConfigList(&sv.ProvisionedConcurrencyConfigs, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListTags struct { +} + +func (*awsRestjson1_deserializeOpListTags) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListTags) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorListTags(response, &metadata) + } + output := &ListTagsOutput{} + 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 = awsRestjson1_deserializeOpDocumentListTagsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListTags(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListTagsOutput(v **ListTagsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListTagsOutput + if *v == nil { + sv = &ListTagsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Tags": + if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListVersionsByFunction struct { +} + +func (*awsRestjson1_deserializeOpListVersionsByFunction) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListVersionsByFunction) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorListVersionsByFunction(response, &metadata) + } + output := &ListVersionsByFunctionOutput{} + 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 = awsRestjson1_deserializeOpDocumentListVersionsByFunctionOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListVersionsByFunction(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListVersionsByFunctionOutput(v **ListVersionsByFunctionOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListVersionsByFunctionOutput + if *v == nil { + sv = &ListVersionsByFunctionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextMarker": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextMarker = ptr.String(jtv) + } + + case "Versions": + if err := awsRestjson1_deserializeDocumentFunctionList(&sv.Versions, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpPublishLayerVersion struct { +} + +func (*awsRestjson1_deserializeOpPublishLayerVersion) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpPublishLayerVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorPublishLayerVersion(response, &metadata) + } + output := &PublishLayerVersionOutput{} + 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 = awsRestjson1_deserializeOpDocumentPublishLayerVersionOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorPublishLayerVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("CodeStorageExceededException", errorCode): + return awsRestjson1_deserializeErrorCodeStorageExceededException(response, errorBody) + + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentPublishLayerVersionOutput(v **PublishLayerVersionOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *PublishLayerVersionOutput + if *v == nil { + sv = &PublishLayerVersionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CompatibleArchitectures": + if err := awsRestjson1_deserializeDocumentCompatibleArchitectures(&sv.CompatibleArchitectures, value); err != nil { + return err + } + + case "CompatibleRuntimes": + if err := awsRestjson1_deserializeDocumentCompatibleRuntimes(&sv.CompatibleRuntimes, value); err != nil { + return err + } + + case "Content": + if err := awsRestjson1_deserializeDocumentLayerVersionContentOutput(&sv.Content, value); err != nil { + return err + } + + case "CreatedDate": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + sv.CreatedDate = 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 "LayerArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LayerArn to be of type string, got %T instead", value) + } + sv.LayerArn = ptr.String(jtv) + } + + case "LayerVersionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LayerVersionArn to be of type string, got %T instead", value) + } + sv.LayerVersionArn = ptr.String(jtv) + } + + case "LicenseInfo": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LicenseInfo to be of type string, got %T instead", value) + } + sv.LicenseInfo = ptr.String(jtv) + } + + case "Version": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected LayerVersionNumber to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Version = i64 + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpPublishVersion struct { +} + +func (*awsRestjson1_deserializeOpPublishVersion) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpPublishVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorPublishVersion(response, &metadata) + } + output := &PublishVersionOutput{} + 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 = awsRestjson1_deserializeOpDocumentPublishVersionOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorPublishVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("CodeStorageExceededException", errorCode): + return awsRestjson1_deserializeErrorCodeStorageExceededException(response, errorBody) + + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("PreconditionFailedException", errorCode): + return awsRestjson1_deserializeErrorPreconditionFailedException(response, errorBody) + + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentPublishVersionOutput(v **PublishVersionOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *PublishVersionOutput + if *v == nil { + sv = &PublishVersionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Architectures": + if err := awsRestjson1_deserializeDocumentArchitecturesList(&sv.Architectures, value); err != nil { + return err + } + + case "CodeSha256": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.CodeSha256 = ptr.String(jtv) + } + + case "CodeSize": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.CodeSize = i64 + } + + case "DeadLetterConfig": + if err := awsRestjson1_deserializeDocumentDeadLetterConfig(&sv.DeadLetterConfig, value); err != nil { + return err + } + + 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 "Environment": + if err := awsRestjson1_deserializeDocumentEnvironmentResponse(&sv.Environment, value); err != nil { + return err + } + + case "EphemeralStorage": + if err := awsRestjson1_deserializeDocumentEphemeralStorage(&sv.EphemeralStorage, value); err != nil { + return err + } + + case "FileSystemConfigs": + if err := awsRestjson1_deserializeDocumentFileSystemConfigList(&sv.FileSystemConfigs, value); err != nil { + return err + } + + case "FunctionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NameSpacedFunctionArn to be of type string, got %T instead", value) + } + sv.FunctionArn = ptr.String(jtv) + } + + case "FunctionName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NamespacedFunctionName to be of type string, got %T instead", value) + } + sv.FunctionName = ptr.String(jtv) + } + + case "Handler": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Handler to be of type string, got %T instead", value) + } + sv.Handler = ptr.String(jtv) + } + + case "ImageConfigResponse": + if err := awsRestjson1_deserializeDocumentImageConfigResponse(&sv.ImageConfigResponse, value); err != nil { + return err + } + + case "KMSKeyArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected KMSKeyArn to be of type string, got %T instead", value) + } + sv.KMSKeyArn = ptr.String(jtv) + } + + case "LastModified": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + sv.LastModified = ptr.String(jtv) + } + + case "LastUpdateStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LastUpdateStatus to be of type string, got %T instead", value) + } + sv.LastUpdateStatus = types.LastUpdateStatus(jtv) + } + + case "LastUpdateStatusReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LastUpdateStatusReason to be of type string, got %T instead", value) + } + sv.LastUpdateStatusReason = ptr.String(jtv) + } + + case "LastUpdateStatusReasonCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LastUpdateStatusReasonCode to be of type string, got %T instead", value) + } + sv.LastUpdateStatusReasonCode = types.LastUpdateStatusReasonCode(jtv) + } + + case "Layers": + if err := awsRestjson1_deserializeDocumentLayersReferenceList(&sv.Layers, value); err != nil { + return err + } + + case "LoggingConfig": + if err := awsRestjson1_deserializeDocumentLoggingConfig(&sv.LoggingConfig, value); err != nil { + return err + } + + case "MasterArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value) + } + sv.MasterArn = ptr.String(jtv) + } + + case "MemorySize": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MemorySize to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MemorySize = ptr.Int32(int32(i64)) + } + + case "PackageType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PackageType to be of type string, got %T instead", value) + } + sv.PackageType = types.PackageType(jtv) + } + + case "RevisionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RevisionId = ptr.String(jtv) + } + + case "Role": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value) + } + sv.Role = ptr.String(jtv) + } + + case "Runtime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Runtime to be of type string, got %T instead", value) + } + sv.Runtime = types.Runtime(jtv) + } + + case "RuntimeVersionConfig": + if err := awsRestjson1_deserializeDocumentRuntimeVersionConfig(&sv.RuntimeVersionConfig, value); err != nil { + return err + } + + case "SigningJobArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.SigningJobArn = ptr.String(jtv) + } + + case "SigningProfileVersionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.SigningProfileVersionArn = ptr.String(jtv) + } + + case "SnapStart": + if err := awsRestjson1_deserializeDocumentSnapStartResponse(&sv.SnapStart, value); err != nil { + return err + } + + 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 "StateReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StateReason to be of type string, got %T instead", value) + } + sv.StateReason = ptr.String(jtv) + } + + case "StateReasonCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StateReasonCode to be of type string, got %T instead", value) + } + sv.StateReasonCode = types.StateReasonCode(jtv) + } + + case "Timeout": + 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.Timeout = ptr.Int32(int32(i64)) + } + + case "TracingConfig": + if err := awsRestjson1_deserializeDocumentTracingConfigResponse(&sv.TracingConfig, value); err != nil { + return err + } + + case "Version": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Version to be of type string, got %T instead", value) + } + sv.Version = ptr.String(jtv) + } + + case "VpcConfig": + if err := awsRestjson1_deserializeDocumentVpcConfigResponse(&sv.VpcConfig, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpPutFunctionCodeSigningConfig struct { +} + +func (*awsRestjson1_deserializeOpPutFunctionCodeSigningConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpPutFunctionCodeSigningConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorPutFunctionCodeSigningConfig(response, &metadata) + } + output := &PutFunctionCodeSigningConfigOutput{} + 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 = awsRestjson1_deserializeOpDocumentPutFunctionCodeSigningConfigOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorPutFunctionCodeSigningConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("CodeSigningConfigNotFoundException", errorCode): + return awsRestjson1_deserializeErrorCodeSigningConfigNotFoundException(response, errorBody) + + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentPutFunctionCodeSigningConfigOutput(v **PutFunctionCodeSigningConfigOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *PutFunctionCodeSigningConfigOutput + if *v == nil { + sv = &PutFunctionCodeSigningConfigOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CodeSigningConfigArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CodeSigningConfigArn to be of type string, got %T instead", value) + } + sv.CodeSigningConfigArn = ptr.String(jtv) + } + + case "FunctionName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FunctionName to be of type string, got %T instead", value) + } + sv.FunctionName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpPutFunctionConcurrency struct { +} + +func (*awsRestjson1_deserializeOpPutFunctionConcurrency) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpPutFunctionConcurrency) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorPutFunctionConcurrency(response, &metadata) + } + output := &PutFunctionConcurrencyOutput{} + 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 = awsRestjson1_deserializeOpDocumentPutFunctionConcurrencyOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorPutFunctionConcurrency(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentPutFunctionConcurrencyOutput(v **PutFunctionConcurrencyOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *PutFunctionConcurrencyOutput + if *v == nil { + sv = &PutFunctionConcurrencyOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ReservedConcurrentExecutions": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ReservedConcurrentExecutions to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ReservedConcurrentExecutions = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpPutFunctionEventInvokeConfig struct { +} + +func (*awsRestjson1_deserializeOpPutFunctionEventInvokeConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpPutFunctionEventInvokeConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorPutFunctionEventInvokeConfig(response, &metadata) + } + output := &PutFunctionEventInvokeConfigOutput{} + 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 = awsRestjson1_deserializeOpDocumentPutFunctionEventInvokeConfigOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorPutFunctionEventInvokeConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentPutFunctionEventInvokeConfigOutput(v **PutFunctionEventInvokeConfigOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *PutFunctionEventInvokeConfigOutput + if *v == nil { + sv = &PutFunctionEventInvokeConfigOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DestinationConfig": + if err := awsRestjson1_deserializeDocumentDestinationConfig(&sv.DestinationConfig, value); err != nil { + return err + } + + case "FunctionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value) + } + sv.FunctionArn = 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 Date to be a JSON Number, got %T instead", value) + + } + } + + case "MaximumEventAgeInSeconds": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MaximumEventAgeInSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaximumEventAgeInSeconds = ptr.Int32(int32(i64)) + } + + case "MaximumRetryAttempts": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MaximumRetryAttempts to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaximumRetryAttempts = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpPutFunctionRecursionConfig struct { +} + +func (*awsRestjson1_deserializeOpPutFunctionRecursionConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpPutFunctionRecursionConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorPutFunctionRecursionConfig(response, &metadata) + } + output := &PutFunctionRecursionConfigOutput{} + 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 = awsRestjson1_deserializeOpDocumentPutFunctionRecursionConfigOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorPutFunctionRecursionConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentPutFunctionRecursionConfigOutput(v **PutFunctionRecursionConfigOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *PutFunctionRecursionConfigOutput + if *v == nil { + sv = &PutFunctionRecursionConfigOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "RecursiveLoop": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RecursiveLoop to be of type string, got %T instead", value) + } + sv.RecursiveLoop = types.RecursiveLoop(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpPutProvisionedConcurrencyConfig struct { +} + +func (*awsRestjson1_deserializeOpPutProvisionedConcurrencyConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpPutProvisionedConcurrencyConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorPutProvisionedConcurrencyConfig(response, &metadata) + } + output := &PutProvisionedConcurrencyConfigOutput{} + 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 = awsRestjson1_deserializeOpDocumentPutProvisionedConcurrencyConfigOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorPutProvisionedConcurrencyConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentPutProvisionedConcurrencyConfigOutput(v **PutProvisionedConcurrencyConfigOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *PutProvisionedConcurrencyConfigOutput + if *v == nil { + sv = &PutProvisionedConcurrencyConfigOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AllocatedProvisionedConcurrentExecutions": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected NonNegativeInteger to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.AllocatedProvisionedConcurrentExecutions = ptr.Int32(int32(i64)) + } + + case "AvailableProvisionedConcurrentExecutions": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected NonNegativeInteger to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.AvailableProvisionedConcurrentExecutions = ptr.Int32(int32(i64)) + } + + case "LastModified": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + sv.LastModified = ptr.String(jtv) + } + + case "RequestedProvisionedConcurrentExecutions": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected PositiveInteger to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.RequestedProvisionedConcurrentExecutions = ptr.Int32(int32(i64)) + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProvisionedConcurrencyStatusEnum to be of type string, got %T instead", value) + } + sv.Status = types.ProvisionedConcurrencyStatusEnum(jtv) + } + + case "StatusReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.StatusReason = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpPutRuntimeManagementConfig struct { +} + +func (*awsRestjson1_deserializeOpPutRuntimeManagementConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpPutRuntimeManagementConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorPutRuntimeManagementConfig(response, &metadata) + } + output := &PutRuntimeManagementConfigOutput{} + 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 = awsRestjson1_deserializeOpDocumentPutRuntimeManagementConfigOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorPutRuntimeManagementConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentPutRuntimeManagementConfigOutput(v **PutRuntimeManagementConfigOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *PutRuntimeManagementConfigOutput + if *v == nil { + sv = &PutRuntimeManagementConfigOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "FunctionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value) + } + sv.FunctionArn = ptr.String(jtv) + } + + case "RuntimeVersionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RuntimeVersionArn to be of type string, got %T instead", value) + } + sv.RuntimeVersionArn = ptr.String(jtv) + } + + case "UpdateRuntimeOn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UpdateRuntimeOn to be of type string, got %T instead", value) + } + sv.UpdateRuntimeOn = types.UpdateRuntimeOn(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpRemoveLayerVersionPermission struct { +} + +func (*awsRestjson1_deserializeOpRemoveLayerVersionPermission) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpRemoveLayerVersionPermission) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorRemoveLayerVersionPermission(response, &metadata) + } + output := &RemoveLayerVersionPermissionOutput{} + 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), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorRemoveLayerVersionPermission(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("PreconditionFailedException", errorCode): + return awsRestjson1_deserializeErrorPreconditionFailedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpRemovePermission struct { +} + +func (*awsRestjson1_deserializeOpRemovePermission) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpRemovePermission) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorRemovePermission(response, &metadata) + } + output := &RemovePermissionOutput{} + 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), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorRemovePermission(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("PreconditionFailedException", errorCode): + return awsRestjson1_deserializeErrorPreconditionFailedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpTagResource struct { +} + +func (*awsRestjson1_deserializeOpTagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_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, awsRestjson1_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), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpUntagResource struct { +} + +func (*awsRestjson1_deserializeOpUntagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_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, awsRestjson1_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), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpUpdateAlias struct { +} + +func (*awsRestjson1_deserializeOpUpdateAlias) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateAlias) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorUpdateAlias(response, &metadata) + } + output := &UpdateAliasOutput{} + 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 = awsRestjson1_deserializeOpDocumentUpdateAliasOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateAlias(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("PreconditionFailedException", errorCode): + return awsRestjson1_deserializeErrorPreconditionFailedException(response, errorBody) + + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateAliasOutput(v **UpdateAliasOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateAliasOutput + if *v == nil { + sv = &UpdateAliasOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AliasArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value) + } + sv.AliasArn = 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 "FunctionVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Version to be of type string, got %T instead", value) + } + sv.FunctionVersion = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Alias to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "RevisionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RevisionId = ptr.String(jtv) + } + + case "RoutingConfig": + if err := awsRestjson1_deserializeDocumentAliasRoutingConfiguration(&sv.RoutingConfig, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateCodeSigningConfig struct { +} + +func (*awsRestjson1_deserializeOpUpdateCodeSigningConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateCodeSigningConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorUpdateCodeSigningConfig(response, &metadata) + } + output := &UpdateCodeSigningConfigOutput{} + 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 = awsRestjson1_deserializeOpDocumentUpdateCodeSigningConfigOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateCodeSigningConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateCodeSigningConfigOutput(v **UpdateCodeSigningConfigOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateCodeSigningConfigOutput + if *v == nil { + sv = &UpdateCodeSigningConfigOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CodeSigningConfig": + if err := awsRestjson1_deserializeDocumentCodeSigningConfig(&sv.CodeSigningConfig, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateEventSourceMapping struct { +} + +func (*awsRestjson1_deserializeOpUpdateEventSourceMapping) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateEventSourceMapping) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorUpdateEventSourceMapping(response, &metadata) + } + output := &UpdateEventSourceMappingOutput{} + 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 = awsRestjson1_deserializeOpDocumentUpdateEventSourceMappingOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateEventSourceMapping(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) + + case strings.EqualFold("ResourceInUseException", errorCode): + return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateEventSourceMappingOutput(v **UpdateEventSourceMappingOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateEventSourceMappingOutput + if *v == nil { + sv = &UpdateEventSourceMappingOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AmazonManagedKafkaEventSourceConfig": + if err := awsRestjson1_deserializeDocumentAmazonManagedKafkaEventSourceConfig(&sv.AmazonManagedKafkaEventSourceConfig, value); err != nil { + return err + } + + case "BatchSize": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected BatchSize to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.BatchSize = ptr.Int32(int32(i64)) + } + + case "BisectBatchOnFunctionError": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected BisectBatchOnFunctionError to be of type *bool, got %T instead", value) + } + sv.BisectBatchOnFunctionError = ptr.Bool(jtv) + } + + case "DestinationConfig": + if err := awsRestjson1_deserializeDocumentDestinationConfig(&sv.DestinationConfig, value); err != nil { + return err + } + + case "DocumentDBEventSourceConfig": + if err := awsRestjson1_deserializeDocumentDocumentDBEventSourceConfig(&sv.DocumentDBEventSourceConfig, value); err != nil { + return err + } + + case "EventSourceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.EventSourceArn = ptr.String(jtv) + } + + case "EventSourceMappingArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EventSourceMappingArn to be of type string, got %T instead", value) + } + sv.EventSourceMappingArn = ptr.String(jtv) + } + + case "FilterCriteria": + if err := awsRestjson1_deserializeDocumentFilterCriteria(&sv.FilterCriteria, value); err != nil { + return err + } + + case "FilterCriteriaError": + if err := awsRestjson1_deserializeDocumentFilterCriteriaError(&sv.FilterCriteriaError, value); err != nil { + return err + } + + case "FunctionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value) + } + sv.FunctionArn = ptr.String(jtv) + } + + case "FunctionResponseTypes": + if err := awsRestjson1_deserializeDocumentFunctionResponseTypeList(&sv.FunctionResponseTypes, value); err != nil { + return err + } + + case "KMSKeyArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected KMSKeyArn to be of type string, got %T instead", value) + } + sv.KMSKeyArn = 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 Date to be a JSON Number, got %T instead", value) + + } + } + + case "LastProcessingResult": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.LastProcessingResult = ptr.String(jtv) + } + + case "MaximumBatchingWindowInSeconds": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MaximumBatchingWindowInSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaximumBatchingWindowInSeconds = ptr.Int32(int32(i64)) + } + + case "MaximumRecordAgeInSeconds": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MaximumRecordAgeInSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaximumRecordAgeInSeconds = ptr.Int32(int32(i64)) + } + + case "MaximumRetryAttempts": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MaximumRetryAttemptsEventSourceMapping to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaximumRetryAttempts = ptr.Int32(int32(i64)) + } + + case "MetricsConfig": + if err := awsRestjson1_deserializeDocumentEventSourceMappingMetricsConfig(&sv.MetricsConfig, value); err != nil { + return err + } + + case "ParallelizationFactor": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ParallelizationFactor to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ParallelizationFactor = ptr.Int32(int32(i64)) + } + + case "ProvisionedPollerConfig": + if err := awsRestjson1_deserializeDocumentProvisionedPollerConfig(&sv.ProvisionedPollerConfig, value); err != nil { + return err + } + + case "Queues": + if err := awsRestjson1_deserializeDocumentQueues(&sv.Queues, value); err != nil { + return err + } + + case "ScalingConfig": + if err := awsRestjson1_deserializeDocumentScalingConfig(&sv.ScalingConfig, value); err != nil { + return err + } + + case "SelfManagedEventSource": + if err := awsRestjson1_deserializeDocumentSelfManagedEventSource(&sv.SelfManagedEventSource, value); err != nil { + return err + } + + case "SelfManagedKafkaEventSourceConfig": + if err := awsRestjson1_deserializeDocumentSelfManagedKafkaEventSourceConfig(&sv.SelfManagedKafkaEventSourceConfig, value); err != nil { + return err + } + + case "SourceAccessConfigurations": + if err := awsRestjson1_deserializeDocumentSourceAccessConfigurations(&sv.SourceAccessConfigurations, value); err != nil { + return err + } + + case "StartingPosition": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EventSourcePosition to be of type string, got %T instead", value) + } + sv.StartingPosition = types.EventSourcePosition(jtv) + } + + case "StartingPositionTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartingPositionTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + + } + } + + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.State = ptr.String(jtv) + } + + case "StateTransitionReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.StateTransitionReason = ptr.String(jtv) + } + + case "Topics": + if err := awsRestjson1_deserializeDocumentTopics(&sv.Topics, value); err != nil { + return err + } + + case "TumblingWindowInSeconds": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected TumblingWindowInSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TumblingWindowInSeconds = ptr.Int32(int32(i64)) + } + + case "UUID": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.UUID = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateFunctionCode struct { +} + +func (*awsRestjson1_deserializeOpUpdateFunctionCode) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateFunctionCode) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorUpdateFunctionCode(response, &metadata) + } + output := &UpdateFunctionCodeOutput{} + 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 = awsRestjson1_deserializeOpDocumentUpdateFunctionCodeOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateFunctionCode(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("CodeSigningConfigNotFoundException", errorCode): + return awsRestjson1_deserializeErrorCodeSigningConfigNotFoundException(response, errorBody) + + case strings.EqualFold("CodeStorageExceededException", errorCode): + return awsRestjson1_deserializeErrorCodeStorageExceededException(response, errorBody) + + case strings.EqualFold("CodeVerificationFailedException", errorCode): + return awsRestjson1_deserializeErrorCodeVerificationFailedException(response, errorBody) + + case strings.EqualFold("InvalidCodeSignatureException", errorCode): + return awsRestjson1_deserializeErrorInvalidCodeSignatureException(response, errorBody) + + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("PreconditionFailedException", errorCode): + return awsRestjson1_deserializeErrorPreconditionFailedException(response, errorBody) + + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateFunctionCodeOutput(v **UpdateFunctionCodeOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateFunctionCodeOutput + if *v == nil { + sv = &UpdateFunctionCodeOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Architectures": + if err := awsRestjson1_deserializeDocumentArchitecturesList(&sv.Architectures, value); err != nil { + return err + } + + case "CodeSha256": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.CodeSha256 = ptr.String(jtv) + } + + case "CodeSize": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.CodeSize = i64 + } + + case "DeadLetterConfig": + if err := awsRestjson1_deserializeDocumentDeadLetterConfig(&sv.DeadLetterConfig, value); err != nil { + return err + } + + 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 "Environment": + if err := awsRestjson1_deserializeDocumentEnvironmentResponse(&sv.Environment, value); err != nil { + return err + } + + case "EphemeralStorage": + if err := awsRestjson1_deserializeDocumentEphemeralStorage(&sv.EphemeralStorage, value); err != nil { + return err + } + + case "FileSystemConfigs": + if err := awsRestjson1_deserializeDocumentFileSystemConfigList(&sv.FileSystemConfigs, value); err != nil { + return err + } + + case "FunctionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NameSpacedFunctionArn to be of type string, got %T instead", value) + } + sv.FunctionArn = ptr.String(jtv) + } + + case "FunctionName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NamespacedFunctionName to be of type string, got %T instead", value) + } + sv.FunctionName = ptr.String(jtv) + } + + case "Handler": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Handler to be of type string, got %T instead", value) + } + sv.Handler = ptr.String(jtv) + } + + case "ImageConfigResponse": + if err := awsRestjson1_deserializeDocumentImageConfigResponse(&sv.ImageConfigResponse, value); err != nil { + return err + } + + case "KMSKeyArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected KMSKeyArn to be of type string, got %T instead", value) + } + sv.KMSKeyArn = ptr.String(jtv) + } + + case "LastModified": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + sv.LastModified = ptr.String(jtv) + } + + case "LastUpdateStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LastUpdateStatus to be of type string, got %T instead", value) + } + sv.LastUpdateStatus = types.LastUpdateStatus(jtv) + } + + case "LastUpdateStatusReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LastUpdateStatusReason to be of type string, got %T instead", value) + } + sv.LastUpdateStatusReason = ptr.String(jtv) + } + + case "LastUpdateStatusReasonCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LastUpdateStatusReasonCode to be of type string, got %T instead", value) + } + sv.LastUpdateStatusReasonCode = types.LastUpdateStatusReasonCode(jtv) + } + + case "Layers": + if err := awsRestjson1_deserializeDocumentLayersReferenceList(&sv.Layers, value); err != nil { + return err + } + + case "LoggingConfig": + if err := awsRestjson1_deserializeDocumentLoggingConfig(&sv.LoggingConfig, value); err != nil { + return err + } + + case "MasterArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value) + } + sv.MasterArn = ptr.String(jtv) + } + + case "MemorySize": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MemorySize to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MemorySize = ptr.Int32(int32(i64)) + } + + case "PackageType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PackageType to be of type string, got %T instead", value) + } + sv.PackageType = types.PackageType(jtv) + } + + case "RevisionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RevisionId = ptr.String(jtv) + } + + case "Role": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value) + } + sv.Role = ptr.String(jtv) + } + + case "Runtime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Runtime to be of type string, got %T instead", value) + } + sv.Runtime = types.Runtime(jtv) + } + + case "RuntimeVersionConfig": + if err := awsRestjson1_deserializeDocumentRuntimeVersionConfig(&sv.RuntimeVersionConfig, value); err != nil { + return err + } + + case "SigningJobArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.SigningJobArn = ptr.String(jtv) + } + + case "SigningProfileVersionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.SigningProfileVersionArn = ptr.String(jtv) + } + + case "SnapStart": + if err := awsRestjson1_deserializeDocumentSnapStartResponse(&sv.SnapStart, value); err != nil { + return err + } + + 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 "StateReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StateReason to be of type string, got %T instead", value) + } + sv.StateReason = ptr.String(jtv) + } + + case "StateReasonCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StateReasonCode to be of type string, got %T instead", value) + } + sv.StateReasonCode = types.StateReasonCode(jtv) + } + + case "Timeout": + 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.Timeout = ptr.Int32(int32(i64)) + } + + case "TracingConfig": + if err := awsRestjson1_deserializeDocumentTracingConfigResponse(&sv.TracingConfig, value); err != nil { + return err + } + + case "Version": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Version to be of type string, got %T instead", value) + } + sv.Version = ptr.String(jtv) + } + + case "VpcConfig": + if err := awsRestjson1_deserializeDocumentVpcConfigResponse(&sv.VpcConfig, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateFunctionConfiguration struct { +} + +func (*awsRestjson1_deserializeOpUpdateFunctionConfiguration) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateFunctionConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorUpdateFunctionConfiguration(response, &metadata) + } + output := &UpdateFunctionConfigurationOutput{} + 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 = awsRestjson1_deserializeOpDocumentUpdateFunctionConfigurationOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateFunctionConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("CodeSigningConfigNotFoundException", errorCode): + return awsRestjson1_deserializeErrorCodeSigningConfigNotFoundException(response, errorBody) + + case strings.EqualFold("CodeVerificationFailedException", errorCode): + return awsRestjson1_deserializeErrorCodeVerificationFailedException(response, errorBody) + + case strings.EqualFold("InvalidCodeSignatureException", errorCode): + return awsRestjson1_deserializeErrorInvalidCodeSignatureException(response, errorBody) + + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("PreconditionFailedException", errorCode): + return awsRestjson1_deserializeErrorPreconditionFailedException(response, errorBody) + + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateFunctionConfigurationOutput(v **UpdateFunctionConfigurationOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateFunctionConfigurationOutput + if *v == nil { + sv = &UpdateFunctionConfigurationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Architectures": + if err := awsRestjson1_deserializeDocumentArchitecturesList(&sv.Architectures, value); err != nil { + return err + } + + case "CodeSha256": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.CodeSha256 = ptr.String(jtv) + } + + case "CodeSize": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.CodeSize = i64 + } + + case "DeadLetterConfig": + if err := awsRestjson1_deserializeDocumentDeadLetterConfig(&sv.DeadLetterConfig, value); err != nil { + return err + } + + 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 "Environment": + if err := awsRestjson1_deserializeDocumentEnvironmentResponse(&sv.Environment, value); err != nil { + return err + } + + case "EphemeralStorage": + if err := awsRestjson1_deserializeDocumentEphemeralStorage(&sv.EphemeralStorage, value); err != nil { + return err + } + + case "FileSystemConfigs": + if err := awsRestjson1_deserializeDocumentFileSystemConfigList(&sv.FileSystemConfigs, value); err != nil { + return err + } + + case "FunctionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NameSpacedFunctionArn to be of type string, got %T instead", value) + } + sv.FunctionArn = ptr.String(jtv) + } + + case "FunctionName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NamespacedFunctionName to be of type string, got %T instead", value) + } + sv.FunctionName = ptr.String(jtv) + } + + case "Handler": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Handler to be of type string, got %T instead", value) + } + sv.Handler = ptr.String(jtv) + } + + case "ImageConfigResponse": + if err := awsRestjson1_deserializeDocumentImageConfigResponse(&sv.ImageConfigResponse, value); err != nil { + return err + } + + case "KMSKeyArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected KMSKeyArn to be of type string, got %T instead", value) + } + sv.KMSKeyArn = ptr.String(jtv) + } + + case "LastModified": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + sv.LastModified = ptr.String(jtv) + } + + case "LastUpdateStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LastUpdateStatus to be of type string, got %T instead", value) + } + sv.LastUpdateStatus = types.LastUpdateStatus(jtv) + } + + case "LastUpdateStatusReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LastUpdateStatusReason to be of type string, got %T instead", value) + } + sv.LastUpdateStatusReason = ptr.String(jtv) + } + + case "LastUpdateStatusReasonCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LastUpdateStatusReasonCode to be of type string, got %T instead", value) + } + sv.LastUpdateStatusReasonCode = types.LastUpdateStatusReasonCode(jtv) + } + + case "Layers": + if err := awsRestjson1_deserializeDocumentLayersReferenceList(&sv.Layers, value); err != nil { + return err + } + + case "LoggingConfig": + if err := awsRestjson1_deserializeDocumentLoggingConfig(&sv.LoggingConfig, value); err != nil { + return err + } + + case "MasterArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value) + } + sv.MasterArn = ptr.String(jtv) + } + + case "MemorySize": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MemorySize to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MemorySize = ptr.Int32(int32(i64)) + } + + case "PackageType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PackageType to be of type string, got %T instead", value) + } + sv.PackageType = types.PackageType(jtv) + } + + case "RevisionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RevisionId = ptr.String(jtv) + } + + case "Role": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value) + } + sv.Role = ptr.String(jtv) + } + + case "Runtime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Runtime to be of type string, got %T instead", value) + } + sv.Runtime = types.Runtime(jtv) + } + + case "RuntimeVersionConfig": + if err := awsRestjson1_deserializeDocumentRuntimeVersionConfig(&sv.RuntimeVersionConfig, value); err != nil { + return err + } + + case "SigningJobArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.SigningJobArn = ptr.String(jtv) + } + + case "SigningProfileVersionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.SigningProfileVersionArn = ptr.String(jtv) + } + + case "SnapStart": + if err := awsRestjson1_deserializeDocumentSnapStartResponse(&sv.SnapStart, value); err != nil { + return err + } + + 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 "StateReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StateReason to be of type string, got %T instead", value) + } + sv.StateReason = ptr.String(jtv) + } + + case "StateReasonCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StateReasonCode to be of type string, got %T instead", value) + } + sv.StateReasonCode = types.StateReasonCode(jtv) + } + + case "Timeout": + 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.Timeout = ptr.Int32(int32(i64)) + } + + case "TracingConfig": + if err := awsRestjson1_deserializeDocumentTracingConfigResponse(&sv.TracingConfig, value); err != nil { + return err + } + + case "Version": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Version to be of type string, got %T instead", value) + } + sv.Version = ptr.String(jtv) + } + + case "VpcConfig": + if err := awsRestjson1_deserializeDocumentVpcConfigResponse(&sv.VpcConfig, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateFunctionEventInvokeConfig struct { +} + +func (*awsRestjson1_deserializeOpUpdateFunctionEventInvokeConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateFunctionEventInvokeConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorUpdateFunctionEventInvokeConfig(response, &metadata) + } + output := &UpdateFunctionEventInvokeConfigOutput{} + 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 = awsRestjson1_deserializeOpDocumentUpdateFunctionEventInvokeConfigOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateFunctionEventInvokeConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateFunctionEventInvokeConfigOutput(v **UpdateFunctionEventInvokeConfigOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateFunctionEventInvokeConfigOutput + if *v == nil { + sv = &UpdateFunctionEventInvokeConfigOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DestinationConfig": + if err := awsRestjson1_deserializeDocumentDestinationConfig(&sv.DestinationConfig, value); err != nil { + return err + } + + case "FunctionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value) + } + sv.FunctionArn = 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 Date to be a JSON Number, got %T instead", value) + + } + } + + case "MaximumEventAgeInSeconds": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MaximumEventAgeInSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaximumEventAgeInSeconds = ptr.Int32(int32(i64)) + } + + case "MaximumRetryAttempts": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MaximumRetryAttempts to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaximumRetryAttempts = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateFunctionUrlConfig struct { +} + +func (*awsRestjson1_deserializeOpUpdateFunctionUrlConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateFunctionUrlConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next 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, awsRestjson1_deserializeOpErrorUpdateFunctionUrlConfig(response, &metadata) + } + output := &UpdateFunctionUrlConfigOutput{} + 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 = awsRestjson1_deserializeOpDocumentUpdateFunctionUrlConfigOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateFunctionUrlConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != 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") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var 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 len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsRestjson1_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateFunctionUrlConfigOutput(v **UpdateFunctionUrlConfigOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateFunctionUrlConfigOutput + if *v == nil { + sv = &UpdateFunctionUrlConfigOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AuthType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FunctionUrlAuthType to be of type string, got %T instead", value) + } + sv.AuthType = types.FunctionUrlAuthType(jtv) + } + + case "Cors": + if err := awsRestjson1_deserializeDocumentCors(&sv.Cors, value); err != nil { + return err + } + + case "CreationTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + sv.CreationTime = ptr.String(jtv) + } + + case "FunctionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value) + } + sv.FunctionArn = ptr.String(jtv) + } + + case "FunctionUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FunctionUrl to be of type string, got %T instead", value) + } + sv.FunctionUrl = ptr.String(jtv) + } + + case "InvokeMode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InvokeMode to be of type string, got %T instead", value) + } + sv.InvokeMode = types.InvokeMode(jtv) + } + + case "LastModifiedTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + sv.LastModifiedTime = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeEventStreamInvokeWithResponseStreamResponseEvent(v *types.InvokeWithResponseStreamResponseEvent, 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("InvokeComplete", eventType.String()): + vv := &types.InvokeWithResponseStreamResponseEventMemberInvokeComplete{} + if err := awsRestjson1_deserializeEventMessageInvokeWithResponseStreamCompleteEvent(&vv.Value, msg); err != nil { + return err + } + *v = vv + return nil + + case strings.EqualFold("PayloadChunk", eventType.String()): + vv := &types.InvokeWithResponseStreamResponseEventMemberPayloadChunk{} + if err := awsRestjson1_deserializeEventMessageInvokeResponseStreamUpdate(&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 awsRestjson1_deserializeEventStreamExceptionInvokeWithResponseStreamResponseEvent(msg *eventstream.Message) error { + exceptionType := msg.Headers.Get(eventstreamapi.ExceptionTypeHeader) + if exceptionType == nil { + return fmt.Errorf("%s event header not present", eventstreamapi.ExceptionTypeHeader) + } + + switch { + 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 awsRestjson1_deserializeEventMessageInvokeResponseStreamUpdate(v *types.InvokeResponseStreamUpdate, msg *eventstream.Message) error { + if v == nil { + return fmt.Errorf("unexpected serialization of nil %T", v) + } + + if msg.Payload != nil { + bsv := make([]byte, len(msg.Payload)) + copy(bsv, msg.Payload) + + v.Payload = bsv + } + return nil +} + +func awsRestjson1_deserializeEventMessageInvokeWithResponseStreamCompleteEvent(v *types.InvokeWithResponseStreamCompleteEvent, 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 := awsRestjson1_deserializeDocumentInvokeWithResponseStreamCompleteEvent(&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 awsRestjson1_deserializeDocumentInvokeWithResponseStreamCompleteEvent(v **types.InvokeWithResponseStreamCompleteEvent, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.InvokeWithResponseStreamCompleteEvent + if *v == nil { + sv = &types.InvokeWithResponseStreamCompleteEvent{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ErrorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ErrorCode = ptr.String(jtv) + } + + case "ErrorDetails": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ErrorDetails = ptr.String(jtv) + } + + case "LogResult": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.LogResult = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeOpHttpBindingsTooManyRequestsException(v *types.TooManyRequestsException, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("Retry-After"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.RetryAfterSeconds = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestjson1_deserializeErrorCodeSigningConfigNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.CodeSigningConfigNotFoundException{} + 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 + } + + err := awsRestjson1_deserializeDocumentCodeSigningConfigNotFoundException(&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 awsRestjson1_deserializeErrorCodeStorageExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.CodeStorageExceededException{} + 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 + } + + err := awsRestjson1_deserializeDocumentCodeStorageExceededException(&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 awsRestjson1_deserializeErrorCodeVerificationFailedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.CodeVerificationFailedException{} + 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 + } + + err := awsRestjson1_deserializeDocumentCodeVerificationFailedException(&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 awsRestjson1_deserializeErrorEC2AccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.EC2AccessDeniedException{} + 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 + } + + err := awsRestjson1_deserializeDocumentEC2AccessDeniedException(&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 awsRestjson1_deserializeErrorEC2ThrottledException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.EC2ThrottledException{} + 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 + } + + err := awsRestjson1_deserializeDocumentEC2ThrottledException(&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 awsRestjson1_deserializeErrorEC2UnexpectedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.EC2UnexpectedException{} + 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 + } + + err := awsRestjson1_deserializeDocumentEC2UnexpectedException(&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 awsRestjson1_deserializeErrorEFSIOException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.EFSIOException{} + 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 + } + + err := awsRestjson1_deserializeDocumentEFSIOException(&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 awsRestjson1_deserializeErrorEFSMountConnectivityException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.EFSMountConnectivityException{} + 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 + } + + err := awsRestjson1_deserializeDocumentEFSMountConnectivityException(&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 awsRestjson1_deserializeErrorEFSMountFailureException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.EFSMountFailureException{} + 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 + } + + err := awsRestjson1_deserializeDocumentEFSMountFailureException(&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 awsRestjson1_deserializeErrorEFSMountTimeoutException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.EFSMountTimeoutException{} + 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 + } + + err := awsRestjson1_deserializeDocumentEFSMountTimeoutException(&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 awsRestjson1_deserializeErrorENILimitReachedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ENILimitReachedException{} + 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 + } + + err := awsRestjson1_deserializeDocumentENILimitReachedException(&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 awsRestjson1_deserializeErrorInvalidCodeSignatureException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidCodeSignatureException{} + 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 + } + + err := awsRestjson1_deserializeDocumentInvalidCodeSignatureException(&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 awsRestjson1_deserializeErrorInvalidParameterValueException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidParameterValueException{} + 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 + } + + err := awsRestjson1_deserializeDocumentInvalidParameterValueException(&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 awsRestjson1_deserializeErrorInvalidRequestContentException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidRequestContentException{} + 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 + } + + err := awsRestjson1_deserializeDocumentInvalidRequestContentException(&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 awsRestjson1_deserializeErrorInvalidRuntimeException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidRuntimeException{} + 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 + } + + err := awsRestjson1_deserializeDocumentInvalidRuntimeException(&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 awsRestjson1_deserializeErrorInvalidSecurityGroupIDException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidSecurityGroupIDException{} + 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 + } + + err := awsRestjson1_deserializeDocumentInvalidSecurityGroupIDException(&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 awsRestjson1_deserializeErrorInvalidSubnetIDException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidSubnetIDException{} + 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 + } + + err := awsRestjson1_deserializeDocumentInvalidSubnetIDException(&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 awsRestjson1_deserializeErrorInvalidZipFileException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidZipFileException{} + 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 + } + + err := awsRestjson1_deserializeDocumentInvalidZipFileException(&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 awsRestjson1_deserializeErrorKMSAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.KMSAccessDeniedException{} + 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 + } + + err := awsRestjson1_deserializeDocumentKMSAccessDeniedException(&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 awsRestjson1_deserializeErrorKMSDisabledException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.KMSDisabledException{} + 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 + } + + err := awsRestjson1_deserializeDocumentKMSDisabledException(&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 awsRestjson1_deserializeErrorKMSInvalidStateException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.KMSInvalidStateException{} + 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 + } + + err := awsRestjson1_deserializeDocumentKMSInvalidStateException(&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 awsRestjson1_deserializeErrorKMSNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.KMSNotFoundException{} + 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 + } + + err := awsRestjson1_deserializeDocumentKMSNotFoundException(&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 awsRestjson1_deserializeErrorPolicyLengthExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.PolicyLengthExceededException{} + 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 + } + + err := awsRestjson1_deserializeDocumentPolicyLengthExceededException(&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 awsRestjson1_deserializeErrorPreconditionFailedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.PreconditionFailedException{} + 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 + } + + err := awsRestjson1_deserializeDocumentPreconditionFailedException(&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 awsRestjson1_deserializeErrorProvisionedConcurrencyConfigNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ProvisionedConcurrencyConfigNotFoundException{} + 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 + } + + err := awsRestjson1_deserializeDocumentProvisionedConcurrencyConfigNotFoundException(&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 awsRestjson1_deserializeErrorRecursiveInvocationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.RecursiveInvocationException{} + 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 + } + + err := awsRestjson1_deserializeDocumentRecursiveInvocationException(&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 awsRestjson1_deserializeErrorRequestTooLargeException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.RequestTooLargeException{} + 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 + } + + err := awsRestjson1_deserializeDocumentRequestTooLargeException(&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 awsRestjson1_deserializeErrorResourceConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ResourceConflictException{} + 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 + } + + err := awsRestjson1_deserializeDocumentResourceConflictException(&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 awsRestjson1_deserializeErrorResourceInUseException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ResourceInUseException{} + 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 + } + + err := awsRestjson1_deserializeDocumentResourceInUseException(&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 awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ResourceNotFoundException{} + 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 + } + + err := awsRestjson1_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 awsRestjson1_deserializeErrorResourceNotReadyException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ResourceNotReadyException{} + 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 + } + + err := awsRestjson1_deserializeDocumentResourceNotReadyException(&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 awsRestjson1_deserializeErrorServiceException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ServiceException{} + 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 + } + + err := awsRestjson1_deserializeDocumentServiceException(&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 awsRestjson1_deserializeErrorSnapStartException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.SnapStartException{} + 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 + } + + err := awsRestjson1_deserializeDocumentSnapStartException(&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 awsRestjson1_deserializeErrorSnapStartNotReadyException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.SnapStartNotReadyException{} + 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 + } + + err := awsRestjson1_deserializeDocumentSnapStartNotReadyException(&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 awsRestjson1_deserializeErrorSnapStartTimeoutException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.SnapStartTimeoutException{} + 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 + } + + err := awsRestjson1_deserializeDocumentSnapStartTimeoutException(&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 awsRestjson1_deserializeErrorSubnetIPAddressLimitReachedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.SubnetIPAddressLimitReachedException{} + 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 + } + + err := awsRestjson1_deserializeDocumentSubnetIPAddressLimitReachedException(&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 awsRestjson1_deserializeErrorTooManyRequestsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyRequestsException{} + 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 + } + + err := awsRestjson1_deserializeDocumentTooManyRequestsException(&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) + + if err := awsRestjson1_deserializeOpHttpBindingsTooManyRequestsException(output, response); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response error with invalid HTTP bindings, %w", err)} + } + + return output +} + +func awsRestjson1_deserializeErrorUnsupportedMediaTypeException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.UnsupportedMediaTypeException{} + 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 + } + + err := awsRestjson1_deserializeDocumentUnsupportedMediaTypeException(&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 awsRestjson1_deserializeDocumentAccountLimit(v **types.AccountLimit, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.AccountLimit + if *v == nil { + sv = &types.AccountLimit{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CodeSizeUnzipped": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.CodeSizeUnzipped = i64 + } + + case "CodeSizeZipped": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.CodeSizeZipped = i64 + } + + case "ConcurrentExecutions": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ConcurrentExecutions = int32(i64) + } + + case "TotalCodeSize": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TotalCodeSize = i64 + } + + case "UnreservedConcurrentExecutions": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected UnreservedConcurrentExecutions to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.UnreservedConcurrentExecutions = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAccountUsage(v **types.AccountUsage, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.AccountUsage + if *v == nil { + sv = &types.AccountUsage{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "FunctionCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.FunctionCount = i64 + } + + case "TotalCodeSize": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TotalCodeSize = i64 + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAdditionalVersionWeights(v *map[string]float64, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %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]float64 + if *v == nil { + mv = map[string]float64{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal float64 + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + parsedVal = 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) + + } + parsedVal = f64 + + default: + return fmt.Errorf("expected Weight to be a JSON Number, got %T instead", value) + + } + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_deserializeDocumentAliasConfiguration(v **types.AliasConfiguration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.AliasConfiguration + if *v == nil { + sv = &types.AliasConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AliasArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value) + } + sv.AliasArn = 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 "FunctionVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Version to be of type string, got %T instead", value) + } + sv.FunctionVersion = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Alias to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "RevisionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RevisionId = ptr.String(jtv) + } + + case "RoutingConfig": + if err := awsRestjson1_deserializeDocumentAliasRoutingConfiguration(&sv.RoutingConfig, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAliasList(v *[]types.AliasConfiguration, 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.AliasConfiguration + if *v == nil { + cv = []types.AliasConfiguration{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AliasConfiguration + destAddr := &col + if err := awsRestjson1_deserializeDocumentAliasConfiguration(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentAliasRoutingConfiguration(v **types.AliasRoutingConfiguration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.AliasRoutingConfiguration + if *v == nil { + sv = &types.AliasRoutingConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AdditionalVersionWeights": + if err := awsRestjson1_deserializeDocumentAdditionalVersionWeights(&sv.AdditionalVersionWeights, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAllowedPublishers(v **types.AllowedPublishers, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.AllowedPublishers + if *v == nil { + sv = &types.AllowedPublishers{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "SigningProfileVersionArns": + if err := awsRestjson1_deserializeDocumentSigningProfileVersionArns(&sv.SigningProfileVersionArns, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAllowMethodsList(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 Method to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentAllowOriginsList(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 Origin to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentAmazonManagedKafkaEventSourceConfig(v **types.AmazonManagedKafkaEventSourceConfig, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.AmazonManagedKafkaEventSourceConfig + if *v == nil { + sv = &types.AmazonManagedKafkaEventSourceConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ConsumerGroupId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected URI to be of type string, got %T instead", value) + } + sv.ConsumerGroupId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentArchitecturesList(v *[]types.Architecture, 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.Architecture + if *v == nil { + cv = []types.Architecture{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Architecture + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Architecture to be of type string, got %T instead", value) + } + col = types.Architecture(jtv) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentCodeSigningConfig(v **types.CodeSigningConfig, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.CodeSigningConfig + if *v == nil { + sv = &types.CodeSigningConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AllowedPublishers": + if err := awsRestjson1_deserializeDocumentAllowedPublishers(&sv.AllowedPublishers, value); err != nil { + return err + } + + case "CodeSigningConfigArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CodeSigningConfigArn to be of type string, got %T instead", value) + } + sv.CodeSigningConfigArn = ptr.String(jtv) + } + + case "CodeSigningConfigId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CodeSigningConfigId to be of type string, got %T instead", value) + } + sv.CodeSigningConfigId = ptr.String(jtv) + } + + case "CodeSigningPolicies": + if err := awsRestjson1_deserializeDocumentCodeSigningPolicies(&sv.CodeSigningPolicies, value); err != nil { + return err + } + + 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 "LastModified": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + sv.LastModified = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCodeSigningConfigList(v *[]types.CodeSigningConfig, 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.CodeSigningConfig + if *v == nil { + cv = []types.CodeSigningConfig{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.CodeSigningConfig + destAddr := &col + if err := awsRestjson1_deserializeDocumentCodeSigningConfig(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentCodeSigningConfigNotFoundException(v **types.CodeSigningConfigNotFoundException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.CodeSigningConfigNotFoundException + if *v == nil { + sv = &types.CodeSigningConfigNotFoundException{} + } 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) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Type = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCodeSigningPolicies(v **types.CodeSigningPolicies, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.CodeSigningPolicies + if *v == nil { + sv = &types.CodeSigningPolicies{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "UntrustedArtifactOnDeployment": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CodeSigningPolicy to be of type string, got %T instead", value) + } + sv.UntrustedArtifactOnDeployment = types.CodeSigningPolicy(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCodeStorageExceededException(v **types.CodeStorageExceededException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.CodeStorageExceededException + if *v == nil { + sv = &types.CodeStorageExceededException{} + } 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) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Type = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCodeVerificationFailedException(v **types.CodeVerificationFailedException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.CodeVerificationFailedException + if *v == nil { + sv = &types.CodeVerificationFailedException{} + } 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) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Type = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCompatibleArchitectures(v *[]types.Architecture, 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.Architecture + if *v == nil { + cv = []types.Architecture{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Architecture + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Architecture to be of type string, got %T instead", value) + } + col = types.Architecture(jtv) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentCompatibleRuntimes(v *[]types.Runtime, 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.Runtime + if *v == nil { + cv = []types.Runtime{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Runtime + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Runtime to be of type string, got %T instead", value) + } + col = types.Runtime(jtv) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentConcurrency(v **types.Concurrency, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.Concurrency + if *v == nil { + sv = &types.Concurrency{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ReservedConcurrentExecutions": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ReservedConcurrentExecutions to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ReservedConcurrentExecutions = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCors(v **types.Cors, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.Cors + if *v == nil { + sv = &types.Cors{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AllowCredentials": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected AllowCredentials to be of type *bool, got %T instead", value) + } + sv.AllowCredentials = ptr.Bool(jtv) + } + + case "AllowHeaders": + if err := awsRestjson1_deserializeDocumentHeadersList(&sv.AllowHeaders, value); err != nil { + return err + } + + case "AllowMethods": + if err := awsRestjson1_deserializeDocumentAllowMethodsList(&sv.AllowMethods, value); err != nil { + return err + } + + case "AllowOrigins": + if err := awsRestjson1_deserializeDocumentAllowOriginsList(&sv.AllowOrigins, value); err != nil { + return err + } + + case "ExposeHeaders": + if err := awsRestjson1_deserializeDocumentHeadersList(&sv.ExposeHeaders, value); err != nil { + return err + } + + case "MaxAge": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MaxAge to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaxAge = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentDeadLetterConfig(v **types.DeadLetterConfig, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.DeadLetterConfig + if *v == nil { + sv = &types.DeadLetterConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "TargetArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) + } + sv.TargetArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentDestinationConfig(v **types.DestinationConfig, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.DestinationConfig + if *v == nil { + sv = &types.DestinationConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "OnFailure": + if err := awsRestjson1_deserializeDocumentOnFailure(&sv.OnFailure, value); err != nil { + return err + } + + case "OnSuccess": + if err := awsRestjson1_deserializeDocumentOnSuccess(&sv.OnSuccess, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentDocumentDBEventSourceConfig(v **types.DocumentDBEventSourceConfig, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.DocumentDBEventSourceConfig + if *v == nil { + sv = &types.DocumentDBEventSourceConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CollectionName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CollectionName to be of type string, got %T instead", value) + } + sv.CollectionName = ptr.String(jtv) + } + + case "DatabaseName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DatabaseName to be of type string, got %T instead", value) + } + sv.DatabaseName = ptr.String(jtv) + } + + case "FullDocument": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FullDocument to be of type string, got %T instead", value) + } + sv.FullDocument = types.FullDocument(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentEC2AccessDeniedException(v **types.EC2AccessDeniedException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.EC2AccessDeniedException + if *v == nil { + sv = &types.EC2AccessDeniedException{} + } 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) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Type = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentEC2ThrottledException(v **types.EC2ThrottledException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.EC2ThrottledException + if *v == nil { + sv = &types.EC2ThrottledException{} + } 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) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Type = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentEC2UnexpectedException(v **types.EC2UnexpectedException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.EC2UnexpectedException + if *v == nil { + sv = &types.EC2UnexpectedException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "EC2ErrorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.EC2ErrorCode = ptr.String(jtv) + } + + 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) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Type = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentEFSIOException(v **types.EFSIOException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.EFSIOException + if *v == nil { + sv = &types.EFSIOException{} + } 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) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Type = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentEFSMountConnectivityException(v **types.EFSMountConnectivityException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.EFSMountConnectivityException + if *v == nil { + sv = &types.EFSMountConnectivityException{} + } 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) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Type = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentEFSMountFailureException(v **types.EFSMountFailureException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.EFSMountFailureException + if *v == nil { + sv = &types.EFSMountFailureException{} + } 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) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Type = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentEFSMountTimeoutException(v **types.EFSMountTimeoutException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.EFSMountTimeoutException + if *v == nil { + sv = &types.EFSMountTimeoutException{} + } 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) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Type = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentEndpointLists(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 Endpoint to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentEndpoints(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 + mapVar := parsedVal + if err := awsRestjson1_deserializeDocumentEndpointLists(&mapVar, value); err != nil { + return err + } + parsedVal = mapVar + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_deserializeDocumentENILimitReachedException(v **types.ENILimitReachedException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.ENILimitReachedException + if *v == nil { + sv = &types.ENILimitReachedException{} + } 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) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Type = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentEnvironmentError(v **types.EnvironmentError, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.EnvironmentError + if *v == nil { + sv = &types.EnvironmentError{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ErrorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ErrorCode = ptr.String(jtv) + } + + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SensitiveString to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentEnvironmentResponse(v **types.EnvironmentResponse, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.EnvironmentResponse + if *v == nil { + sv = &types.EnvironmentResponse{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Error": + if err := awsRestjson1_deserializeDocumentEnvironmentError(&sv.Error, value); err != nil { + return err + } + + case "Variables": + if err := awsRestjson1_deserializeDocumentEnvironmentVariables(&sv.Variables, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentEnvironmentVariables(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 EnvironmentVariableValue to be of type string, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_deserializeDocumentEphemeralStorage(v **types.EphemeralStorage, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.EphemeralStorage + if *v == nil { + sv = &types.EphemeralStorage{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Size": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected EphemeralStorageSize to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Size = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentEventSourceMappingConfiguration(v **types.EventSourceMappingConfiguration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.EventSourceMappingConfiguration + if *v == nil { + sv = &types.EventSourceMappingConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AmazonManagedKafkaEventSourceConfig": + if err := awsRestjson1_deserializeDocumentAmazonManagedKafkaEventSourceConfig(&sv.AmazonManagedKafkaEventSourceConfig, value); err != nil { + return err + } + + case "BatchSize": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected BatchSize to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.BatchSize = ptr.Int32(int32(i64)) + } + + case "BisectBatchOnFunctionError": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected BisectBatchOnFunctionError to be of type *bool, got %T instead", value) + } + sv.BisectBatchOnFunctionError = ptr.Bool(jtv) + } + + case "DestinationConfig": + if err := awsRestjson1_deserializeDocumentDestinationConfig(&sv.DestinationConfig, value); err != nil { + return err + } + + case "DocumentDBEventSourceConfig": + if err := awsRestjson1_deserializeDocumentDocumentDBEventSourceConfig(&sv.DocumentDBEventSourceConfig, value); err != nil { + return err + } + + case "EventSourceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.EventSourceArn = ptr.String(jtv) + } + + case "EventSourceMappingArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EventSourceMappingArn to be of type string, got %T instead", value) + } + sv.EventSourceMappingArn = ptr.String(jtv) + } + + case "FilterCriteria": + if err := awsRestjson1_deserializeDocumentFilterCriteria(&sv.FilterCriteria, value); err != nil { + return err + } + + case "FilterCriteriaError": + if err := awsRestjson1_deserializeDocumentFilterCriteriaError(&sv.FilterCriteriaError, value); err != nil { + return err + } + + case "FunctionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value) + } + sv.FunctionArn = ptr.String(jtv) + } + + case "FunctionResponseTypes": + if err := awsRestjson1_deserializeDocumentFunctionResponseTypeList(&sv.FunctionResponseTypes, value); err != nil { + return err + } + + case "KMSKeyArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected KMSKeyArn to be of type string, got %T instead", value) + } + sv.KMSKeyArn = 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 Date to be a JSON Number, got %T instead", value) + + } + } + + case "LastProcessingResult": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.LastProcessingResult = ptr.String(jtv) + } + + case "MaximumBatchingWindowInSeconds": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MaximumBatchingWindowInSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaximumBatchingWindowInSeconds = ptr.Int32(int32(i64)) + } + + case "MaximumRecordAgeInSeconds": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MaximumRecordAgeInSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaximumRecordAgeInSeconds = ptr.Int32(int32(i64)) + } + + case "MaximumRetryAttempts": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MaximumRetryAttemptsEventSourceMapping to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaximumRetryAttempts = ptr.Int32(int32(i64)) + } + + case "MetricsConfig": + if err := awsRestjson1_deserializeDocumentEventSourceMappingMetricsConfig(&sv.MetricsConfig, value); err != nil { + return err + } + + case "ParallelizationFactor": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ParallelizationFactor to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ParallelizationFactor = ptr.Int32(int32(i64)) + } + + case "ProvisionedPollerConfig": + if err := awsRestjson1_deserializeDocumentProvisionedPollerConfig(&sv.ProvisionedPollerConfig, value); err != nil { + return err + } + + case "Queues": + if err := awsRestjson1_deserializeDocumentQueues(&sv.Queues, value); err != nil { + return err + } + + case "ScalingConfig": + if err := awsRestjson1_deserializeDocumentScalingConfig(&sv.ScalingConfig, value); err != nil { + return err + } + + case "SelfManagedEventSource": + if err := awsRestjson1_deserializeDocumentSelfManagedEventSource(&sv.SelfManagedEventSource, value); err != nil { + return err + } + + case "SelfManagedKafkaEventSourceConfig": + if err := awsRestjson1_deserializeDocumentSelfManagedKafkaEventSourceConfig(&sv.SelfManagedKafkaEventSourceConfig, value); err != nil { + return err + } + + case "SourceAccessConfigurations": + if err := awsRestjson1_deserializeDocumentSourceAccessConfigurations(&sv.SourceAccessConfigurations, value); err != nil { + return err + } + + case "StartingPosition": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EventSourcePosition to be of type string, got %T instead", value) + } + sv.StartingPosition = types.EventSourcePosition(jtv) + } + + case "StartingPositionTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartingPositionTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + + } + } + + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.State = ptr.String(jtv) + } + + case "StateTransitionReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.StateTransitionReason = ptr.String(jtv) + } + + case "Topics": + if err := awsRestjson1_deserializeDocumentTopics(&sv.Topics, value); err != nil { + return err + } + + case "TumblingWindowInSeconds": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected TumblingWindowInSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TumblingWindowInSeconds = ptr.Int32(int32(i64)) + } + + case "UUID": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.UUID = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentEventSourceMappingMetricList(v *[]types.EventSourceMappingMetric, 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.EventSourceMappingMetric + if *v == nil { + cv = []types.EventSourceMappingMetric{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.EventSourceMappingMetric + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EventSourceMappingMetric to be of type string, got %T instead", value) + } + col = types.EventSourceMappingMetric(jtv) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentEventSourceMappingMetricsConfig(v **types.EventSourceMappingMetricsConfig, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.EventSourceMappingMetricsConfig + if *v == nil { + sv = &types.EventSourceMappingMetricsConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Metrics": + if err := awsRestjson1_deserializeDocumentEventSourceMappingMetricList(&sv.Metrics, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentEventSourceMappingsList(v *[]types.EventSourceMappingConfiguration, 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.EventSourceMappingConfiguration + if *v == nil { + cv = []types.EventSourceMappingConfiguration{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.EventSourceMappingConfiguration + destAddr := &col + if err := awsRestjson1_deserializeDocumentEventSourceMappingConfiguration(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentFileSystemConfig(v **types.FileSystemConfig, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.FileSystemConfig + if *v == nil { + sv = &types.FileSystemConfig{} + } 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 FileSystemArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "LocalMountPath": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LocalMountPath to be of type string, got %T instead", value) + } + sv.LocalMountPath = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentFileSystemConfigList(v *[]types.FileSystemConfig, 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.FileSystemConfig + if *v == nil { + cv = []types.FileSystemConfig{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.FileSystemConfig + destAddr := &col + if err := awsRestjson1_deserializeDocumentFileSystemConfig(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentFilter(v **types.Filter, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.Filter + if *v == nil { + sv = &types.Filter{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Pattern": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Pattern to be of type string, got %T instead", value) + } + sv.Pattern = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentFilterCriteria(v **types.FilterCriteria, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.FilterCriteria + if *v == nil { + sv = &types.FilterCriteria{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Filters": + if err := awsRestjson1_deserializeDocumentFilterList(&sv.Filters, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentFilterCriteriaError(v **types.FilterCriteriaError, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.FilterCriteriaError + if *v == nil { + sv = &types.FilterCriteriaError{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ErrorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FilterCriteriaErrorCode to be of type string, got %T instead", value) + } + sv.ErrorCode = ptr.String(jtv) + } + + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FilterCriteriaErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentFilterList(v *[]types.Filter, 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.Filter + if *v == nil { + cv = []types.Filter{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Filter + destAddr := &col + if err := awsRestjson1_deserializeDocumentFilter(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentFunctionArnList(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 FunctionArn to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentFunctionCodeLocation(v **types.FunctionCodeLocation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.FunctionCodeLocation + if *v == nil { + sv = &types.FunctionCodeLocation{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ImageUri": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ImageUri = 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 "RepositoryType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RepositoryType = ptr.String(jtv) + } + + case "ResolvedImageUri": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ResolvedImageUri = ptr.String(jtv) + } + + case "SourceKMSKeyArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.SourceKMSKeyArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentFunctionConfiguration(v **types.FunctionConfiguration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.FunctionConfiguration + if *v == nil { + sv = &types.FunctionConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Architectures": + if err := awsRestjson1_deserializeDocumentArchitecturesList(&sv.Architectures, value); err != nil { + return err + } + + case "CodeSha256": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.CodeSha256 = ptr.String(jtv) + } + + case "CodeSize": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.CodeSize = i64 + } + + case "DeadLetterConfig": + if err := awsRestjson1_deserializeDocumentDeadLetterConfig(&sv.DeadLetterConfig, value); err != nil { + return err + } + + 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 "Environment": + if err := awsRestjson1_deserializeDocumentEnvironmentResponse(&sv.Environment, value); err != nil { + return err + } + + case "EphemeralStorage": + if err := awsRestjson1_deserializeDocumentEphemeralStorage(&sv.EphemeralStorage, value); err != nil { + return err + } + + case "FileSystemConfigs": + if err := awsRestjson1_deserializeDocumentFileSystemConfigList(&sv.FileSystemConfigs, value); err != nil { + return err + } + + case "FunctionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NameSpacedFunctionArn to be of type string, got %T instead", value) + } + sv.FunctionArn = ptr.String(jtv) + } + + case "FunctionName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NamespacedFunctionName to be of type string, got %T instead", value) + } + sv.FunctionName = ptr.String(jtv) + } + + case "Handler": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Handler to be of type string, got %T instead", value) + } + sv.Handler = ptr.String(jtv) + } + + case "ImageConfigResponse": + if err := awsRestjson1_deserializeDocumentImageConfigResponse(&sv.ImageConfigResponse, value); err != nil { + return err + } + + case "KMSKeyArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected KMSKeyArn to be of type string, got %T instead", value) + } + sv.KMSKeyArn = ptr.String(jtv) + } + + case "LastModified": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + sv.LastModified = ptr.String(jtv) + } + + case "LastUpdateStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LastUpdateStatus to be of type string, got %T instead", value) + } + sv.LastUpdateStatus = types.LastUpdateStatus(jtv) + } + + case "LastUpdateStatusReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LastUpdateStatusReason to be of type string, got %T instead", value) + } + sv.LastUpdateStatusReason = ptr.String(jtv) + } + + case "LastUpdateStatusReasonCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LastUpdateStatusReasonCode to be of type string, got %T instead", value) + } + sv.LastUpdateStatusReasonCode = types.LastUpdateStatusReasonCode(jtv) + } + + case "Layers": + if err := awsRestjson1_deserializeDocumentLayersReferenceList(&sv.Layers, value); err != nil { + return err + } + + case "LoggingConfig": + if err := awsRestjson1_deserializeDocumentLoggingConfig(&sv.LoggingConfig, value); err != nil { + return err + } + + case "MasterArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value) + } + sv.MasterArn = ptr.String(jtv) + } + + case "MemorySize": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MemorySize to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MemorySize = ptr.Int32(int32(i64)) + } + + case "PackageType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PackageType to be of type string, got %T instead", value) + } + sv.PackageType = types.PackageType(jtv) + } + + case "RevisionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RevisionId = ptr.String(jtv) + } + + case "Role": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value) + } + sv.Role = ptr.String(jtv) + } + + case "Runtime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Runtime to be of type string, got %T instead", value) + } + sv.Runtime = types.Runtime(jtv) + } + + case "RuntimeVersionConfig": + if err := awsRestjson1_deserializeDocumentRuntimeVersionConfig(&sv.RuntimeVersionConfig, value); err != nil { + return err + } + + case "SigningJobArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.SigningJobArn = ptr.String(jtv) + } + + case "SigningProfileVersionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.SigningProfileVersionArn = ptr.String(jtv) + } + + case "SnapStart": + if err := awsRestjson1_deserializeDocumentSnapStartResponse(&sv.SnapStart, value); err != nil { + return err + } + + 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 "StateReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StateReason to be of type string, got %T instead", value) + } + sv.StateReason = ptr.String(jtv) + } + + case "StateReasonCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StateReasonCode to be of type string, got %T instead", value) + } + sv.StateReasonCode = types.StateReasonCode(jtv) + } + + case "Timeout": + 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.Timeout = ptr.Int32(int32(i64)) + } + + case "TracingConfig": + if err := awsRestjson1_deserializeDocumentTracingConfigResponse(&sv.TracingConfig, value); err != nil { + return err + } + + case "Version": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Version to be of type string, got %T instead", value) + } + sv.Version = ptr.String(jtv) + } + + case "VpcConfig": + if err := awsRestjson1_deserializeDocumentVpcConfigResponse(&sv.VpcConfig, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentFunctionEventInvokeConfig(v **types.FunctionEventInvokeConfig, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.FunctionEventInvokeConfig + if *v == nil { + sv = &types.FunctionEventInvokeConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DestinationConfig": + if err := awsRestjson1_deserializeDocumentDestinationConfig(&sv.DestinationConfig, value); err != nil { + return err + } + + case "FunctionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value) + } + sv.FunctionArn = 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 Date to be a JSON Number, got %T instead", value) + + } + } + + case "MaximumEventAgeInSeconds": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MaximumEventAgeInSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaximumEventAgeInSeconds = ptr.Int32(int32(i64)) + } + + case "MaximumRetryAttempts": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MaximumRetryAttempts to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaximumRetryAttempts = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentFunctionEventInvokeConfigList(v *[]types.FunctionEventInvokeConfig, 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.FunctionEventInvokeConfig + if *v == nil { + cv = []types.FunctionEventInvokeConfig{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.FunctionEventInvokeConfig + destAddr := &col + if err := awsRestjson1_deserializeDocumentFunctionEventInvokeConfig(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentFunctionList(v *[]types.FunctionConfiguration, 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.FunctionConfiguration + if *v == nil { + cv = []types.FunctionConfiguration{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.FunctionConfiguration + destAddr := &col + if err := awsRestjson1_deserializeDocumentFunctionConfiguration(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentFunctionResponseTypeList(v *[]types.FunctionResponseType, 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.FunctionResponseType + if *v == nil { + cv = []types.FunctionResponseType{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.FunctionResponseType + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FunctionResponseType to be of type string, got %T instead", value) + } + col = types.FunctionResponseType(jtv) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentFunctionUrlConfig(v **types.FunctionUrlConfig, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.FunctionUrlConfig + if *v == nil { + sv = &types.FunctionUrlConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AuthType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FunctionUrlAuthType to be of type string, got %T instead", value) + } + sv.AuthType = types.FunctionUrlAuthType(jtv) + } + + case "Cors": + if err := awsRestjson1_deserializeDocumentCors(&sv.Cors, value); err != nil { + return err + } + + case "CreationTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + sv.CreationTime = ptr.String(jtv) + } + + case "FunctionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value) + } + sv.FunctionArn = ptr.String(jtv) + } + + case "FunctionUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FunctionUrl to be of type string, got %T instead", value) + } + sv.FunctionUrl = ptr.String(jtv) + } + + case "InvokeMode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InvokeMode to be of type string, got %T instead", value) + } + sv.InvokeMode = types.InvokeMode(jtv) + } + + case "LastModifiedTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + sv.LastModifiedTime = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentFunctionUrlConfigList(v *[]types.FunctionUrlConfig, 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.FunctionUrlConfig + if *v == nil { + cv = []types.FunctionUrlConfig{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.FunctionUrlConfig + destAddr := &col + if err := awsRestjson1_deserializeDocumentFunctionUrlConfig(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentHeadersList(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 Header to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentImageConfig(v **types.ImageConfig, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.ImageConfig + if *v == nil { + sv = &types.ImageConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Command": + if err := awsRestjson1_deserializeDocumentStringList(&sv.Command, value); err != nil { + return err + } + + case "EntryPoint": + if err := awsRestjson1_deserializeDocumentStringList(&sv.EntryPoint, value); err != nil { + return err + } + + case "WorkingDirectory": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WorkingDirectory to be of type string, got %T instead", value) + } + sv.WorkingDirectory = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentImageConfigError(v **types.ImageConfigError, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.ImageConfigError + if *v == nil { + sv = &types.ImageConfigError{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ErrorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ErrorCode = ptr.String(jtv) + } + + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SensitiveString to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentImageConfigResponse(v **types.ImageConfigResponse, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.ImageConfigResponse + if *v == nil { + sv = &types.ImageConfigResponse{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Error": + if err := awsRestjson1_deserializeDocumentImageConfigError(&sv.Error, value); err != nil { + return err + } + + case "ImageConfig": + if err := awsRestjson1_deserializeDocumentImageConfig(&sv.ImageConfig, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentInvalidCodeSignatureException(v **types.InvalidCodeSignatureException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.InvalidCodeSignatureException + if *v == nil { + sv = &types.InvalidCodeSignatureException{} + } 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) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Type = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentInvalidParameterValueException(v **types.InvalidParameterValueException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.InvalidParameterValueException + if *v == nil { + sv = &types.InvalidParameterValueException{} + } 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) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Type = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentInvalidRequestContentException(v **types.InvalidRequestContentException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.InvalidRequestContentException + if *v == nil { + sv = &types.InvalidRequestContentException{} + } 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) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Type = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentInvalidRuntimeException(v **types.InvalidRuntimeException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.InvalidRuntimeException + if *v == nil { + sv = &types.InvalidRuntimeException{} + } 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) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Type = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentInvalidSecurityGroupIDException(v **types.InvalidSecurityGroupIDException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.InvalidSecurityGroupIDException + if *v == nil { + sv = &types.InvalidSecurityGroupIDException{} + } 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) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Type = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentInvalidSubnetIDException(v **types.InvalidSubnetIDException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.InvalidSubnetIDException + if *v == nil { + sv = &types.InvalidSubnetIDException{} + } 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) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Type = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentInvalidZipFileException(v **types.InvalidZipFileException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.InvalidZipFileException + if *v == nil { + sv = &types.InvalidZipFileException{} + } 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) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Type = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentKMSAccessDeniedException(v **types.KMSAccessDeniedException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.KMSAccessDeniedException + if *v == nil { + sv = &types.KMSAccessDeniedException{} + } 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) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Type = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentKMSDisabledException(v **types.KMSDisabledException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.KMSDisabledException + if *v == nil { + sv = &types.KMSDisabledException{} + } 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) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Type = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentKMSInvalidStateException(v **types.KMSInvalidStateException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.KMSInvalidStateException + if *v == nil { + sv = &types.KMSInvalidStateException{} + } 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) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Type = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentKMSNotFoundException(v **types.KMSNotFoundException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.KMSNotFoundException + if *v == nil { + sv = &types.KMSNotFoundException{} + } 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) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Type = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentLayer(v **types.Layer, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.Layer + if *v == nil { + sv = &types.Layer{} + } 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 LayerVersionArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "CodeSize": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.CodeSize = i64 + } + + case "SigningJobArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.SigningJobArn = ptr.String(jtv) + } + + case "SigningProfileVersionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.SigningProfileVersionArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentLayersList(v *[]types.LayersListItem, 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.LayersListItem + if *v == nil { + cv = []types.LayersListItem{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.LayersListItem + destAddr := &col + if err := awsRestjson1_deserializeDocumentLayersListItem(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentLayersListItem(v **types.LayersListItem, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.LayersListItem + if *v == nil { + sv = &types.LayersListItem{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "LatestMatchingVersion": + if err := awsRestjson1_deserializeDocumentLayerVersionsListItem(&sv.LatestMatchingVersion, value); err != nil { + return err + } + + case "LayerArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LayerArn to be of type string, got %T instead", value) + } + sv.LayerArn = ptr.String(jtv) + } + + case "LayerName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LayerName to be of type string, got %T instead", value) + } + sv.LayerName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentLayersReferenceList(v *[]types.Layer, 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.Layer + if *v == nil { + cv = []types.Layer{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Layer + destAddr := &col + if err := awsRestjson1_deserializeDocumentLayer(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentLayerVersionContentOutput(v **types.LayerVersionContentOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.LayerVersionContentOutput + if *v == nil { + sv = &types.LayerVersionContentOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CodeSha256": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.CodeSha256 = ptr.String(jtv) + } + + case "CodeSize": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.CodeSize = i64 + } + + 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 "SigningJobArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.SigningJobArn = ptr.String(jtv) + } + + case "SigningProfileVersionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.SigningProfileVersionArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentLayerVersionsList(v *[]types.LayerVersionsListItem, 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.LayerVersionsListItem + if *v == nil { + cv = []types.LayerVersionsListItem{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.LayerVersionsListItem + destAddr := &col + if err := awsRestjson1_deserializeDocumentLayerVersionsListItem(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentLayerVersionsListItem(v **types.LayerVersionsListItem, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.LayerVersionsListItem + if *v == nil { + sv = &types.LayerVersionsListItem{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CompatibleArchitectures": + if err := awsRestjson1_deserializeDocumentCompatibleArchitectures(&sv.CompatibleArchitectures, value); err != nil { + return err + } + + case "CompatibleRuntimes": + if err := awsRestjson1_deserializeDocumentCompatibleRuntimes(&sv.CompatibleRuntimes, value); err != nil { + return err + } + + case "CreatedDate": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + sv.CreatedDate = 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 "LayerVersionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LayerVersionArn to be of type string, got %T instead", value) + } + sv.LayerVersionArn = ptr.String(jtv) + } + + case "LicenseInfo": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LicenseInfo to be of type string, got %T instead", value) + } + sv.LicenseInfo = ptr.String(jtv) + } + + case "Version": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected LayerVersionNumber to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Version = i64 + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentLoggingConfig(v **types.LoggingConfig, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.LoggingConfig + if *v == nil { + sv = &types.LoggingConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ApplicationLogLevel": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ApplicationLogLevel to be of type string, got %T instead", value) + } + sv.ApplicationLogLevel = types.ApplicationLogLevel(jtv) + } + + case "LogFormat": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LogFormat to be of type string, got %T instead", value) + } + sv.LogFormat = types.LogFormat(jtv) + } + + case "LogGroup": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LogGroup to be of type string, got %T instead", value) + } + sv.LogGroup = ptr.String(jtv) + } + + case "SystemLogLevel": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SystemLogLevel to be of type string, got %T instead", value) + } + sv.SystemLogLevel = types.SystemLogLevel(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentOnFailure(v **types.OnFailure, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.OnFailure + if *v == nil { + sv = &types.OnFailure{} + } 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 DestinationArn to be of type string, got %T instead", value) + } + sv.Destination = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentOnSuccess(v **types.OnSuccess, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.OnSuccess + if *v == nil { + sv = &types.OnSuccess{} + } 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 DestinationArn to be of type string, got %T instead", value) + } + sv.Destination = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentPolicyLengthExceededException(v **types.PolicyLengthExceededException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.PolicyLengthExceededException + if *v == nil { + sv = &types.PolicyLengthExceededException{} + } 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) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Type = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentPreconditionFailedException(v **types.PreconditionFailedException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.PreconditionFailedException + if *v == nil { + sv = &types.PreconditionFailedException{} + } 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) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Type = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentProvisionedConcurrencyConfigList(v *[]types.ProvisionedConcurrencyConfigListItem, 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.ProvisionedConcurrencyConfigListItem + if *v == nil { + cv = []types.ProvisionedConcurrencyConfigListItem{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ProvisionedConcurrencyConfigListItem + destAddr := &col + if err := awsRestjson1_deserializeDocumentProvisionedConcurrencyConfigListItem(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentProvisionedConcurrencyConfigListItem(v **types.ProvisionedConcurrencyConfigListItem, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.ProvisionedConcurrencyConfigListItem + if *v == nil { + sv = &types.ProvisionedConcurrencyConfigListItem{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AllocatedProvisionedConcurrentExecutions": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected NonNegativeInteger to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.AllocatedProvisionedConcurrentExecutions = ptr.Int32(int32(i64)) + } + + case "AvailableProvisionedConcurrentExecutions": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected NonNegativeInteger to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.AvailableProvisionedConcurrentExecutions = ptr.Int32(int32(i64)) + } + + case "FunctionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value) + } + sv.FunctionArn = ptr.String(jtv) + } + + case "LastModified": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + sv.LastModified = ptr.String(jtv) + } + + case "RequestedProvisionedConcurrentExecutions": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected PositiveInteger to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.RequestedProvisionedConcurrentExecutions = ptr.Int32(int32(i64)) + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProvisionedConcurrencyStatusEnum to be of type string, got %T instead", value) + } + sv.Status = types.ProvisionedConcurrencyStatusEnum(jtv) + } + + case "StatusReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.StatusReason = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentProvisionedConcurrencyConfigNotFoundException(v **types.ProvisionedConcurrencyConfigNotFoundException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.ProvisionedConcurrencyConfigNotFoundException + if *v == nil { + sv = &types.ProvisionedConcurrencyConfigNotFoundException{} + } 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) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Type = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentProvisionedPollerConfig(v **types.ProvisionedPollerConfig, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.ProvisionedPollerConfig + if *v == nil { + sv = &types.ProvisionedPollerConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "MaximumPollers": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MaximumNumberOfPollers to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaximumPollers = ptr.Int32(int32(i64)) + } + + case "MinimumPollers": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MinimumNumberOfPollers to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MinimumPollers = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentQueues(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 Queue to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRecursiveInvocationException(v **types.RecursiveInvocationException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.RecursiveInvocationException + if *v == nil { + sv = &types.RecursiveInvocationException{} + } 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) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Type = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRequestTooLargeException(v **types.RequestTooLargeException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.RequestTooLargeException + if *v == nil { + sv = &types.RequestTooLargeException{} + } 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) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Type = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentResourceConflictException(v **types.ResourceConflictException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.ResourceConflictException + if *v == nil { + sv = &types.ResourceConflictException{} + } 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) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Type = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentResourceInUseException(v **types.ResourceInUseException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.ResourceInUseException + if *v == nil { + sv = &types.ResourceInUseException{} + } 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) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Type = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_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) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Type = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentResourceNotReadyException(v **types.ResourceNotReadyException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.ResourceNotReadyException + if *v == nil { + sv = &types.ResourceNotReadyException{} + } 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) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Type = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRuntimeVersionConfig(v **types.RuntimeVersionConfig, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.RuntimeVersionConfig + if *v == nil { + sv = &types.RuntimeVersionConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Error": + if err := awsRestjson1_deserializeDocumentRuntimeVersionError(&sv.Error, value); err != nil { + return err + } + + case "RuntimeVersionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RuntimeVersionArn to be of type string, got %T instead", value) + } + sv.RuntimeVersionArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRuntimeVersionError(v **types.RuntimeVersionError, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.RuntimeVersionError + if *v == nil { + sv = &types.RuntimeVersionError{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ErrorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ErrorCode = ptr.String(jtv) + } + + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SensitiveString to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentScalingConfig(v **types.ScalingConfig, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.ScalingConfig + if *v == nil { + sv = &types.ScalingConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "MaximumConcurrency": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MaximumConcurrency to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaximumConcurrency = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_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 SecurityGroupId to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentSelfManagedEventSource(v **types.SelfManagedEventSource, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.SelfManagedEventSource + if *v == nil { + sv = &types.SelfManagedEventSource{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Endpoints": + if err := awsRestjson1_deserializeDocumentEndpoints(&sv.Endpoints, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSelfManagedKafkaEventSourceConfig(v **types.SelfManagedKafkaEventSourceConfig, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.SelfManagedKafkaEventSourceConfig + if *v == nil { + sv = &types.SelfManagedKafkaEventSourceConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ConsumerGroupId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected URI to be of type string, got %T instead", value) + } + sv.ConsumerGroupId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentServiceException(v **types.ServiceException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.ServiceException + if *v == nil { + sv = &types.ServiceException{} + } 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) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Type = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSigningProfileVersionArns(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 awsRestjson1_deserializeDocumentSnapStartException(v **types.SnapStartException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.SnapStartException + if *v == nil { + sv = &types.SnapStartException{} + } 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) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Type = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSnapStartNotReadyException(v **types.SnapStartNotReadyException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.SnapStartNotReadyException + if *v == nil { + sv = &types.SnapStartNotReadyException{} + } 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) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Type = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSnapStartResponse(v **types.SnapStartResponse, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.SnapStartResponse + if *v == nil { + sv = &types.SnapStartResponse{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ApplyOn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SnapStartApplyOn to be of type string, got %T instead", value) + } + sv.ApplyOn = types.SnapStartApplyOn(jtv) + } + + case "OptimizationStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SnapStartOptimizationStatus to be of type string, got %T instead", value) + } + sv.OptimizationStatus = types.SnapStartOptimizationStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSnapStartTimeoutException(v **types.SnapStartTimeoutException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.SnapStartTimeoutException + if *v == nil { + sv = &types.SnapStartTimeoutException{} + } 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) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Type = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSourceAccessConfiguration(v **types.SourceAccessConfiguration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.SourceAccessConfiguration + if *v == nil { + sv = &types.SourceAccessConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SourceAccessType to be of type string, got %T instead", value) + } + sv.Type = types.SourceAccessType(jtv) + } + + case "URI": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected URI to be of type string, got %T instead", value) + } + sv.URI = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSourceAccessConfigurations(v *[]types.SourceAccessConfiguration, 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.SourceAccessConfiguration + if *v == nil { + cv = []types.SourceAccessConfiguration{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.SourceAccessConfiguration + destAddr := &col + if err := awsRestjson1_deserializeDocumentSourceAccessConfiguration(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentStringList(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 awsRestjson1_deserializeDocumentSubnetIds(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 SubnetId to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentSubnetIPAddressLimitReachedException(v **types.SubnetIPAddressLimitReachedException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.SubnetIPAddressLimitReachedException + if *v == nil { + sv = &types.SubnetIPAddressLimitReachedException{} + } 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) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Type = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_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 awsRestjson1_deserializeDocumentTagsError(v **types.TagsError, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.TagsError + if *v == nil { + sv = &types.TagsError{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ErrorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TagsErrorCode to be of type string, got %T instead", value) + } + sv.ErrorCode = ptr.String(jtv) + } + + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TagsErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentTooManyRequestsException(v **types.TooManyRequestsException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.TooManyRequestsException + if *v == nil { + sv = &types.TooManyRequestsException{} + } 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) + } + + case "Reason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ThrottleReason to be of type string, got %T instead", value) + } + sv.Reason = types.ThrottleReason(jtv) + } + + case "retryAfterSeconds": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RetryAfterSeconds = ptr.String(jtv) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Type = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentTopics(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 Topic to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentTracingConfigResponse(v **types.TracingConfigResponse, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.TracingConfigResponse + if *v == nil { + sv = &types.TracingConfigResponse{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Mode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TracingMode to be of type string, got %T instead", value) + } + sv.Mode = types.TracingMode(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentUnsupportedMediaTypeException(v **types.UnsupportedMediaTypeException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.UnsupportedMediaTypeException + if *v == nil { + sv = &types.UnsupportedMediaTypeException{} + } 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) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Type = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentVpcConfigResponse(v **types.VpcConfigResponse, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.VpcConfigResponse + if *v == nil { + sv = &types.VpcConfigResponse{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Ipv6AllowedForDualStack": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected NullableBoolean to be of type *bool, got %T instead", value) + } + sv.Ipv6AllowedForDualStack = ptr.Bool(jtv) + } + + case "SecurityGroupIds": + if err := awsRestjson1_deserializeDocumentSecurityGroupIds(&sv.SecurityGroupIds, value); err != nil { + return err + } + + case "SubnetIds": + if err := awsRestjson1_deserializeDocumentSubnetIds(&sv.SubnetIds, value); err != nil { + return err + } + + case "VpcId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VpcId to be of type string, got %T instead", value) + } + sv.VpcId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/doc.go new file mode 100644 index 00000000..92c2a95f --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/doc.go @@ -0,0 +1,77 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +// Package lambda provides the API client, operations, and parameter types for AWS +// Lambda. +// +// # Lambda +// +// # Overview +// +// Lambda is a compute service that lets you run code without provisioning or +// managing servers. Lambda runs your code on a high-availability compute +// infrastructure and performs all of the administration of the compute resources, +// including server and operating system maintenance, capacity provisioning and +// automatic scaling, code monitoring and logging. With Lambda, you can run code +// for virtually any type of application or backend service. For more information +// about the Lambda service, see [What is Lambda]in the Lambda Developer Guide. +// +// The Lambda API Reference provides information about each of the API methods, +// including details about the parameters in each API request and response. +// +// You can use Software Development Kits (SDKs), Integrated Development +// Environment (IDE) Toolkits, and command line tools to access the API. For +// installation instructions, see [Tools for Amazon Web Services]. +// +// For a list of Region-specific endpoints that Lambda supports, see [Lambda endpoints and quotas] in the +// Amazon Web Services General Reference.. +// +// When making the API calls, you will need to authenticate your request by +// providing a signature. Lambda supports signature version 4. For more +// information, see [Signature Version 4 signing process]in the Amazon Web Services General Reference.. +// +// # CA certificates +// +// Because Amazon Web Services SDKs use the CA certificates from your computer, +// changes to the certificates on the Amazon Web Services servers can cause +// connection failures when you attempt to use an SDK. You can prevent these +// failures by keeping your computer's CA certificates and operating system +// up-to-date. If you encounter this issue in a corporate environment and do not +// manage your own computer, you might need to ask an administrator to assist with +// the update process. The following list shows minimum operating system and Java +// versions: +// +// - Microsoft Windows versions that have updates from January 2005 or later +// installed contain at least one of the required CAs in their trust list. +// +// - Mac OS X 10.4 with Java for Mac OS X 10.4 Release 5 (February 2007), Mac OS +// X 10.5 (October 2007), and later versions contain at least one of the required +// CAs in their trust list. +// +// - Red Hat Enterprise Linux 5 (March 2007), 6, and 7 and CentOS 5, 6, and 7 +// all contain at least one of the required CAs in their default trusted CA list. +// +// - Java 1.4.2_12 (May 2006), 5 Update 2 (March 2005), and all later versions, +// including Java 6 (December 2006), 7, and 8, contain at least one of the required +// CAs in their default trusted CA list. +// +// When accessing the Lambda management console or Lambda API endpoints, whether +// through browsers or programmatically, you will need to ensure your client +// machines support any of the following CAs: +// +// - Amazon Root CA 1 +// +// - Starfield Services Root Certificate Authority - G2 +// +// - Starfield Class 2 Certification Authority +// +// Root certificates from the first two authorities are available from [Amazon trust services], but +// keeping your computer up-to-date is the more straightforward solution. To learn +// more about ACM-provided certificates, see [Amazon Web Services Certificate Manager FAQs.] +// +// [Amazon Web Services Certificate Manager FAQs.]: http://aws.amazon.com/certificate-manager/faqs/#certificates +// [What is Lambda]: https://docs.aws.amazon.com/lambda/latest/dg/welcome.html +// [Signature Version 4 signing process]: https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html +// [Tools for Amazon Web Services]: http://aws.amazon.com/tools/ +// [Amazon trust services]: https://www.amazontrust.com/repository/ +// [Lambda endpoints and quotas]: https://docs.aws.amazon.com/general/latest/gr/lambda-service.html +package lambda diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/endpoints.go new file mode 100644 index 00000000..e76ef488 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/endpoints.go @@ -0,0 +1,537 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +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/lambda/internal/endpoints" + smithyauth "github.com/aws/smithy-go/auth" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "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 = "lambda" + } + 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_LAMBDA") + + if g && !s { + return + } + + value, found, err := internalConfig.ResolveServiceBaseEndpoint(context.Background(), "Lambda", cfg.ConfigSources) + if found && err == nil { + o.BaseEndpoint = &value + } +} + +func bindRegion(region string) *string { + if region == "" { + return nil + } + return aws.String(endpoints.MapFIPSRegion(region)) +} + +// 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 + _UseFIPS := *params.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://lambda-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://lambda-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://lambda.") + 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://lambda.") + 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 { + params := &EndpointParameters{} + + params.Region = bindRegion(options.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 +} + +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 := bindEndpointParams(ctx, getOperationInput(ctx), m.options) + 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/lambda/eventstream.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/eventstream.go new file mode 100644 index 00000000..9ad38fa0 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/eventstream.go @@ -0,0 +1,285 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +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/lambda/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" +) + +// InvokeWithResponseStreamResponseEventReader provides the interface for reading +// events from a stream. +// +// The writer's Close method must allow multiple concurrent calls. +type InvokeWithResponseStreamResponseEventReader interface { + Events() <-chan types.InvokeWithResponseStreamResponseEvent + Close() error + Err() error +} + +type invokeWithResponseStreamResponseEventReader struct { + stream chan types.InvokeWithResponseStreamResponseEvent + decoder *eventstream.Decoder + eventStream io.ReadCloser + err *smithysync.OnceErr + payloadBuf []byte + done chan struct{} + closeOnce sync.Once +} + +func newInvokeWithResponseStreamResponseEventReader(readCloser io.ReadCloser, decoder *eventstream.Decoder) *invokeWithResponseStreamResponseEventReader { + w := &invokeWithResponseStreamResponseEventReader{ + stream: make(chan types.InvokeWithResponseStreamResponseEvent), + decoder: decoder, + eventStream: readCloser, + err: smithysync.NewOnceErr(), + done: make(chan struct{}), + payloadBuf: make([]byte, 10*1024), + } + + go w.readEventStream() + + return w +} + +func (r *invokeWithResponseStreamResponseEventReader) Events() <-chan types.InvokeWithResponseStreamResponseEvent { + return r.stream +} + +func (r *invokeWithResponseStreamResponseEventReader) readEventStream() { + defer r.Close() + defer close(r.stream) + + 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 + } + + select { + case r.stream <- event: + case <-r.done: + return + } + + } +} + +func (r *invokeWithResponseStreamResponseEventReader) deserializeEventMessage(msg *eventstream.Message) (types.InvokeWithResponseStreamResponseEvent, 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: + var v types.InvokeWithResponseStreamResponseEvent + if err := awsRestjson1_deserializeEventStreamInvokeWithResponseStreamResponseEvent(&v, msg); err != nil { + return nil, err + } + return v, nil + + case eventstreamapi.ExceptionMessageType: + return nil, awsRestjson1_deserializeEventStreamExceptionInvokeWithResponseStreamResponseEvent(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 *invokeWithResponseStreamResponseEventReader) ErrorSet() <-chan struct{} { + return r.err.ErrorSet() +} + +func (r *invokeWithResponseStreamResponseEventReader) Close() error { + r.closeOnce.Do(r.safeClose) + return r.Err() +} + +func (r *invokeWithResponseStreamResponseEventReader) safeClose() { + close(r.done) + r.eventStream.Close() + +} + +func (r *invokeWithResponseStreamResponseEventReader) Err() error { + return r.err.Err() +} + +func (r *invokeWithResponseStreamResponseEventReader) Closed() <-chan struct{} { + return r.done +} + +type awsRestjson1_deserializeOpEventStreamInvokeWithResponseStream struct { + LogEventStreamWrites bool + LogEventStreamReads bool +} + +func (*awsRestjson1_deserializeOpEventStreamInvokeWithResponseStream) ID() string { + return "OperationEventStreamDeserializer" +} + +func (m *awsRestjson1_deserializeOpEventStreamInvokeWithResponseStream) 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.(*InvokeWithResponseStreamOutput) + if out.Result != nil && !ok { + return out, metadata, fmt.Errorf("unexpected output result type: %T", out.Result) + } else if out.Result == nil { + output = &InvokeWithResponseStreamOutput{} + out.Result = output + } + + eventReader := newInvokeWithResponseStreamResponseEventReader( + deserializeOutput.Body, + eventstream.NewDecoder(func(options *eventstream.DecoderOptions) { + options.Logger = logger + options.LogMessages = m.LogEventStreamReads + + }), + ) + defer func() { + if err == nil { + return + } + _ = eventReader.Close() + }() + + output.eventStream = NewInvokeWithResponseStreamEventStream(func(stream *InvokeWithResponseStreamEventStream) { + stream.Reader = eventReader + }) + + go output.eventStream.waitStreamClose() + + return out, metadata, nil +} + +func (*awsRestjson1_deserializeOpEventStreamInvokeWithResponseStream) 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 addEventStreamInvokeWithResponseStreamMiddleware(stack *middleware.Stack, options Options) error { + if err := stack.Deserialize.Insert(&awsRestjson1_deserializeOpEventStreamInvokeWithResponseStream{ + 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 "InvokeWithResponseStream": + 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/lambda/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/generated.json new file mode 100644 index 00000000..9350ce58 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/generated.json @@ -0,0 +1,104 @@ +{ + "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_AddLayerVersionPermission.go", + "api_op_AddPermission.go", + "api_op_CreateAlias.go", + "api_op_CreateCodeSigningConfig.go", + "api_op_CreateEventSourceMapping.go", + "api_op_CreateFunction.go", + "api_op_CreateFunctionUrlConfig.go", + "api_op_DeleteAlias.go", + "api_op_DeleteCodeSigningConfig.go", + "api_op_DeleteEventSourceMapping.go", + "api_op_DeleteFunction.go", + "api_op_DeleteFunctionCodeSigningConfig.go", + "api_op_DeleteFunctionConcurrency.go", + "api_op_DeleteFunctionEventInvokeConfig.go", + "api_op_DeleteFunctionUrlConfig.go", + "api_op_DeleteLayerVersion.go", + "api_op_DeleteProvisionedConcurrencyConfig.go", + "api_op_GetAccountSettings.go", + "api_op_GetAlias.go", + "api_op_GetCodeSigningConfig.go", + "api_op_GetEventSourceMapping.go", + "api_op_GetFunction.go", + "api_op_GetFunctionCodeSigningConfig.go", + "api_op_GetFunctionConcurrency.go", + "api_op_GetFunctionConfiguration.go", + "api_op_GetFunctionEventInvokeConfig.go", + "api_op_GetFunctionRecursionConfig.go", + "api_op_GetFunctionUrlConfig.go", + "api_op_GetLayerVersion.go", + "api_op_GetLayerVersionByArn.go", + "api_op_GetLayerVersionPolicy.go", + "api_op_GetPolicy.go", + "api_op_GetProvisionedConcurrencyConfig.go", + "api_op_GetRuntimeManagementConfig.go", + "api_op_Invoke.go", + "api_op_InvokeAsync.go", + "api_op_InvokeWithResponseStream.go", + "api_op_ListAliases.go", + "api_op_ListCodeSigningConfigs.go", + "api_op_ListEventSourceMappings.go", + "api_op_ListFunctionEventInvokeConfigs.go", + "api_op_ListFunctionUrlConfigs.go", + "api_op_ListFunctions.go", + "api_op_ListFunctionsByCodeSigningConfig.go", + "api_op_ListLayerVersions.go", + "api_op_ListLayers.go", + "api_op_ListProvisionedConcurrencyConfigs.go", + "api_op_ListTags.go", + "api_op_ListVersionsByFunction.go", + "api_op_PublishLayerVersion.go", + "api_op_PublishVersion.go", + "api_op_PutFunctionCodeSigningConfig.go", + "api_op_PutFunctionConcurrency.go", + "api_op_PutFunctionEventInvokeConfig.go", + "api_op_PutFunctionRecursionConfig.go", + "api_op_PutProvisionedConcurrencyConfig.go", + "api_op_PutRuntimeManagementConfig.go", + "api_op_RemoveLayerVersionPermission.go", + "api_op_RemovePermission.go", + "api_op_TagResource.go", + "api_op_UntagResource.go", + "api_op_UpdateAlias.go", + "api_op_UpdateCodeSigningConfig.go", + "api_op_UpdateEventSourceMapping.go", + "api_op_UpdateFunctionCode.go", + "api_op_UpdateFunctionConfiguration.go", + "api_op_UpdateFunctionEventInvokeConfig.go", + "api_op_UpdateFunctionUrlConfig.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", + "protocol_test.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.22", + "module": "github.com/aws/aws-sdk-go-v2/service/lambda", + "unstable": false +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/go_module_metadata.go new file mode 100644 index 00000000..60684da2 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/go_module_metadata.go @@ -0,0 +1,6 @@ +// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. + +package lambda + +// goModuleVersion is the tagged release for this module +const goModuleVersion = "1.71.0" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/internal/endpoints/endpoints.go new file mode 100644 index 00000000..958f515d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/internal/endpoints/endpoints.go @@ -0,0 +1,749 @@ +// 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 Lambda endpoint resolver +type Resolver struct { + partitions endpoints.Partitions +} + +// ResolveEndpoint resolves the service endpoint for the given region and options +func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) { + if len(region) == 0 { + return endpoint, &aws.MissingRegionError{} + } + + opt := transformToSharedOptions(options) + return r.partitions.ResolveEndpoint(region, opt) +} + +// New returns a new Resolver +func New() *Resolver { + return &Resolver{ + partitions: defaultPartitions, + } +} + +var partitionRegexp = struct { + Aws *regexp.Regexp + AwsCn *regexp.Regexp + AwsIso *regexp.Regexp + AwsIsoB *regexp.Regexp + AwsIsoE *regexp.Regexp + AwsIsoF *regexp.Regexp + AwsUsGov *regexp.Regexp +}{ + + Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$"), + AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), + AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), + AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), + AwsIsoE: regexp.MustCompile("^eu\\-isoe\\-\\w+\\-\\d+$"), + AwsIsoF: regexp.MustCompile("^us\\-isof\\-\\w+\\-\\d+$"), + AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"), +} + +var defaultPartitions = endpoints.Partitions{ + { + ID: "aws", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "lambda.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "lambda-fips.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "lambda-fips.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "lambda.{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: "lambda.af-south-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "ap-east-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-east-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "lambda.ap-east-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "ap-northeast-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-northeast-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "lambda.ap-northeast-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "ap-northeast-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-northeast-2", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "lambda.ap-northeast-2.api.aws", + }, + endpoints.EndpointKey{ + Region: "ap-northeast-3", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-northeast-3", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "lambda.ap-northeast-3.api.aws", + }, + endpoints.EndpointKey{ + Region: "ap-south-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-south-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "lambda.ap-south-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "ap-south-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-south-2", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "lambda.ap-south-2.api.aws", + }, + endpoints.EndpointKey{ + Region: "ap-southeast-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "lambda.ap-southeast-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "ap-southeast-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-2", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "lambda.ap-southeast-2.api.aws", + }, + endpoints.EndpointKey{ + Region: "ap-southeast-3", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-3", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "lambda.ap-southeast-3.api.aws", + }, + endpoints.EndpointKey{ + Region: "ap-southeast-4", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-4", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "lambda.ap-southeast-4.api.aws", + }, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "lambda.ap-southeast-5.api.aws", + }, + endpoints.EndpointKey{ + Region: "ap-southeast-7", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-7", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "lambda.ap-southeast-7.api.aws", + }, + endpoints.EndpointKey{ + Region: "ca-central-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ca-central-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "lambda.ca-central-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "ca-west-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ca-west-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "lambda.ca-west-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "eu-central-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-central-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "lambda.eu-central-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "eu-central-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-central-2", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "lambda.eu-central-2.api.aws", + }, + endpoints.EndpointKey{ + Region: "eu-north-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-north-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "lambda.eu-north-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "eu-south-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "lambda.eu-south-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "lambda.eu-south-2.api.aws", + }, + endpoints.EndpointKey{ + Region: "eu-west-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-west-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "lambda.eu-west-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "eu-west-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-west-2", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "lambda.eu-west-2.api.aws", + }, + endpoints.EndpointKey{ + Region: "eu-west-3", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-west-3", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "lambda.eu-west-3.api.aws", + }, + endpoints.EndpointKey{ + Region: "fips-us-east-1", + }: endpoints.Endpoint{ + Hostname: "lambda-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: "lambda-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: "lambda-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: "lambda-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: "lambda.il-central-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "me-central-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "me-central-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "lambda.me-central-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "me-south-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "me-south-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "lambda.me-south-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "mx-central-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "mx-central-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "lambda.mx-central-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "sa-east-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "sa-east-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "lambda.sa-east-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "us-east-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-east-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "lambda-fips.us-east-1.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "us-east-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "lambda.us-east-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "us-east-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-east-2", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "lambda-fips.us-east-2.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "us-east-2", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "lambda.us-east-2.api.aws", + }, + endpoints.EndpointKey{ + Region: "us-west-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-west-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "lambda-fips.us-west-1.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "us-west-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "lambda.us-west-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "us-west-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-west-2", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "lambda-fips.us-west-2.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "us-west-2", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "lambda.us-west-2.api.aws", + }, + }, + }, + { + ID: "aws-cn", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "lambda.{region}.api.amazonwebservices.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "lambda-fips.{region}.amazonaws.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "lambda-fips.{region}.api.amazonwebservices.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "lambda.{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: "lambda.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: "lambda.cn-northwest-1.api.amazonwebservices.com.cn", + }, + }, + }, + { + ID: "aws-iso", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "lambda-fips.{region}.c2s.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "lambda.{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: "lambda-fips.{region}.sc2s.sgov.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "lambda.{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: "lambda-fips.{region}.cloud.adc-e.uk", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "lambda.{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: "lambda-fips.{region}.csp.hci.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "lambda.{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-east-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "lambda.us-isof-east-1.api.aws.hci.ic.gov", + }, + endpoints.EndpointKey{ + Region: "us-isof-south-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-isof-south-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "lambda.us-isof-south-1.api.aws.hci.ic.gov", + }, + }, + }, + { + ID: "aws-us-gov", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "lambda.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "lambda-fips.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "lambda-fips.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "lambda.{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: "lambda-fips.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: "lambda-fips.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: "lambda-fips.us-gov-east-1.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "us-gov-east-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "lambda.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: "lambda-fips.us-gov-west-1.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "us-gov-west-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "lambda.us-gov-west-1.api.aws", + }, + }, + }, +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/options.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/options.go new file mode 100644 index 00000000..d3f4412b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/options.go @@ -0,0 +1,232 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +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. This should be + // used over the deprecated EndpointResolver. + 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 + + // 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 +} + +// Copy creates a clone where the APIOptions list is deep copied. +func (o Options) Copy() Options { + to := o + to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions)) + copy(to.APIOptions, o.APIOptions) + + return to +} + +func (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/lambda/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/serializers.go new file mode 100644 index 00000000..cfab3c89 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/serializers.go @@ -0,0 +1,7206 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +import ( + "bytes" + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/lambda/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" + smithytime "github.com/aws/smithy-go/time" + "github.com/aws/smithy-go/tracing" + smithyhttp "github.com/aws/smithy-go/transport/http" + "math" +) + +type awsRestjson1_serializeOpAddLayerVersionPermission struct { +} + +func (*awsRestjson1_serializeOpAddLayerVersionPermission) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpAddLayerVersionPermission) 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.(*AddLayerVersionPermissionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2018-10-31/layers/{LayerName}/versions/{VersionNumber}/policy") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsAddLayerVersionPermissionInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentAddLayerVersionPermissionInput(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 = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsAddLayerVersionPermissionInput(v *AddLayerVersionPermissionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.LayerName == nil || len(*v.LayerName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member LayerName must not be empty")} + } + if v.LayerName != nil { + if err := encoder.SetURI("LayerName").String(*v.LayerName); err != nil { + return err + } + } + + if v.RevisionId != nil { + encoder.SetQuery("RevisionId").String(*v.RevisionId) + } + + if v.VersionNumber == nil { + return &smithy.SerializationError{Err: fmt.Errorf("input member VersionNumber must not be empty")} + } + if v.VersionNumber != nil { + if err := encoder.SetURI("VersionNumber").Long(*v.VersionNumber); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentAddLayerVersionPermissionInput(v *AddLayerVersionPermissionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Action != nil { + ok := object.Key("Action") + ok.String(*v.Action) + } + + if v.OrganizationId != nil { + ok := object.Key("OrganizationId") + ok.String(*v.OrganizationId) + } + + if v.Principal != nil { + ok := object.Key("Principal") + ok.String(*v.Principal) + } + + if v.StatementId != nil { + ok := object.Key("StatementId") + ok.String(*v.StatementId) + } + + return nil +} + +type awsRestjson1_serializeOpAddPermission struct { +} + +func (*awsRestjson1_serializeOpAddPermission) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpAddPermission) 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.(*AddPermissionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-03-31/functions/{FunctionName}/policy") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsAddPermissionInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentAddPermissionInput(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 = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsAddPermissionInput(v *AddPermissionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FunctionName == nil || len(*v.FunctionName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")} + } + if v.FunctionName != nil { + if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil { + return err + } + } + + if v.Qualifier != nil { + encoder.SetQuery("Qualifier").String(*v.Qualifier) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentAddPermissionInput(v *AddPermissionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Action != nil { + ok := object.Key("Action") + ok.String(*v.Action) + } + + if v.EventSourceToken != nil { + ok := object.Key("EventSourceToken") + ok.String(*v.EventSourceToken) + } + + if len(v.FunctionUrlAuthType) > 0 { + ok := object.Key("FunctionUrlAuthType") + ok.String(string(v.FunctionUrlAuthType)) + } + + if v.Principal != nil { + ok := object.Key("Principal") + ok.String(*v.Principal) + } + + if v.PrincipalOrgID != nil { + ok := object.Key("PrincipalOrgID") + ok.String(*v.PrincipalOrgID) + } + + if v.RevisionId != nil { + ok := object.Key("RevisionId") + ok.String(*v.RevisionId) + } + + if v.SourceAccount != nil { + ok := object.Key("SourceAccount") + ok.String(*v.SourceAccount) + } + + if v.SourceArn != nil { + ok := object.Key("SourceArn") + ok.String(*v.SourceArn) + } + + if v.StatementId != nil { + ok := object.Key("StatementId") + ok.String(*v.StatementId) + } + + return nil +} + +type awsRestjson1_serializeOpCreateAlias struct { +} + +func (*awsRestjson1_serializeOpCreateAlias) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateAlias) 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.(*CreateAliasInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-03-31/functions/{FunctionName}/aliases") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsCreateAliasInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateAliasInput(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 = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCreateAliasInput(v *CreateAliasInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FunctionName == nil || len(*v.FunctionName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")} + } + if v.FunctionName != nil { + if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateAliasInput(v *CreateAliasInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Description != nil { + ok := object.Key("Description") + ok.String(*v.Description) + } + + if v.FunctionVersion != nil { + ok := object.Key("FunctionVersion") + ok.String(*v.FunctionVersion) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if v.RoutingConfig != nil { + ok := object.Key("RoutingConfig") + if err := awsRestjson1_serializeDocumentAliasRoutingConfiguration(v.RoutingConfig, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpCreateCodeSigningConfig struct { +} + +func (*awsRestjson1_serializeOpCreateCodeSigningConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateCodeSigningConfig) 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.(*CreateCodeSigningConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-04-22/code-signing-configs") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateCodeSigningConfigInput(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 = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCreateCodeSigningConfigInput(v *CreateCodeSigningConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateCodeSigningConfigInput(v *CreateCodeSigningConfigInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AllowedPublishers != nil { + ok := object.Key("AllowedPublishers") + if err := awsRestjson1_serializeDocumentAllowedPublishers(v.AllowedPublishers, ok); err != nil { + return err + } + } + + if v.CodeSigningPolicies != nil { + ok := object.Key("CodeSigningPolicies") + if err := awsRestjson1_serializeDocumentCodeSigningPolicies(v.CodeSigningPolicies, ok); err != nil { + return err + } + } + + if v.Description != nil { + ok := object.Key("Description") + ok.String(*v.Description) + } + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsRestjson1_serializeDocumentTags(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpCreateEventSourceMapping struct { +} + +func (*awsRestjson1_serializeOpCreateEventSourceMapping) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateEventSourceMapping) 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.(*CreateEventSourceMappingInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-03-31/event-source-mappings") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateEventSourceMappingInput(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 = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCreateEventSourceMappingInput(v *CreateEventSourceMappingInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateEventSourceMappingInput(v *CreateEventSourceMappingInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AmazonManagedKafkaEventSourceConfig != nil { + ok := object.Key("AmazonManagedKafkaEventSourceConfig") + if err := awsRestjson1_serializeDocumentAmazonManagedKafkaEventSourceConfig(v.AmazonManagedKafkaEventSourceConfig, ok); err != nil { + return err + } + } + + if v.BatchSize != nil { + ok := object.Key("BatchSize") + ok.Integer(*v.BatchSize) + } + + if v.BisectBatchOnFunctionError != nil { + ok := object.Key("BisectBatchOnFunctionError") + ok.Boolean(*v.BisectBatchOnFunctionError) + } + + if v.DestinationConfig != nil { + ok := object.Key("DestinationConfig") + if err := awsRestjson1_serializeDocumentDestinationConfig(v.DestinationConfig, ok); err != nil { + return err + } + } + + if v.DocumentDBEventSourceConfig != nil { + ok := object.Key("DocumentDBEventSourceConfig") + if err := awsRestjson1_serializeDocumentDocumentDBEventSourceConfig(v.DocumentDBEventSourceConfig, ok); err != nil { + return err + } + } + + if v.Enabled != nil { + ok := object.Key("Enabled") + ok.Boolean(*v.Enabled) + } + + if v.EventSourceArn != nil { + ok := object.Key("EventSourceArn") + ok.String(*v.EventSourceArn) + } + + if v.FilterCriteria != nil { + ok := object.Key("FilterCriteria") + if err := awsRestjson1_serializeDocumentFilterCriteria(v.FilterCriteria, ok); err != nil { + return err + } + } + + if v.FunctionName != nil { + ok := object.Key("FunctionName") + ok.String(*v.FunctionName) + } + + if v.FunctionResponseTypes != nil { + ok := object.Key("FunctionResponseTypes") + if err := awsRestjson1_serializeDocumentFunctionResponseTypeList(v.FunctionResponseTypes, ok); err != nil { + return err + } + } + + if v.KMSKeyArn != nil { + ok := object.Key("KMSKeyArn") + ok.String(*v.KMSKeyArn) + } + + if v.MaximumBatchingWindowInSeconds != nil { + ok := object.Key("MaximumBatchingWindowInSeconds") + ok.Integer(*v.MaximumBatchingWindowInSeconds) + } + + if v.MaximumRecordAgeInSeconds != nil { + ok := object.Key("MaximumRecordAgeInSeconds") + ok.Integer(*v.MaximumRecordAgeInSeconds) + } + + if v.MaximumRetryAttempts != nil { + ok := object.Key("MaximumRetryAttempts") + ok.Integer(*v.MaximumRetryAttempts) + } + + if v.MetricsConfig != nil { + ok := object.Key("MetricsConfig") + if err := awsRestjson1_serializeDocumentEventSourceMappingMetricsConfig(v.MetricsConfig, ok); err != nil { + return err + } + } + + if v.ParallelizationFactor != nil { + ok := object.Key("ParallelizationFactor") + ok.Integer(*v.ParallelizationFactor) + } + + if v.ProvisionedPollerConfig != nil { + ok := object.Key("ProvisionedPollerConfig") + if err := awsRestjson1_serializeDocumentProvisionedPollerConfig(v.ProvisionedPollerConfig, ok); err != nil { + return err + } + } + + if v.Queues != nil { + ok := object.Key("Queues") + if err := awsRestjson1_serializeDocumentQueues(v.Queues, ok); err != nil { + return err + } + } + + if v.ScalingConfig != nil { + ok := object.Key("ScalingConfig") + if err := awsRestjson1_serializeDocumentScalingConfig(v.ScalingConfig, ok); err != nil { + return err + } + } + + if v.SelfManagedEventSource != nil { + ok := object.Key("SelfManagedEventSource") + if err := awsRestjson1_serializeDocumentSelfManagedEventSource(v.SelfManagedEventSource, ok); err != nil { + return err + } + } + + if v.SelfManagedKafkaEventSourceConfig != nil { + ok := object.Key("SelfManagedKafkaEventSourceConfig") + if err := awsRestjson1_serializeDocumentSelfManagedKafkaEventSourceConfig(v.SelfManagedKafkaEventSourceConfig, ok); err != nil { + return err + } + } + + if v.SourceAccessConfigurations != nil { + ok := object.Key("SourceAccessConfigurations") + if err := awsRestjson1_serializeDocumentSourceAccessConfigurations(v.SourceAccessConfigurations, ok); err != nil { + return err + } + } + + if len(v.StartingPosition) > 0 { + ok := object.Key("StartingPosition") + ok.String(string(v.StartingPosition)) + } + + if v.StartingPositionTimestamp != nil { + ok := object.Key("StartingPositionTimestamp") + ok.Double(smithytime.FormatEpochSeconds(*v.StartingPositionTimestamp)) + } + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsRestjson1_serializeDocumentTags(v.Tags, ok); err != nil { + return err + } + } + + if v.Topics != nil { + ok := object.Key("Topics") + if err := awsRestjson1_serializeDocumentTopics(v.Topics, ok); err != nil { + return err + } + } + + if v.TumblingWindowInSeconds != nil { + ok := object.Key("TumblingWindowInSeconds") + ok.Integer(*v.TumblingWindowInSeconds) + } + + return nil +} + +type awsRestjson1_serializeOpCreateFunction struct { +} + +func (*awsRestjson1_serializeOpCreateFunction) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateFunction) 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.(*CreateFunctionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-03-31/functions") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateFunctionInput(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 = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCreateFunctionInput(v *CreateFunctionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateFunctionInput(v *CreateFunctionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Architectures != nil { + ok := object.Key("Architectures") + if err := awsRestjson1_serializeDocumentArchitecturesList(v.Architectures, ok); err != nil { + return err + } + } + + if v.Code != nil { + ok := object.Key("Code") + if err := awsRestjson1_serializeDocumentFunctionCode(v.Code, ok); err != nil { + return err + } + } + + if v.CodeSigningConfigArn != nil { + ok := object.Key("CodeSigningConfigArn") + ok.String(*v.CodeSigningConfigArn) + } + + if v.DeadLetterConfig != nil { + ok := object.Key("DeadLetterConfig") + if err := awsRestjson1_serializeDocumentDeadLetterConfig(v.DeadLetterConfig, ok); err != nil { + return err + } + } + + if v.Description != nil { + ok := object.Key("Description") + ok.String(*v.Description) + } + + if v.Environment != nil { + ok := object.Key("Environment") + if err := awsRestjson1_serializeDocumentEnvironment(v.Environment, ok); err != nil { + return err + } + } + + if v.EphemeralStorage != nil { + ok := object.Key("EphemeralStorage") + if err := awsRestjson1_serializeDocumentEphemeralStorage(v.EphemeralStorage, ok); err != nil { + return err + } + } + + if v.FileSystemConfigs != nil { + ok := object.Key("FileSystemConfigs") + if err := awsRestjson1_serializeDocumentFileSystemConfigList(v.FileSystemConfigs, ok); err != nil { + return err + } + } + + if v.FunctionName != nil { + ok := object.Key("FunctionName") + ok.String(*v.FunctionName) + } + + if v.Handler != nil { + ok := object.Key("Handler") + ok.String(*v.Handler) + } + + if v.ImageConfig != nil { + ok := object.Key("ImageConfig") + if err := awsRestjson1_serializeDocumentImageConfig(v.ImageConfig, ok); err != nil { + return err + } + } + + if v.KMSKeyArn != nil { + ok := object.Key("KMSKeyArn") + ok.String(*v.KMSKeyArn) + } + + if v.Layers != nil { + ok := object.Key("Layers") + if err := awsRestjson1_serializeDocumentLayerList(v.Layers, ok); err != nil { + return err + } + } + + if v.LoggingConfig != nil { + ok := object.Key("LoggingConfig") + if err := awsRestjson1_serializeDocumentLoggingConfig(v.LoggingConfig, ok); err != nil { + return err + } + } + + if v.MemorySize != nil { + ok := object.Key("MemorySize") + ok.Integer(*v.MemorySize) + } + + if len(v.PackageType) > 0 { + ok := object.Key("PackageType") + ok.String(string(v.PackageType)) + } + + if v.Publish { + ok := object.Key("Publish") + ok.Boolean(v.Publish) + } + + if v.Role != nil { + ok := object.Key("Role") + ok.String(*v.Role) + } + + if len(v.Runtime) > 0 { + ok := object.Key("Runtime") + ok.String(string(v.Runtime)) + } + + if v.SnapStart != nil { + ok := object.Key("SnapStart") + if err := awsRestjson1_serializeDocumentSnapStart(v.SnapStart, ok); err != nil { + return err + } + } + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsRestjson1_serializeDocumentTags(v.Tags, ok); err != nil { + return err + } + } + + if v.Timeout != nil { + ok := object.Key("Timeout") + ok.Integer(*v.Timeout) + } + + if v.TracingConfig != nil { + ok := object.Key("TracingConfig") + if err := awsRestjson1_serializeDocumentTracingConfig(v.TracingConfig, ok); err != nil { + return err + } + } + + if v.VpcConfig != nil { + ok := object.Key("VpcConfig") + if err := awsRestjson1_serializeDocumentVpcConfig(v.VpcConfig, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpCreateFunctionUrlConfig struct { +} + +func (*awsRestjson1_serializeOpCreateFunctionUrlConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateFunctionUrlConfig) 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.(*CreateFunctionUrlConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-10-31/functions/{FunctionName}/url") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsCreateFunctionUrlConfigInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateFunctionUrlConfigInput(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 = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCreateFunctionUrlConfigInput(v *CreateFunctionUrlConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FunctionName == nil || len(*v.FunctionName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")} + } + if v.FunctionName != nil { + if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil { + return err + } + } + + if v.Qualifier != nil { + encoder.SetQuery("Qualifier").String(*v.Qualifier) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateFunctionUrlConfigInput(v *CreateFunctionUrlConfigInput, 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 v.Cors != nil { + ok := object.Key("Cors") + if err := awsRestjson1_serializeDocumentCors(v.Cors, ok); err != nil { + return err + } + } + + if len(v.InvokeMode) > 0 { + ok := object.Key("InvokeMode") + ok.String(string(v.InvokeMode)) + } + + return nil +} + +type awsRestjson1_serializeOpDeleteAlias struct { +} + +func (*awsRestjson1_serializeOpDeleteAlias) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteAlias) 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.(*DeleteAliasInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-03-31/functions/{FunctionName}/aliases/{Name}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteAliasInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteAliasInput(v *DeleteAliasInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FunctionName == nil || len(*v.FunctionName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")} + } + if v.FunctionName != nil { + if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil { + return err + } + } + + if v.Name == nil || len(*v.Name) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")} + } + if v.Name != nil { + if err := encoder.SetURI("Name").String(*v.Name); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteCodeSigningConfig struct { +} + +func (*awsRestjson1_serializeOpDeleteCodeSigningConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteCodeSigningConfig) 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.(*DeleteCodeSigningConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-04-22/code-signing-configs/{CodeSigningConfigArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteCodeSigningConfigInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteCodeSigningConfigInput(v *DeleteCodeSigningConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.CodeSigningConfigArn == nil || len(*v.CodeSigningConfigArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member CodeSigningConfigArn must not be empty")} + } + if v.CodeSigningConfigArn != nil { + if err := encoder.SetURI("CodeSigningConfigArn").String(*v.CodeSigningConfigArn); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteEventSourceMapping struct { +} + +func (*awsRestjson1_serializeOpDeleteEventSourceMapping) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteEventSourceMapping) 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.(*DeleteEventSourceMappingInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-03-31/event-source-mappings/{UUID}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteEventSourceMappingInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteEventSourceMappingInput(v *DeleteEventSourceMappingInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.UUID == nil || len(*v.UUID) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member UUID must not be empty")} + } + if v.UUID != nil { + if err := encoder.SetURI("UUID").String(*v.UUID); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteFunction struct { +} + +func (*awsRestjson1_serializeOpDeleteFunction) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteFunction) 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.(*DeleteFunctionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-03-31/functions/{FunctionName}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteFunctionInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteFunctionInput(v *DeleteFunctionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FunctionName == nil || len(*v.FunctionName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")} + } + if v.FunctionName != nil { + if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil { + return err + } + } + + if v.Qualifier != nil { + encoder.SetQuery("Qualifier").String(*v.Qualifier) + } + + return nil +} + +type awsRestjson1_serializeOpDeleteFunctionCodeSigningConfig struct { +} + +func (*awsRestjson1_serializeOpDeleteFunctionCodeSigningConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteFunctionCodeSigningConfig) 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.(*DeleteFunctionCodeSigningConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-06-30/functions/{FunctionName}/code-signing-config") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteFunctionCodeSigningConfigInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteFunctionCodeSigningConfigInput(v *DeleteFunctionCodeSigningConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FunctionName == nil || len(*v.FunctionName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")} + } + if v.FunctionName != nil { + if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteFunctionConcurrency struct { +} + +func (*awsRestjson1_serializeOpDeleteFunctionConcurrency) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteFunctionConcurrency) 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.(*DeleteFunctionConcurrencyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2017-10-31/functions/{FunctionName}/concurrency") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteFunctionConcurrencyInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteFunctionConcurrencyInput(v *DeleteFunctionConcurrencyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FunctionName == nil || len(*v.FunctionName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")} + } + if v.FunctionName != nil { + if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteFunctionEventInvokeConfig struct { +} + +func (*awsRestjson1_serializeOpDeleteFunctionEventInvokeConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteFunctionEventInvokeConfig) 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.(*DeleteFunctionEventInvokeConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2019-09-25/functions/{FunctionName}/event-invoke-config") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteFunctionEventInvokeConfigInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteFunctionEventInvokeConfigInput(v *DeleteFunctionEventInvokeConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FunctionName == nil || len(*v.FunctionName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")} + } + if v.FunctionName != nil { + if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil { + return err + } + } + + if v.Qualifier != nil { + encoder.SetQuery("Qualifier").String(*v.Qualifier) + } + + return nil +} + +type awsRestjson1_serializeOpDeleteFunctionUrlConfig struct { +} + +func (*awsRestjson1_serializeOpDeleteFunctionUrlConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteFunctionUrlConfig) 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.(*DeleteFunctionUrlConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-10-31/functions/{FunctionName}/url") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteFunctionUrlConfigInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteFunctionUrlConfigInput(v *DeleteFunctionUrlConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FunctionName == nil || len(*v.FunctionName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")} + } + if v.FunctionName != nil { + if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil { + return err + } + } + + if v.Qualifier != nil { + encoder.SetQuery("Qualifier").String(*v.Qualifier) + } + + return nil +} + +type awsRestjson1_serializeOpDeleteLayerVersion struct { +} + +func (*awsRestjson1_serializeOpDeleteLayerVersion) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteLayerVersion) 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.(*DeleteLayerVersionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2018-10-31/layers/{LayerName}/versions/{VersionNumber}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteLayerVersionInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteLayerVersionInput(v *DeleteLayerVersionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.LayerName == nil || len(*v.LayerName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member LayerName must not be empty")} + } + if v.LayerName != nil { + if err := encoder.SetURI("LayerName").String(*v.LayerName); err != nil { + return err + } + } + + if v.VersionNumber == nil { + return &smithy.SerializationError{Err: fmt.Errorf("input member VersionNumber must not be empty")} + } + if v.VersionNumber != nil { + if err := encoder.SetURI("VersionNumber").Long(*v.VersionNumber); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteProvisionedConcurrencyConfig struct { +} + +func (*awsRestjson1_serializeOpDeleteProvisionedConcurrencyConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteProvisionedConcurrencyConfig) 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.(*DeleteProvisionedConcurrencyConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2019-09-30/functions/{FunctionName}/provisioned-concurrency") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteProvisionedConcurrencyConfigInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteProvisionedConcurrencyConfigInput(v *DeleteProvisionedConcurrencyConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FunctionName == nil || len(*v.FunctionName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")} + } + if v.FunctionName != nil { + if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil { + return err + } + } + + if v.Qualifier != nil { + encoder.SetQuery("Qualifier").String(*v.Qualifier) + } + + return nil +} + +type awsRestjson1_serializeOpGetAccountSettings struct { +} + +func (*awsRestjson1_serializeOpGetAccountSettings) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetAccountSettings) 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.(*GetAccountSettingsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2016-08-19/account-settings") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetAccountSettingsInput(v *GetAccountSettingsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +type awsRestjson1_serializeOpGetAlias struct { +} + +func (*awsRestjson1_serializeOpGetAlias) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetAlias) 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.(*GetAliasInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-03-31/functions/{FunctionName}/aliases/{Name}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetAliasInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetAliasInput(v *GetAliasInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FunctionName == nil || len(*v.FunctionName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")} + } + if v.FunctionName != nil { + if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil { + return err + } + } + + if v.Name == nil || len(*v.Name) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")} + } + if v.Name != nil { + if err := encoder.SetURI("Name").String(*v.Name); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetCodeSigningConfig struct { +} + +func (*awsRestjson1_serializeOpGetCodeSigningConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetCodeSigningConfig) 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.(*GetCodeSigningConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-04-22/code-signing-configs/{CodeSigningConfigArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetCodeSigningConfigInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetCodeSigningConfigInput(v *GetCodeSigningConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.CodeSigningConfigArn == nil || len(*v.CodeSigningConfigArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member CodeSigningConfigArn must not be empty")} + } + if v.CodeSigningConfigArn != nil { + if err := encoder.SetURI("CodeSigningConfigArn").String(*v.CodeSigningConfigArn); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetEventSourceMapping struct { +} + +func (*awsRestjson1_serializeOpGetEventSourceMapping) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetEventSourceMapping) 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.(*GetEventSourceMappingInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-03-31/event-source-mappings/{UUID}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetEventSourceMappingInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetEventSourceMappingInput(v *GetEventSourceMappingInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.UUID == nil || len(*v.UUID) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member UUID must not be empty")} + } + if v.UUID != nil { + if err := encoder.SetURI("UUID").String(*v.UUID); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetFunction struct { +} + +func (*awsRestjson1_serializeOpGetFunction) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetFunction) 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.(*GetFunctionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-03-31/functions/{FunctionName}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetFunctionInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetFunctionInput(v *GetFunctionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FunctionName == nil || len(*v.FunctionName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")} + } + if v.FunctionName != nil { + if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil { + return err + } + } + + if v.Qualifier != nil { + encoder.SetQuery("Qualifier").String(*v.Qualifier) + } + + return nil +} + +type awsRestjson1_serializeOpGetFunctionCodeSigningConfig struct { +} + +func (*awsRestjson1_serializeOpGetFunctionCodeSigningConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetFunctionCodeSigningConfig) 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.(*GetFunctionCodeSigningConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-06-30/functions/{FunctionName}/code-signing-config") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetFunctionCodeSigningConfigInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetFunctionCodeSigningConfigInput(v *GetFunctionCodeSigningConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FunctionName == nil || len(*v.FunctionName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")} + } + if v.FunctionName != nil { + if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetFunctionConcurrency struct { +} + +func (*awsRestjson1_serializeOpGetFunctionConcurrency) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetFunctionConcurrency) 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.(*GetFunctionConcurrencyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2019-09-30/functions/{FunctionName}/concurrency") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetFunctionConcurrencyInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetFunctionConcurrencyInput(v *GetFunctionConcurrencyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FunctionName == nil || len(*v.FunctionName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")} + } + if v.FunctionName != nil { + if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetFunctionConfiguration struct { +} + +func (*awsRestjson1_serializeOpGetFunctionConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetFunctionConfiguration) 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.(*GetFunctionConfigurationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-03-31/functions/{FunctionName}/configuration") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetFunctionConfigurationInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetFunctionConfigurationInput(v *GetFunctionConfigurationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FunctionName == nil || len(*v.FunctionName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")} + } + if v.FunctionName != nil { + if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil { + return err + } + } + + if v.Qualifier != nil { + encoder.SetQuery("Qualifier").String(*v.Qualifier) + } + + return nil +} + +type awsRestjson1_serializeOpGetFunctionEventInvokeConfig struct { +} + +func (*awsRestjson1_serializeOpGetFunctionEventInvokeConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetFunctionEventInvokeConfig) 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.(*GetFunctionEventInvokeConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2019-09-25/functions/{FunctionName}/event-invoke-config") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetFunctionEventInvokeConfigInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetFunctionEventInvokeConfigInput(v *GetFunctionEventInvokeConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FunctionName == nil || len(*v.FunctionName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")} + } + if v.FunctionName != nil { + if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil { + return err + } + } + + if v.Qualifier != nil { + encoder.SetQuery("Qualifier").String(*v.Qualifier) + } + + return nil +} + +type awsRestjson1_serializeOpGetFunctionRecursionConfig struct { +} + +func (*awsRestjson1_serializeOpGetFunctionRecursionConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetFunctionRecursionConfig) 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.(*GetFunctionRecursionConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2024-08-31/functions/{FunctionName}/recursion-config") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetFunctionRecursionConfigInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetFunctionRecursionConfigInput(v *GetFunctionRecursionConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FunctionName == nil || len(*v.FunctionName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")} + } + if v.FunctionName != nil { + if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetFunctionUrlConfig struct { +} + +func (*awsRestjson1_serializeOpGetFunctionUrlConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetFunctionUrlConfig) 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.(*GetFunctionUrlConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-10-31/functions/{FunctionName}/url") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetFunctionUrlConfigInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetFunctionUrlConfigInput(v *GetFunctionUrlConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FunctionName == nil || len(*v.FunctionName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")} + } + if v.FunctionName != nil { + if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil { + return err + } + } + + if v.Qualifier != nil { + encoder.SetQuery("Qualifier").String(*v.Qualifier) + } + + return nil +} + +type awsRestjson1_serializeOpGetLayerVersion struct { +} + +func (*awsRestjson1_serializeOpGetLayerVersion) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetLayerVersion) 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.(*GetLayerVersionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2018-10-31/layers/{LayerName}/versions/{VersionNumber}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetLayerVersionInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetLayerVersionInput(v *GetLayerVersionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.LayerName == nil || len(*v.LayerName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member LayerName must not be empty")} + } + if v.LayerName != nil { + if err := encoder.SetURI("LayerName").String(*v.LayerName); err != nil { + return err + } + } + + if v.VersionNumber == nil { + return &smithy.SerializationError{Err: fmt.Errorf("input member VersionNumber must not be empty")} + } + if v.VersionNumber != nil { + if err := encoder.SetURI("VersionNumber").Long(*v.VersionNumber); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetLayerVersionByArn struct { +} + +func (*awsRestjson1_serializeOpGetLayerVersionByArn) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetLayerVersionByArn) 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.(*GetLayerVersionByArnInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2018-10-31/layers?find=LayerVersion") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetLayerVersionByArnInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetLayerVersionByArnInput(v *GetLayerVersionByArnInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Arn != nil { + encoder.SetQuery("Arn").String(*v.Arn) + } + + return nil +} + +type awsRestjson1_serializeOpGetLayerVersionPolicy struct { +} + +func (*awsRestjson1_serializeOpGetLayerVersionPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetLayerVersionPolicy) 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.(*GetLayerVersionPolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2018-10-31/layers/{LayerName}/versions/{VersionNumber}/policy") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetLayerVersionPolicyInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetLayerVersionPolicyInput(v *GetLayerVersionPolicyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.LayerName == nil || len(*v.LayerName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member LayerName must not be empty")} + } + if v.LayerName != nil { + if err := encoder.SetURI("LayerName").String(*v.LayerName); err != nil { + return err + } + } + + if v.VersionNumber == nil { + return &smithy.SerializationError{Err: fmt.Errorf("input member VersionNumber must not be empty")} + } + if v.VersionNumber != nil { + if err := encoder.SetURI("VersionNumber").Long(*v.VersionNumber); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetPolicy struct { +} + +func (*awsRestjson1_serializeOpGetPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetPolicy) 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.(*GetPolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-03-31/functions/{FunctionName}/policy") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetPolicyInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetPolicyInput(v *GetPolicyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FunctionName == nil || len(*v.FunctionName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")} + } + if v.FunctionName != nil { + if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil { + return err + } + } + + if v.Qualifier != nil { + encoder.SetQuery("Qualifier").String(*v.Qualifier) + } + + return nil +} + +type awsRestjson1_serializeOpGetProvisionedConcurrencyConfig struct { +} + +func (*awsRestjson1_serializeOpGetProvisionedConcurrencyConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetProvisionedConcurrencyConfig) 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.(*GetProvisionedConcurrencyConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2019-09-30/functions/{FunctionName}/provisioned-concurrency") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetProvisionedConcurrencyConfigInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetProvisionedConcurrencyConfigInput(v *GetProvisionedConcurrencyConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FunctionName == nil || len(*v.FunctionName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")} + } + if v.FunctionName != nil { + if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil { + return err + } + } + + if v.Qualifier != nil { + encoder.SetQuery("Qualifier").String(*v.Qualifier) + } + + return nil +} + +type awsRestjson1_serializeOpGetRuntimeManagementConfig struct { +} + +func (*awsRestjson1_serializeOpGetRuntimeManagementConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetRuntimeManagementConfig) 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.(*GetRuntimeManagementConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-07-20/functions/{FunctionName}/runtime-management-config") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetRuntimeManagementConfigInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetRuntimeManagementConfigInput(v *GetRuntimeManagementConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FunctionName == nil || len(*v.FunctionName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")} + } + if v.FunctionName != nil { + if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil { + return err + } + } + + if v.Qualifier != nil { + encoder.SetQuery("Qualifier").String(*v.Qualifier) + } + + return nil +} + +type awsRestjson1_serializeOpInvoke struct { +} + +func (*awsRestjson1_serializeOpInvoke) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpInvoke) 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.(*InvokeInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-03-31/functions/{FunctionName}/invocations") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsInvokeInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/octet-stream") + } + + if input.Payload != nil { + payload := bytes.NewReader(input.Payload) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsInvokeInput(v *InvokeInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ClientContext != nil { + locationName := "X-Amz-Client-Context" + encoder.SetHeader(locationName).String(*v.ClientContext) + } + + if v.FunctionName == nil || len(*v.FunctionName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")} + } + if v.FunctionName != nil { + if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil { + return err + } + } + + if len(v.InvocationType) > 0 { + locationName := "X-Amz-Invocation-Type" + encoder.SetHeader(locationName).String(string(v.InvocationType)) + } + + if len(v.LogType) > 0 { + locationName := "X-Amz-Log-Type" + encoder.SetHeader(locationName).String(string(v.LogType)) + } + + if v.Qualifier != nil { + encoder.SetQuery("Qualifier").String(*v.Qualifier) + } + + return nil +} + +type awsRestjson1_serializeOpInvokeAsync struct { +} + +func (*awsRestjson1_serializeOpInvokeAsync) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpInvokeAsync) 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.(*InvokeAsyncInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2014-11-13/functions/{FunctionName}/invoke-async") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsInvokeAsyncInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/octet-stream") + } + + if input.InvokeArgs != nil { + payload := input.InvokeArgs + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsInvokeAsyncInput(v *InvokeAsyncInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FunctionName == nil || len(*v.FunctionName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")} + } + if v.FunctionName != nil { + if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpInvokeWithResponseStream struct { +} + +func (*awsRestjson1_serializeOpInvokeWithResponseStream) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpInvokeWithResponseStream) 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.(*InvokeWithResponseStreamInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-11-15/functions/{FunctionName}/response-streaming-invocations") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsInvokeWithResponseStreamInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if !restEncoder.HasHeader("Content-Type") { + ctx = smithyhttp.SetIsContentTypeDefaultValue(ctx, true) + restEncoder.SetHeader("Content-Type").String("application/octet-stream") + } + + if input.Payload != nil { + payload := bytes.NewReader(input.Payload) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsInvokeWithResponseStreamInput(v *InvokeWithResponseStreamInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ClientContext != nil { + locationName := "X-Amz-Client-Context" + encoder.SetHeader(locationName).String(*v.ClientContext) + } + + if v.FunctionName == nil || len(*v.FunctionName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")} + } + if v.FunctionName != nil { + if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil { + return err + } + } + + if len(v.InvocationType) > 0 { + locationName := "X-Amz-Invocation-Type" + encoder.SetHeader(locationName).String(string(v.InvocationType)) + } + + if len(v.LogType) > 0 { + locationName := "X-Amz-Log-Type" + encoder.SetHeader(locationName).String(string(v.LogType)) + } + + if v.Qualifier != nil { + encoder.SetQuery("Qualifier").String(*v.Qualifier) + } + + return nil +} + +type awsRestjson1_serializeOpListAliases struct { +} + +func (*awsRestjson1_serializeOpListAliases) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListAliases) 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.(*ListAliasesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-03-31/functions/{FunctionName}/aliases") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListAliasesInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListAliasesInput(v *ListAliasesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FunctionName == nil || len(*v.FunctionName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")} + } + if v.FunctionName != nil { + if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil { + return err + } + } + + if v.FunctionVersion != nil { + encoder.SetQuery("FunctionVersion").String(*v.FunctionVersion) + } + + if v.Marker != nil { + encoder.SetQuery("Marker").String(*v.Marker) + } + + if v.MaxItems != nil { + encoder.SetQuery("MaxItems").Integer(*v.MaxItems) + } + + return nil +} + +type awsRestjson1_serializeOpListCodeSigningConfigs struct { +} + +func (*awsRestjson1_serializeOpListCodeSigningConfigs) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListCodeSigningConfigs) 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.(*ListCodeSigningConfigsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-04-22/code-signing-configs") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListCodeSigningConfigsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListCodeSigningConfigsInput(v *ListCodeSigningConfigsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Marker != nil { + encoder.SetQuery("Marker").String(*v.Marker) + } + + if v.MaxItems != nil { + encoder.SetQuery("MaxItems").Integer(*v.MaxItems) + } + + return nil +} + +type awsRestjson1_serializeOpListEventSourceMappings struct { +} + +func (*awsRestjson1_serializeOpListEventSourceMappings) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListEventSourceMappings) 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.(*ListEventSourceMappingsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-03-31/event-source-mappings") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListEventSourceMappingsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListEventSourceMappingsInput(v *ListEventSourceMappingsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.EventSourceArn != nil { + encoder.SetQuery("EventSourceArn").String(*v.EventSourceArn) + } + + if v.FunctionName != nil { + encoder.SetQuery("FunctionName").String(*v.FunctionName) + } + + if v.Marker != nil { + encoder.SetQuery("Marker").String(*v.Marker) + } + + if v.MaxItems != nil { + encoder.SetQuery("MaxItems").Integer(*v.MaxItems) + } + + return nil +} + +type awsRestjson1_serializeOpListFunctionEventInvokeConfigs struct { +} + +func (*awsRestjson1_serializeOpListFunctionEventInvokeConfigs) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListFunctionEventInvokeConfigs) 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.(*ListFunctionEventInvokeConfigsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2019-09-25/functions/{FunctionName}/event-invoke-config/list") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListFunctionEventInvokeConfigsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListFunctionEventInvokeConfigsInput(v *ListFunctionEventInvokeConfigsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FunctionName == nil || len(*v.FunctionName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")} + } + if v.FunctionName != nil { + if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil { + return err + } + } + + if v.Marker != nil { + encoder.SetQuery("Marker").String(*v.Marker) + } + + if v.MaxItems != nil { + encoder.SetQuery("MaxItems").Integer(*v.MaxItems) + } + + return nil +} + +type awsRestjson1_serializeOpListFunctions struct { +} + +func (*awsRestjson1_serializeOpListFunctions) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListFunctions) 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.(*ListFunctionsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-03-31/functions") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListFunctionsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListFunctionsInput(v *ListFunctionsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if len(v.FunctionVersion) > 0 { + encoder.SetQuery("FunctionVersion").String(string(v.FunctionVersion)) + } + + if v.Marker != nil { + encoder.SetQuery("Marker").String(*v.Marker) + } + + if v.MasterRegion != nil { + encoder.SetQuery("MasterRegion").String(*v.MasterRegion) + } + + if v.MaxItems != nil { + encoder.SetQuery("MaxItems").Integer(*v.MaxItems) + } + + return nil +} + +type awsRestjson1_serializeOpListFunctionsByCodeSigningConfig struct { +} + +func (*awsRestjson1_serializeOpListFunctionsByCodeSigningConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListFunctionsByCodeSigningConfig) 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.(*ListFunctionsByCodeSigningConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-04-22/code-signing-configs/{CodeSigningConfigArn}/functions") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListFunctionsByCodeSigningConfigInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListFunctionsByCodeSigningConfigInput(v *ListFunctionsByCodeSigningConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.CodeSigningConfigArn == nil || len(*v.CodeSigningConfigArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member CodeSigningConfigArn must not be empty")} + } + if v.CodeSigningConfigArn != nil { + if err := encoder.SetURI("CodeSigningConfigArn").String(*v.CodeSigningConfigArn); err != nil { + return err + } + } + + if v.Marker != nil { + encoder.SetQuery("Marker").String(*v.Marker) + } + + if v.MaxItems != nil { + encoder.SetQuery("MaxItems").Integer(*v.MaxItems) + } + + return nil +} + +type awsRestjson1_serializeOpListFunctionUrlConfigs struct { +} + +func (*awsRestjson1_serializeOpListFunctionUrlConfigs) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListFunctionUrlConfigs) 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.(*ListFunctionUrlConfigsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-10-31/functions/{FunctionName}/urls") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListFunctionUrlConfigsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListFunctionUrlConfigsInput(v *ListFunctionUrlConfigsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FunctionName == nil || len(*v.FunctionName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")} + } + if v.FunctionName != nil { + if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil { + return err + } + } + + if v.Marker != nil { + encoder.SetQuery("Marker").String(*v.Marker) + } + + if v.MaxItems != nil { + encoder.SetQuery("MaxItems").Integer(*v.MaxItems) + } + + return nil +} + +type awsRestjson1_serializeOpListLayers struct { +} + +func (*awsRestjson1_serializeOpListLayers) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListLayers) 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.(*ListLayersInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2018-10-31/layers") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListLayersInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListLayersInput(v *ListLayersInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if len(v.CompatibleArchitecture) > 0 { + encoder.SetQuery("CompatibleArchitecture").String(string(v.CompatibleArchitecture)) + } + + if len(v.CompatibleRuntime) > 0 { + encoder.SetQuery("CompatibleRuntime").String(string(v.CompatibleRuntime)) + } + + if v.Marker != nil { + encoder.SetQuery("Marker").String(*v.Marker) + } + + if v.MaxItems != nil { + encoder.SetQuery("MaxItems").Integer(*v.MaxItems) + } + + return nil +} + +type awsRestjson1_serializeOpListLayerVersions struct { +} + +func (*awsRestjson1_serializeOpListLayerVersions) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListLayerVersions) 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.(*ListLayerVersionsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2018-10-31/layers/{LayerName}/versions") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListLayerVersionsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListLayerVersionsInput(v *ListLayerVersionsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if len(v.CompatibleArchitecture) > 0 { + encoder.SetQuery("CompatibleArchitecture").String(string(v.CompatibleArchitecture)) + } + + if len(v.CompatibleRuntime) > 0 { + encoder.SetQuery("CompatibleRuntime").String(string(v.CompatibleRuntime)) + } + + if v.LayerName == nil || len(*v.LayerName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member LayerName must not be empty")} + } + if v.LayerName != nil { + if err := encoder.SetURI("LayerName").String(*v.LayerName); err != nil { + return err + } + } + + if v.Marker != nil { + encoder.SetQuery("Marker").String(*v.Marker) + } + + if v.MaxItems != nil { + encoder.SetQuery("MaxItems").Integer(*v.MaxItems) + } + + return nil +} + +type awsRestjson1_serializeOpListProvisionedConcurrencyConfigs struct { +} + +func (*awsRestjson1_serializeOpListProvisionedConcurrencyConfigs) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListProvisionedConcurrencyConfigs) 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.(*ListProvisionedConcurrencyConfigsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2019-09-30/functions/{FunctionName}/provisioned-concurrency?List=ALL") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListProvisionedConcurrencyConfigsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListProvisionedConcurrencyConfigsInput(v *ListProvisionedConcurrencyConfigsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FunctionName == nil || len(*v.FunctionName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")} + } + if v.FunctionName != nil { + if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil { + return err + } + } + + if v.Marker != nil { + encoder.SetQuery("Marker").String(*v.Marker) + } + + if v.MaxItems != nil { + encoder.SetQuery("MaxItems").Integer(*v.MaxItems) + } + + return nil +} + +type awsRestjson1_serializeOpListTags struct { +} + +func (*awsRestjson1_serializeOpListTags) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListTags) 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.(*ListTagsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2017-03-31/tags/{Resource}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListTagsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListTagsInput(v *ListTagsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Resource == nil || len(*v.Resource) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Resource must not be empty")} + } + if v.Resource != nil { + if err := encoder.SetURI("Resource").String(*v.Resource); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpListVersionsByFunction struct { +} + +func (*awsRestjson1_serializeOpListVersionsByFunction) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListVersionsByFunction) 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.(*ListVersionsByFunctionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-03-31/functions/{FunctionName}/versions") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListVersionsByFunctionInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListVersionsByFunctionInput(v *ListVersionsByFunctionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FunctionName == nil || len(*v.FunctionName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")} + } + if v.FunctionName != nil { + if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil { + return err + } + } + + if v.Marker != nil { + encoder.SetQuery("Marker").String(*v.Marker) + } + + if v.MaxItems != nil { + encoder.SetQuery("MaxItems").Integer(*v.MaxItems) + } + + return nil +} + +type awsRestjson1_serializeOpPublishLayerVersion struct { +} + +func (*awsRestjson1_serializeOpPublishLayerVersion) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpPublishLayerVersion) 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.(*PublishLayerVersionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2018-10-31/layers/{LayerName}/versions") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsPublishLayerVersionInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentPublishLayerVersionInput(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 = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsPublishLayerVersionInput(v *PublishLayerVersionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.LayerName == nil || len(*v.LayerName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member LayerName must not be empty")} + } + if v.LayerName != nil { + if err := encoder.SetURI("LayerName").String(*v.LayerName); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentPublishLayerVersionInput(v *PublishLayerVersionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CompatibleArchitectures != nil { + ok := object.Key("CompatibleArchitectures") + if err := awsRestjson1_serializeDocumentCompatibleArchitectures(v.CompatibleArchitectures, ok); err != nil { + return err + } + } + + if v.CompatibleRuntimes != nil { + ok := object.Key("CompatibleRuntimes") + if err := awsRestjson1_serializeDocumentCompatibleRuntimes(v.CompatibleRuntimes, ok); err != nil { + return err + } + } + + if v.Content != nil { + ok := object.Key("Content") + if err := awsRestjson1_serializeDocumentLayerVersionContentInput(v.Content, ok); err != nil { + return err + } + } + + if v.Description != nil { + ok := object.Key("Description") + ok.String(*v.Description) + } + + if v.LicenseInfo != nil { + ok := object.Key("LicenseInfo") + ok.String(*v.LicenseInfo) + } + + return nil +} + +type awsRestjson1_serializeOpPublishVersion struct { +} + +func (*awsRestjson1_serializeOpPublishVersion) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpPublishVersion) 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.(*PublishVersionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-03-31/functions/{FunctionName}/versions") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsPublishVersionInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentPublishVersionInput(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 = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsPublishVersionInput(v *PublishVersionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FunctionName == nil || len(*v.FunctionName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")} + } + if v.FunctionName != nil { + if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentPublishVersionInput(v *PublishVersionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CodeSha256 != nil { + ok := object.Key("CodeSha256") + ok.String(*v.CodeSha256) + } + + if v.Description != nil { + ok := object.Key("Description") + ok.String(*v.Description) + } + + if v.RevisionId != nil { + ok := object.Key("RevisionId") + ok.String(*v.RevisionId) + } + + return nil +} + +type awsRestjson1_serializeOpPutFunctionCodeSigningConfig struct { +} + +func (*awsRestjson1_serializeOpPutFunctionCodeSigningConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpPutFunctionCodeSigningConfig) 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.(*PutFunctionCodeSigningConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-06-30/functions/{FunctionName}/code-signing-config") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsPutFunctionCodeSigningConfigInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentPutFunctionCodeSigningConfigInput(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 = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsPutFunctionCodeSigningConfigInput(v *PutFunctionCodeSigningConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FunctionName == nil || len(*v.FunctionName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")} + } + if v.FunctionName != nil { + if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentPutFunctionCodeSigningConfigInput(v *PutFunctionCodeSigningConfigInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CodeSigningConfigArn != nil { + ok := object.Key("CodeSigningConfigArn") + ok.String(*v.CodeSigningConfigArn) + } + + return nil +} + +type awsRestjson1_serializeOpPutFunctionConcurrency struct { +} + +func (*awsRestjson1_serializeOpPutFunctionConcurrency) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpPutFunctionConcurrency) 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.(*PutFunctionConcurrencyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2017-10-31/functions/{FunctionName}/concurrency") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsPutFunctionConcurrencyInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentPutFunctionConcurrencyInput(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 = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsPutFunctionConcurrencyInput(v *PutFunctionConcurrencyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FunctionName == nil || len(*v.FunctionName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")} + } + if v.FunctionName != nil { + if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentPutFunctionConcurrencyInput(v *PutFunctionConcurrencyInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ReservedConcurrentExecutions != nil { + ok := object.Key("ReservedConcurrentExecutions") + ok.Integer(*v.ReservedConcurrentExecutions) + } + + return nil +} + +type awsRestjson1_serializeOpPutFunctionEventInvokeConfig struct { +} + +func (*awsRestjson1_serializeOpPutFunctionEventInvokeConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpPutFunctionEventInvokeConfig) 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.(*PutFunctionEventInvokeConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2019-09-25/functions/{FunctionName}/event-invoke-config") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsPutFunctionEventInvokeConfigInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentPutFunctionEventInvokeConfigInput(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 = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsPutFunctionEventInvokeConfigInput(v *PutFunctionEventInvokeConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FunctionName == nil || len(*v.FunctionName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")} + } + if v.FunctionName != nil { + if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil { + return err + } + } + + if v.Qualifier != nil { + encoder.SetQuery("Qualifier").String(*v.Qualifier) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentPutFunctionEventInvokeConfigInput(v *PutFunctionEventInvokeConfigInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DestinationConfig != nil { + ok := object.Key("DestinationConfig") + if err := awsRestjson1_serializeDocumentDestinationConfig(v.DestinationConfig, ok); err != nil { + return err + } + } + + if v.MaximumEventAgeInSeconds != nil { + ok := object.Key("MaximumEventAgeInSeconds") + ok.Integer(*v.MaximumEventAgeInSeconds) + } + + if v.MaximumRetryAttempts != nil { + ok := object.Key("MaximumRetryAttempts") + ok.Integer(*v.MaximumRetryAttempts) + } + + return nil +} + +type awsRestjson1_serializeOpPutFunctionRecursionConfig struct { +} + +func (*awsRestjson1_serializeOpPutFunctionRecursionConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpPutFunctionRecursionConfig) 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.(*PutFunctionRecursionConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2024-08-31/functions/{FunctionName}/recursion-config") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsPutFunctionRecursionConfigInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentPutFunctionRecursionConfigInput(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 = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsPutFunctionRecursionConfigInput(v *PutFunctionRecursionConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FunctionName == nil || len(*v.FunctionName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")} + } + if v.FunctionName != nil { + if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentPutFunctionRecursionConfigInput(v *PutFunctionRecursionConfigInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.RecursiveLoop) > 0 { + ok := object.Key("RecursiveLoop") + ok.String(string(v.RecursiveLoop)) + } + + return nil +} + +type awsRestjson1_serializeOpPutProvisionedConcurrencyConfig struct { +} + +func (*awsRestjson1_serializeOpPutProvisionedConcurrencyConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpPutProvisionedConcurrencyConfig) 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.(*PutProvisionedConcurrencyConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2019-09-30/functions/{FunctionName}/provisioned-concurrency") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsPutProvisionedConcurrencyConfigInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentPutProvisionedConcurrencyConfigInput(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 = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsPutProvisionedConcurrencyConfigInput(v *PutProvisionedConcurrencyConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FunctionName == nil || len(*v.FunctionName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")} + } + if v.FunctionName != nil { + if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil { + return err + } + } + + if v.Qualifier != nil { + encoder.SetQuery("Qualifier").String(*v.Qualifier) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentPutProvisionedConcurrencyConfigInput(v *PutProvisionedConcurrencyConfigInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ProvisionedConcurrentExecutions != nil { + ok := object.Key("ProvisionedConcurrentExecutions") + ok.Integer(*v.ProvisionedConcurrentExecutions) + } + + return nil +} + +type awsRestjson1_serializeOpPutRuntimeManagementConfig struct { +} + +func (*awsRestjson1_serializeOpPutRuntimeManagementConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpPutRuntimeManagementConfig) 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.(*PutRuntimeManagementConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-07-20/functions/{FunctionName}/runtime-management-config") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsPutRuntimeManagementConfigInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentPutRuntimeManagementConfigInput(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 = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsPutRuntimeManagementConfigInput(v *PutRuntimeManagementConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FunctionName == nil || len(*v.FunctionName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")} + } + if v.FunctionName != nil { + if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil { + return err + } + } + + if v.Qualifier != nil { + encoder.SetQuery("Qualifier").String(*v.Qualifier) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentPutRuntimeManagementConfigInput(v *PutRuntimeManagementConfigInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.RuntimeVersionArn != nil { + ok := object.Key("RuntimeVersionArn") + ok.String(*v.RuntimeVersionArn) + } + + if len(v.UpdateRuntimeOn) > 0 { + ok := object.Key("UpdateRuntimeOn") + ok.String(string(v.UpdateRuntimeOn)) + } + + return nil +} + +type awsRestjson1_serializeOpRemoveLayerVersionPermission struct { +} + +func (*awsRestjson1_serializeOpRemoveLayerVersionPermission) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpRemoveLayerVersionPermission) 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.(*RemoveLayerVersionPermissionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2018-10-31/layers/{LayerName}/versions/{VersionNumber}/policy/{StatementId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsRemoveLayerVersionPermissionInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsRemoveLayerVersionPermissionInput(v *RemoveLayerVersionPermissionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.LayerName == nil || len(*v.LayerName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member LayerName must not be empty")} + } + if v.LayerName != nil { + if err := encoder.SetURI("LayerName").String(*v.LayerName); err != nil { + return err + } + } + + if v.RevisionId != nil { + encoder.SetQuery("RevisionId").String(*v.RevisionId) + } + + if v.StatementId == nil || len(*v.StatementId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member StatementId must not be empty")} + } + if v.StatementId != nil { + if err := encoder.SetURI("StatementId").String(*v.StatementId); err != nil { + return err + } + } + + if v.VersionNumber == nil { + return &smithy.SerializationError{Err: fmt.Errorf("input member VersionNumber must not be empty")} + } + if v.VersionNumber != nil { + if err := encoder.SetURI("VersionNumber").Long(*v.VersionNumber); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpRemovePermission struct { +} + +func (*awsRestjson1_serializeOpRemovePermission) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpRemovePermission) 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.(*RemovePermissionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-03-31/functions/{FunctionName}/policy/{StatementId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsRemovePermissionInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsRemovePermissionInput(v *RemovePermissionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FunctionName == nil || len(*v.FunctionName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")} + } + if v.FunctionName != nil { + if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil { + return err + } + } + + if v.Qualifier != nil { + encoder.SetQuery("Qualifier").String(*v.Qualifier) + } + + if v.RevisionId != nil { + encoder.SetQuery("RevisionId").String(*v.RevisionId) + } + + if v.StatementId == nil || len(*v.StatementId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member StatementId must not be empty")} + } + if v.StatementId != nil { + if err := encoder.SetURI("StatementId").String(*v.StatementId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpTagResource struct { +} + +func (*awsRestjson1_serializeOpTagResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_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)} + } + + opPath, opQuery := httpbinding.SplitURI("/2017-03-31/tags/{Resource}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsTagResourceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_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 = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsTagResourceInput(v *TagResourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Resource == nil || len(*v.Resource) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Resource must not be empty")} + } + if v.Resource != nil { + if err := encoder.SetURI("Resource").String(*v.Resource); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsRestjson1_serializeDocumentTags(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpUntagResource struct { +} + +func (*awsRestjson1_serializeOpUntagResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_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)} + } + + opPath, opQuery := httpbinding.SplitURI("/2017-03-31/tags/{Resource}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUntagResourceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUntagResourceInput(v *UntagResourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Resource == nil || len(*v.Resource) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Resource must not be empty")} + } + if v.Resource != nil { + if err := encoder.SetURI("Resource").String(*v.Resource); err != nil { + return err + } + } + + if v.TagKeys != nil { + for i := range v.TagKeys { + encoder.AddQuery("tagKeys").String(v.TagKeys[i]) + } + } + + return nil +} + +type awsRestjson1_serializeOpUpdateAlias struct { +} + +func (*awsRestjson1_serializeOpUpdateAlias) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateAlias) 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.(*UpdateAliasInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-03-31/functions/{FunctionName}/aliases/{Name}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateAliasInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateAliasInput(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 = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUpdateAliasInput(v *UpdateAliasInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FunctionName == nil || len(*v.FunctionName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")} + } + if v.FunctionName != nil { + if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil { + return err + } + } + + if v.Name == nil || len(*v.Name) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")} + } + if v.Name != nil { + if err := encoder.SetURI("Name").String(*v.Name); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateAliasInput(v *UpdateAliasInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Description != nil { + ok := object.Key("Description") + ok.String(*v.Description) + } + + if v.FunctionVersion != nil { + ok := object.Key("FunctionVersion") + ok.String(*v.FunctionVersion) + } + + if v.RevisionId != nil { + ok := object.Key("RevisionId") + ok.String(*v.RevisionId) + } + + if v.RoutingConfig != nil { + ok := object.Key("RoutingConfig") + if err := awsRestjson1_serializeDocumentAliasRoutingConfiguration(v.RoutingConfig, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpUpdateCodeSigningConfig struct { +} + +func (*awsRestjson1_serializeOpUpdateCodeSigningConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateCodeSigningConfig) 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.(*UpdateCodeSigningConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2020-04-22/code-signing-configs/{CodeSigningConfigArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateCodeSigningConfigInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateCodeSigningConfigInput(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 = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUpdateCodeSigningConfigInput(v *UpdateCodeSigningConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.CodeSigningConfigArn == nil || len(*v.CodeSigningConfigArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member CodeSigningConfigArn must not be empty")} + } + if v.CodeSigningConfigArn != nil { + if err := encoder.SetURI("CodeSigningConfigArn").String(*v.CodeSigningConfigArn); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateCodeSigningConfigInput(v *UpdateCodeSigningConfigInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AllowedPublishers != nil { + ok := object.Key("AllowedPublishers") + if err := awsRestjson1_serializeDocumentAllowedPublishers(v.AllowedPublishers, ok); err != nil { + return err + } + } + + if v.CodeSigningPolicies != nil { + ok := object.Key("CodeSigningPolicies") + if err := awsRestjson1_serializeDocumentCodeSigningPolicies(v.CodeSigningPolicies, ok); err != nil { + return err + } + } + + if v.Description != nil { + ok := object.Key("Description") + ok.String(*v.Description) + } + + return nil +} + +type awsRestjson1_serializeOpUpdateEventSourceMapping struct { +} + +func (*awsRestjson1_serializeOpUpdateEventSourceMapping) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateEventSourceMapping) 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.(*UpdateEventSourceMappingInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-03-31/event-source-mappings/{UUID}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateEventSourceMappingInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateEventSourceMappingInput(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 = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUpdateEventSourceMappingInput(v *UpdateEventSourceMappingInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.UUID == nil || len(*v.UUID) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member UUID must not be empty")} + } + if v.UUID != nil { + if err := encoder.SetURI("UUID").String(*v.UUID); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateEventSourceMappingInput(v *UpdateEventSourceMappingInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BatchSize != nil { + ok := object.Key("BatchSize") + ok.Integer(*v.BatchSize) + } + + if v.BisectBatchOnFunctionError != nil { + ok := object.Key("BisectBatchOnFunctionError") + ok.Boolean(*v.BisectBatchOnFunctionError) + } + + if v.DestinationConfig != nil { + ok := object.Key("DestinationConfig") + if err := awsRestjson1_serializeDocumentDestinationConfig(v.DestinationConfig, ok); err != nil { + return err + } + } + + if v.DocumentDBEventSourceConfig != nil { + ok := object.Key("DocumentDBEventSourceConfig") + if err := awsRestjson1_serializeDocumentDocumentDBEventSourceConfig(v.DocumentDBEventSourceConfig, ok); err != nil { + return err + } + } + + if v.Enabled != nil { + ok := object.Key("Enabled") + ok.Boolean(*v.Enabled) + } + + if v.FilterCriteria != nil { + ok := object.Key("FilterCriteria") + if err := awsRestjson1_serializeDocumentFilterCriteria(v.FilterCriteria, ok); err != nil { + return err + } + } + + if v.FunctionName != nil { + ok := object.Key("FunctionName") + ok.String(*v.FunctionName) + } + + if v.FunctionResponseTypes != nil { + ok := object.Key("FunctionResponseTypes") + if err := awsRestjson1_serializeDocumentFunctionResponseTypeList(v.FunctionResponseTypes, ok); err != nil { + return err + } + } + + if v.KMSKeyArn != nil { + ok := object.Key("KMSKeyArn") + ok.String(*v.KMSKeyArn) + } + + if v.MaximumBatchingWindowInSeconds != nil { + ok := object.Key("MaximumBatchingWindowInSeconds") + ok.Integer(*v.MaximumBatchingWindowInSeconds) + } + + if v.MaximumRecordAgeInSeconds != nil { + ok := object.Key("MaximumRecordAgeInSeconds") + ok.Integer(*v.MaximumRecordAgeInSeconds) + } + + if v.MaximumRetryAttempts != nil { + ok := object.Key("MaximumRetryAttempts") + ok.Integer(*v.MaximumRetryAttempts) + } + + if v.MetricsConfig != nil { + ok := object.Key("MetricsConfig") + if err := awsRestjson1_serializeDocumentEventSourceMappingMetricsConfig(v.MetricsConfig, ok); err != nil { + return err + } + } + + if v.ParallelizationFactor != nil { + ok := object.Key("ParallelizationFactor") + ok.Integer(*v.ParallelizationFactor) + } + + if v.ProvisionedPollerConfig != nil { + ok := object.Key("ProvisionedPollerConfig") + if err := awsRestjson1_serializeDocumentProvisionedPollerConfig(v.ProvisionedPollerConfig, ok); err != nil { + return err + } + } + + if v.ScalingConfig != nil { + ok := object.Key("ScalingConfig") + if err := awsRestjson1_serializeDocumentScalingConfig(v.ScalingConfig, ok); err != nil { + return err + } + } + + if v.SourceAccessConfigurations != nil { + ok := object.Key("SourceAccessConfigurations") + if err := awsRestjson1_serializeDocumentSourceAccessConfigurations(v.SourceAccessConfigurations, ok); err != nil { + return err + } + } + + if v.TumblingWindowInSeconds != nil { + ok := object.Key("TumblingWindowInSeconds") + ok.Integer(*v.TumblingWindowInSeconds) + } + + return nil +} + +type awsRestjson1_serializeOpUpdateFunctionCode struct { +} + +func (*awsRestjson1_serializeOpUpdateFunctionCode) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateFunctionCode) 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.(*UpdateFunctionCodeInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-03-31/functions/{FunctionName}/code") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateFunctionCodeInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateFunctionCodeInput(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 = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUpdateFunctionCodeInput(v *UpdateFunctionCodeInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FunctionName == nil || len(*v.FunctionName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")} + } + if v.FunctionName != nil { + if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateFunctionCodeInput(v *UpdateFunctionCodeInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Architectures != nil { + ok := object.Key("Architectures") + if err := awsRestjson1_serializeDocumentArchitecturesList(v.Architectures, ok); err != nil { + return err + } + } + + if v.DryRun { + ok := object.Key("DryRun") + ok.Boolean(v.DryRun) + } + + if v.ImageUri != nil { + ok := object.Key("ImageUri") + ok.String(*v.ImageUri) + } + + if v.Publish { + ok := object.Key("Publish") + ok.Boolean(v.Publish) + } + + if v.RevisionId != nil { + ok := object.Key("RevisionId") + ok.String(*v.RevisionId) + } + + if v.S3Bucket != nil { + ok := object.Key("S3Bucket") + ok.String(*v.S3Bucket) + } + + if v.S3Key != nil { + ok := object.Key("S3Key") + ok.String(*v.S3Key) + } + + if v.S3ObjectVersion != nil { + ok := object.Key("S3ObjectVersion") + ok.String(*v.S3ObjectVersion) + } + + if v.SourceKMSKeyArn != nil { + ok := object.Key("SourceKMSKeyArn") + ok.String(*v.SourceKMSKeyArn) + } + + if v.ZipFile != nil { + ok := object.Key("ZipFile") + ok.Base64EncodeBytes(v.ZipFile) + } + + return nil +} + +type awsRestjson1_serializeOpUpdateFunctionConfiguration struct { +} + +func (*awsRestjson1_serializeOpUpdateFunctionConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateFunctionConfiguration) 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.(*UpdateFunctionConfigurationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-03-31/functions/{FunctionName}/configuration") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateFunctionConfigurationInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateFunctionConfigurationInput(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 = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUpdateFunctionConfigurationInput(v *UpdateFunctionConfigurationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FunctionName == nil || len(*v.FunctionName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")} + } + if v.FunctionName != nil { + if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateFunctionConfigurationInput(v *UpdateFunctionConfigurationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DeadLetterConfig != nil { + ok := object.Key("DeadLetterConfig") + if err := awsRestjson1_serializeDocumentDeadLetterConfig(v.DeadLetterConfig, ok); err != nil { + return err + } + } + + if v.Description != nil { + ok := object.Key("Description") + ok.String(*v.Description) + } + + if v.Environment != nil { + ok := object.Key("Environment") + if err := awsRestjson1_serializeDocumentEnvironment(v.Environment, ok); err != nil { + return err + } + } + + if v.EphemeralStorage != nil { + ok := object.Key("EphemeralStorage") + if err := awsRestjson1_serializeDocumentEphemeralStorage(v.EphemeralStorage, ok); err != nil { + return err + } + } + + if v.FileSystemConfigs != nil { + ok := object.Key("FileSystemConfigs") + if err := awsRestjson1_serializeDocumentFileSystemConfigList(v.FileSystemConfigs, ok); err != nil { + return err + } + } + + if v.Handler != nil { + ok := object.Key("Handler") + ok.String(*v.Handler) + } + + if v.ImageConfig != nil { + ok := object.Key("ImageConfig") + if err := awsRestjson1_serializeDocumentImageConfig(v.ImageConfig, ok); err != nil { + return err + } + } + + if v.KMSKeyArn != nil { + ok := object.Key("KMSKeyArn") + ok.String(*v.KMSKeyArn) + } + + if v.Layers != nil { + ok := object.Key("Layers") + if err := awsRestjson1_serializeDocumentLayerList(v.Layers, ok); err != nil { + return err + } + } + + if v.LoggingConfig != nil { + ok := object.Key("LoggingConfig") + if err := awsRestjson1_serializeDocumentLoggingConfig(v.LoggingConfig, ok); err != nil { + return err + } + } + + if v.MemorySize != nil { + ok := object.Key("MemorySize") + ok.Integer(*v.MemorySize) + } + + if v.RevisionId != nil { + ok := object.Key("RevisionId") + ok.String(*v.RevisionId) + } + + if v.Role != nil { + ok := object.Key("Role") + ok.String(*v.Role) + } + + if len(v.Runtime) > 0 { + ok := object.Key("Runtime") + ok.String(string(v.Runtime)) + } + + if v.SnapStart != nil { + ok := object.Key("SnapStart") + if err := awsRestjson1_serializeDocumentSnapStart(v.SnapStart, ok); err != nil { + return err + } + } + + if v.Timeout != nil { + ok := object.Key("Timeout") + ok.Integer(*v.Timeout) + } + + if v.TracingConfig != nil { + ok := object.Key("TracingConfig") + if err := awsRestjson1_serializeDocumentTracingConfig(v.TracingConfig, ok); err != nil { + return err + } + } + + if v.VpcConfig != nil { + ok := object.Key("VpcConfig") + if err := awsRestjson1_serializeDocumentVpcConfig(v.VpcConfig, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpUpdateFunctionEventInvokeConfig struct { +} + +func (*awsRestjson1_serializeOpUpdateFunctionEventInvokeConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateFunctionEventInvokeConfig) 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.(*UpdateFunctionEventInvokeConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2019-09-25/functions/{FunctionName}/event-invoke-config") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateFunctionEventInvokeConfigInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateFunctionEventInvokeConfigInput(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 = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUpdateFunctionEventInvokeConfigInput(v *UpdateFunctionEventInvokeConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FunctionName == nil || len(*v.FunctionName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")} + } + if v.FunctionName != nil { + if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil { + return err + } + } + + if v.Qualifier != nil { + encoder.SetQuery("Qualifier").String(*v.Qualifier) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateFunctionEventInvokeConfigInput(v *UpdateFunctionEventInvokeConfigInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DestinationConfig != nil { + ok := object.Key("DestinationConfig") + if err := awsRestjson1_serializeDocumentDestinationConfig(v.DestinationConfig, ok); err != nil { + return err + } + } + + if v.MaximumEventAgeInSeconds != nil { + ok := object.Key("MaximumEventAgeInSeconds") + ok.Integer(*v.MaximumEventAgeInSeconds) + } + + if v.MaximumRetryAttempts != nil { + ok := object.Key("MaximumRetryAttempts") + ok.Integer(*v.MaximumRetryAttempts) + } + + return nil +} + +type awsRestjson1_serializeOpUpdateFunctionUrlConfig struct { +} + +func (*awsRestjson1_serializeOpUpdateFunctionUrlConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateFunctionUrlConfig) 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.(*UpdateFunctionUrlConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-10-31/functions/{FunctionName}/url") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateFunctionUrlConfigInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateFunctionUrlConfigInput(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 = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUpdateFunctionUrlConfigInput(v *UpdateFunctionUrlConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FunctionName == nil || len(*v.FunctionName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FunctionName must not be empty")} + } + if v.FunctionName != nil { + if err := encoder.SetURI("FunctionName").String(*v.FunctionName); err != nil { + return err + } + } + + if v.Qualifier != nil { + encoder.SetQuery("Qualifier").String(*v.Qualifier) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateFunctionUrlConfigInput(v *UpdateFunctionUrlConfigInput, 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 v.Cors != nil { + ok := object.Key("Cors") + if err := awsRestjson1_serializeDocumentCors(v.Cors, ok); err != nil { + return err + } + } + + if len(v.InvokeMode) > 0 { + ok := object.Key("InvokeMode") + ok.String(string(v.InvokeMode)) + } + + return nil +} + +func awsRestjson1_serializeDocumentAdditionalVersionWeights(v map[string]float64, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + switch { + case math.IsNaN(v[key]): + om.String("NaN") + + case math.IsInf(v[key], 1): + om.String("Infinity") + + case math.IsInf(v[key], -1): + om.String("-Infinity") + + default: + om.Double(v[key]) + + } + } + return nil +} + +func awsRestjson1_serializeDocumentAliasRoutingConfiguration(v *types.AliasRoutingConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AdditionalVersionWeights != nil { + ok := object.Key("AdditionalVersionWeights") + if err := awsRestjson1_serializeDocumentAdditionalVersionWeights(v.AdditionalVersionWeights, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentAllowedPublishers(v *types.AllowedPublishers, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.SigningProfileVersionArns != nil { + ok := object.Key("SigningProfileVersionArns") + if err := awsRestjson1_serializeDocumentSigningProfileVersionArns(v.SigningProfileVersionArns, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentAllowMethodsList(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 awsRestjson1_serializeDocumentAllowOriginsList(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 awsRestjson1_serializeDocumentAmazonManagedKafkaEventSourceConfig(v *types.AmazonManagedKafkaEventSourceConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ConsumerGroupId != nil { + ok := object.Key("ConsumerGroupId") + ok.String(*v.ConsumerGroupId) + } + + return nil +} + +func awsRestjson1_serializeDocumentArchitecturesList(v []types.Architecture, 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 awsRestjson1_serializeDocumentCodeSigningPolicies(v *types.CodeSigningPolicies, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.UntrustedArtifactOnDeployment) > 0 { + ok := object.Key("UntrustedArtifactOnDeployment") + ok.String(string(v.UntrustedArtifactOnDeployment)) + } + + return nil +} + +func awsRestjson1_serializeDocumentCompatibleArchitectures(v []types.Architecture, 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 awsRestjson1_serializeDocumentCompatibleRuntimes(v []types.Runtime, 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 awsRestjson1_serializeDocumentCors(v *types.Cors, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AllowCredentials != nil { + ok := object.Key("AllowCredentials") + ok.Boolean(*v.AllowCredentials) + } + + if v.AllowHeaders != nil { + ok := object.Key("AllowHeaders") + if err := awsRestjson1_serializeDocumentHeadersList(v.AllowHeaders, ok); err != nil { + return err + } + } + + if v.AllowMethods != nil { + ok := object.Key("AllowMethods") + if err := awsRestjson1_serializeDocumentAllowMethodsList(v.AllowMethods, ok); err != nil { + return err + } + } + + if v.AllowOrigins != nil { + ok := object.Key("AllowOrigins") + if err := awsRestjson1_serializeDocumentAllowOriginsList(v.AllowOrigins, ok); err != nil { + return err + } + } + + if v.ExposeHeaders != nil { + ok := object.Key("ExposeHeaders") + if err := awsRestjson1_serializeDocumentHeadersList(v.ExposeHeaders, ok); err != nil { + return err + } + } + + if v.MaxAge != nil { + ok := object.Key("MaxAge") + ok.Integer(*v.MaxAge) + } + + return nil +} + +func awsRestjson1_serializeDocumentDeadLetterConfig(v *types.DeadLetterConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.TargetArn != nil { + ok := object.Key("TargetArn") + ok.String(*v.TargetArn) + } + + return nil +} + +func awsRestjson1_serializeDocumentDestinationConfig(v *types.DestinationConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.OnFailure != nil { + ok := object.Key("OnFailure") + if err := awsRestjson1_serializeDocumentOnFailure(v.OnFailure, ok); err != nil { + return err + } + } + + if v.OnSuccess != nil { + ok := object.Key("OnSuccess") + if err := awsRestjson1_serializeDocumentOnSuccess(v.OnSuccess, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentDocumentDBEventSourceConfig(v *types.DocumentDBEventSourceConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CollectionName != nil { + ok := object.Key("CollectionName") + ok.String(*v.CollectionName) + } + + if v.DatabaseName != nil { + ok := object.Key("DatabaseName") + ok.String(*v.DatabaseName) + } + + if len(v.FullDocument) > 0 { + ok := object.Key("FullDocument") + ok.String(string(v.FullDocument)) + } + + return nil +} + +func awsRestjson1_serializeDocumentEndpointLists(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 awsRestjson1_serializeDocumentEndpoints(v map[string][]string, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + if vv := v[key]; vv == nil { + continue + } + if err := awsRestjson1_serializeDocumentEndpointLists(v[key], om); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentEnvironment(v *types.Environment, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Variables != nil { + ok := object.Key("Variables") + if err := awsRestjson1_serializeDocumentEnvironmentVariables(v.Variables, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentEnvironmentVariables(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 awsRestjson1_serializeDocumentEphemeralStorage(v *types.EphemeralStorage, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Size != nil { + ok := object.Key("Size") + ok.Integer(*v.Size) + } + + return nil +} + +func awsRestjson1_serializeDocumentEventSourceMappingMetricList(v []types.EventSourceMappingMetric, 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 awsRestjson1_serializeDocumentEventSourceMappingMetricsConfig(v *types.EventSourceMappingMetricsConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Metrics != nil { + ok := object.Key("Metrics") + if err := awsRestjson1_serializeDocumentEventSourceMappingMetricList(v.Metrics, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentFileSystemConfig(v *types.FileSystemConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Arn != nil { + ok := object.Key("Arn") + ok.String(*v.Arn) + } + + if v.LocalMountPath != nil { + ok := object.Key("LocalMountPath") + ok.String(*v.LocalMountPath) + } + + return nil +} + +func awsRestjson1_serializeDocumentFileSystemConfigList(v []types.FileSystemConfig, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentFileSystemConfig(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentFilter(v *types.Filter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Pattern != nil { + ok := object.Key("Pattern") + ok.String(*v.Pattern) + } + + return nil +} + +func awsRestjson1_serializeDocumentFilterCriteria(v *types.FilterCriteria, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsRestjson1_serializeDocumentFilterList(v.Filters, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentFilterList(v []types.Filter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentFunctionCode(v *types.FunctionCode, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ImageUri != nil { + ok := object.Key("ImageUri") + ok.String(*v.ImageUri) + } + + if v.S3Bucket != nil { + ok := object.Key("S3Bucket") + ok.String(*v.S3Bucket) + } + + if v.S3Key != nil { + ok := object.Key("S3Key") + ok.String(*v.S3Key) + } + + if v.S3ObjectVersion != nil { + ok := object.Key("S3ObjectVersion") + ok.String(*v.S3ObjectVersion) + } + + if v.SourceKMSKeyArn != nil { + ok := object.Key("SourceKMSKeyArn") + ok.String(*v.SourceKMSKeyArn) + } + + if v.ZipFile != nil { + ok := object.Key("ZipFile") + ok.Base64EncodeBytes(v.ZipFile) + } + + return nil +} + +func awsRestjson1_serializeDocumentFunctionResponseTypeList(v []types.FunctionResponseType, 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 awsRestjson1_serializeDocumentHeadersList(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 awsRestjson1_serializeDocumentImageConfig(v *types.ImageConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Command != nil { + ok := object.Key("Command") + if err := awsRestjson1_serializeDocumentStringList(v.Command, ok); err != nil { + return err + } + } + + if v.EntryPoint != nil { + ok := object.Key("EntryPoint") + if err := awsRestjson1_serializeDocumentStringList(v.EntryPoint, ok); err != nil { + return err + } + } + + if v.WorkingDirectory != nil { + ok := object.Key("WorkingDirectory") + ok.String(*v.WorkingDirectory) + } + + return nil +} + +func awsRestjson1_serializeDocumentLayerList(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 awsRestjson1_serializeDocumentLayerVersionContentInput(v *types.LayerVersionContentInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.S3Bucket != nil { + ok := object.Key("S3Bucket") + ok.String(*v.S3Bucket) + } + + if v.S3Key != nil { + ok := object.Key("S3Key") + ok.String(*v.S3Key) + } + + if v.S3ObjectVersion != nil { + ok := object.Key("S3ObjectVersion") + ok.String(*v.S3ObjectVersion) + } + + if v.ZipFile != nil { + ok := object.Key("ZipFile") + ok.Base64EncodeBytes(v.ZipFile) + } + + return nil +} + +func awsRestjson1_serializeDocumentLoggingConfig(v *types.LoggingConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.ApplicationLogLevel) > 0 { + ok := object.Key("ApplicationLogLevel") + ok.String(string(v.ApplicationLogLevel)) + } + + if len(v.LogFormat) > 0 { + ok := object.Key("LogFormat") + ok.String(string(v.LogFormat)) + } + + if v.LogGroup != nil { + ok := object.Key("LogGroup") + ok.String(*v.LogGroup) + } + + if len(v.SystemLogLevel) > 0 { + ok := object.Key("SystemLogLevel") + ok.String(string(v.SystemLogLevel)) + } + + return nil +} + +func awsRestjson1_serializeDocumentOnFailure(v *types.OnFailure, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Destination != nil { + ok := object.Key("Destination") + ok.String(*v.Destination) + } + + return nil +} + +func awsRestjson1_serializeDocumentOnSuccess(v *types.OnSuccess, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Destination != nil { + ok := object.Key("Destination") + ok.String(*v.Destination) + } + + return nil +} + +func awsRestjson1_serializeDocumentProvisionedPollerConfig(v *types.ProvisionedPollerConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MaximumPollers != nil { + ok := object.Key("MaximumPollers") + ok.Integer(*v.MaximumPollers) + } + + if v.MinimumPollers != nil { + ok := object.Key("MinimumPollers") + ok.Integer(*v.MinimumPollers) + } + + return nil +} + +func awsRestjson1_serializeDocumentQueues(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 awsRestjson1_serializeDocumentScalingConfig(v *types.ScalingConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MaximumConcurrency != nil { + ok := object.Key("MaximumConcurrency") + ok.Integer(*v.MaximumConcurrency) + } + + return nil +} + +func awsRestjson1_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 awsRestjson1_serializeDocumentSelfManagedEventSource(v *types.SelfManagedEventSource, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Endpoints != nil { + ok := object.Key("Endpoints") + if err := awsRestjson1_serializeDocumentEndpoints(v.Endpoints, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentSelfManagedKafkaEventSourceConfig(v *types.SelfManagedKafkaEventSourceConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ConsumerGroupId != nil { + ok := object.Key("ConsumerGroupId") + ok.String(*v.ConsumerGroupId) + } + + return nil +} + +func awsRestjson1_serializeDocumentSigningProfileVersionArns(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 awsRestjson1_serializeDocumentSnapStart(v *types.SnapStart, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.ApplyOn) > 0 { + ok := object.Key("ApplyOn") + ok.String(string(v.ApplyOn)) + } + + return nil +} + +func awsRestjson1_serializeDocumentSourceAccessConfiguration(v *types.SourceAccessConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Type) > 0 { + ok := object.Key("Type") + ok.String(string(v.Type)) + } + + if v.URI != nil { + ok := object.Key("URI") + ok.String(*v.URI) + } + + return nil +} + +func awsRestjson1_serializeDocumentSourceAccessConfigurations(v []types.SourceAccessConfiguration, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentSourceAccessConfiguration(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentStringList(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 awsRestjson1_serializeDocumentSubnetIds(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 awsRestjson1_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 awsRestjson1_serializeDocumentTopics(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 awsRestjson1_serializeDocumentTracingConfig(v *types.TracingConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Mode) > 0 { + ok := object.Key("Mode") + ok.String(string(v.Mode)) + } + + return nil +} + +func awsRestjson1_serializeDocumentVpcConfig(v *types.VpcConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Ipv6AllowedForDualStack != nil { + ok := object.Key("Ipv6AllowedForDualStack") + ok.Boolean(*v.Ipv6AllowedForDualStack) + } + + if v.SecurityGroupIds != nil { + ok := object.Key("SecurityGroupIds") + if err := awsRestjson1_serializeDocumentSecurityGroupIds(v.SecurityGroupIds, ok); err != nil { + return err + } + } + + if v.SubnetIds != nil { + ok := object.Key("SubnetIds") + if err := awsRestjson1_serializeDocumentSubnetIds(v.SubnetIds, ok); err != nil { + return err + } + } + + return nil +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/types/enums.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/types/enums.go new file mode 100644 index 00000000..69276e81 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/types/enums.go @@ -0,0 +1,771 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +type ApplicationLogLevel string + +// Enum values for ApplicationLogLevel +const ( + ApplicationLogLevelTrace ApplicationLogLevel = "TRACE" + ApplicationLogLevelDebug ApplicationLogLevel = "DEBUG" + ApplicationLogLevelInfo ApplicationLogLevel = "INFO" + ApplicationLogLevelWarn ApplicationLogLevel = "WARN" + ApplicationLogLevelError ApplicationLogLevel = "ERROR" + ApplicationLogLevelFatal ApplicationLogLevel = "FATAL" +) + +// Values returns all known values for ApplicationLogLevel. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ApplicationLogLevel) Values() []ApplicationLogLevel { + return []ApplicationLogLevel{ + "TRACE", + "DEBUG", + "INFO", + "WARN", + "ERROR", + "FATAL", + } +} + +type Architecture string + +// Enum values for Architecture +const ( + ArchitectureX8664 Architecture = "x86_64" + ArchitectureArm64 Architecture = "arm64" +) + +// Values returns all known values for Architecture. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (Architecture) Values() []Architecture { + return []Architecture{ + "x86_64", + "arm64", + } +} + +type CodeSigningPolicy string + +// Enum values for CodeSigningPolicy +const ( + CodeSigningPolicyWarn CodeSigningPolicy = "Warn" + CodeSigningPolicyEnforce CodeSigningPolicy = "Enforce" +) + +// Values returns all known values for CodeSigningPolicy. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (CodeSigningPolicy) Values() []CodeSigningPolicy { + return []CodeSigningPolicy{ + "Warn", + "Enforce", + } +} + +type EndPointType string + +// Enum values for EndPointType +const ( + EndPointTypeKafkaBootstrapServers EndPointType = "KAFKA_BOOTSTRAP_SERVERS" +) + +// Values returns all known values for EndPointType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (EndPointType) Values() []EndPointType { + return []EndPointType{ + "KAFKA_BOOTSTRAP_SERVERS", + } +} + +type EventSourceMappingMetric string + +// Enum values for EventSourceMappingMetric +const ( + EventSourceMappingMetricEventCount EventSourceMappingMetric = "EventCount" +) + +// Values returns all known values for EventSourceMappingMetric. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (EventSourceMappingMetric) Values() []EventSourceMappingMetric { + return []EventSourceMappingMetric{ + "EventCount", + } +} + +type EventSourcePosition string + +// Enum values for EventSourcePosition +const ( + EventSourcePositionTrimHorizon EventSourcePosition = "TRIM_HORIZON" + EventSourcePositionLatest EventSourcePosition = "LATEST" + EventSourcePositionAtTimestamp EventSourcePosition = "AT_TIMESTAMP" +) + +// Values returns all known values for EventSourcePosition. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (EventSourcePosition) Values() []EventSourcePosition { + return []EventSourcePosition{ + "TRIM_HORIZON", + "LATEST", + "AT_TIMESTAMP", + } +} + +type FullDocument string + +// Enum values for FullDocument +const ( + FullDocumentUpdateLookup FullDocument = "UpdateLookup" + FullDocumentDefault FullDocument = "Default" +) + +// Values returns all known values for FullDocument. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (FullDocument) Values() []FullDocument { + return []FullDocument{ + "UpdateLookup", + "Default", + } +} + +type FunctionResponseType string + +// Enum values for FunctionResponseType +const ( + FunctionResponseTypeReportBatchItemFailures FunctionResponseType = "ReportBatchItemFailures" +) + +// Values returns all known values for FunctionResponseType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (FunctionResponseType) Values() []FunctionResponseType { + return []FunctionResponseType{ + "ReportBatchItemFailures", + } +} + +type FunctionUrlAuthType string + +// Enum values for FunctionUrlAuthType +const ( + FunctionUrlAuthTypeNone FunctionUrlAuthType = "NONE" + FunctionUrlAuthTypeAwsIam FunctionUrlAuthType = "AWS_IAM" +) + +// Values returns all known values for FunctionUrlAuthType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (FunctionUrlAuthType) Values() []FunctionUrlAuthType { + return []FunctionUrlAuthType{ + "NONE", + "AWS_IAM", + } +} + +type FunctionVersion string + +// Enum values for FunctionVersion +const ( + FunctionVersionAll FunctionVersion = "ALL" +) + +// Values returns all known values for FunctionVersion. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (FunctionVersion) Values() []FunctionVersion { + return []FunctionVersion{ + "ALL", + } +} + +type InvocationType string + +// Enum values for InvocationType +const ( + InvocationTypeEvent InvocationType = "Event" + InvocationTypeRequestResponse InvocationType = "RequestResponse" + InvocationTypeDryRun InvocationType = "DryRun" +) + +// Values returns all known values for InvocationType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (InvocationType) Values() []InvocationType { + return []InvocationType{ + "Event", + "RequestResponse", + "DryRun", + } +} + +type InvokeMode string + +// Enum values for InvokeMode +const ( + InvokeModeBuffered InvokeMode = "BUFFERED" + InvokeModeResponseStream InvokeMode = "RESPONSE_STREAM" +) + +// Values returns all known values for InvokeMode. Note that this can be expanded +// in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (InvokeMode) Values() []InvokeMode { + return []InvokeMode{ + "BUFFERED", + "RESPONSE_STREAM", + } +} + +type LastUpdateStatus string + +// Enum values for LastUpdateStatus +const ( + LastUpdateStatusSuccessful LastUpdateStatus = "Successful" + LastUpdateStatusFailed LastUpdateStatus = "Failed" + LastUpdateStatusInProgress LastUpdateStatus = "InProgress" +) + +// Values returns all known values for LastUpdateStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (LastUpdateStatus) Values() []LastUpdateStatus { + return []LastUpdateStatus{ + "Successful", + "Failed", + "InProgress", + } +} + +type LastUpdateStatusReasonCode string + +// Enum values for LastUpdateStatusReasonCode +const ( + LastUpdateStatusReasonCodeEniLimitExceeded LastUpdateStatusReasonCode = "EniLimitExceeded" + LastUpdateStatusReasonCodeInsufficientRolePermissions LastUpdateStatusReasonCode = "InsufficientRolePermissions" + LastUpdateStatusReasonCodeInvalidConfiguration LastUpdateStatusReasonCode = "InvalidConfiguration" + LastUpdateStatusReasonCodeInternalError LastUpdateStatusReasonCode = "InternalError" + LastUpdateStatusReasonCodeSubnetOutOfIPAddresses LastUpdateStatusReasonCode = "SubnetOutOfIPAddresses" + LastUpdateStatusReasonCodeInvalidSubnet LastUpdateStatusReasonCode = "InvalidSubnet" + LastUpdateStatusReasonCodeInvalidSecurityGroup LastUpdateStatusReasonCode = "InvalidSecurityGroup" + LastUpdateStatusReasonCodeImageDeleted LastUpdateStatusReasonCode = "ImageDeleted" + LastUpdateStatusReasonCodeImageAccessDenied LastUpdateStatusReasonCode = "ImageAccessDenied" + LastUpdateStatusReasonCodeInvalidImage LastUpdateStatusReasonCode = "InvalidImage" + LastUpdateStatusReasonCodeKMSKeyAccessDenied LastUpdateStatusReasonCode = "KMSKeyAccessDenied" + LastUpdateStatusReasonCodeKMSKeyNotFound LastUpdateStatusReasonCode = "KMSKeyNotFound" + LastUpdateStatusReasonCodeInvalidStateKMSKey LastUpdateStatusReasonCode = "InvalidStateKMSKey" + LastUpdateStatusReasonCodeDisabledKMSKey LastUpdateStatusReasonCode = "DisabledKMSKey" + LastUpdateStatusReasonCodeEFSIOError LastUpdateStatusReasonCode = "EFSIOError" + LastUpdateStatusReasonCodeEFSMountConnectivityError LastUpdateStatusReasonCode = "EFSMountConnectivityError" + LastUpdateStatusReasonCodeEFSMountFailure LastUpdateStatusReasonCode = "EFSMountFailure" + LastUpdateStatusReasonCodeEFSMountTimeout LastUpdateStatusReasonCode = "EFSMountTimeout" + LastUpdateStatusReasonCodeInvalidRuntime LastUpdateStatusReasonCode = "InvalidRuntime" + LastUpdateStatusReasonCodeInvalidZipFileException LastUpdateStatusReasonCode = "InvalidZipFileException" + LastUpdateStatusReasonCodeFunctionError LastUpdateStatusReasonCode = "FunctionError" +) + +// Values returns all known values for LastUpdateStatusReasonCode. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (LastUpdateStatusReasonCode) Values() []LastUpdateStatusReasonCode { + return []LastUpdateStatusReasonCode{ + "EniLimitExceeded", + "InsufficientRolePermissions", + "InvalidConfiguration", + "InternalError", + "SubnetOutOfIPAddresses", + "InvalidSubnet", + "InvalidSecurityGroup", + "ImageDeleted", + "ImageAccessDenied", + "InvalidImage", + "KMSKeyAccessDenied", + "KMSKeyNotFound", + "InvalidStateKMSKey", + "DisabledKMSKey", + "EFSIOError", + "EFSMountConnectivityError", + "EFSMountFailure", + "EFSMountTimeout", + "InvalidRuntime", + "InvalidZipFileException", + "FunctionError", + } +} + +type LogFormat string + +// Enum values for LogFormat +const ( + LogFormatJson LogFormat = "JSON" + LogFormatText LogFormat = "Text" +) + +// Values returns all known values for LogFormat. Note that this can be expanded +// in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (LogFormat) Values() []LogFormat { + return []LogFormat{ + "JSON", + "Text", + } +} + +type LogType string + +// Enum values for LogType +const ( + LogTypeNone LogType = "None" + LogTypeTail LogType = "Tail" +) + +// Values returns all known values for LogType. Note that this can be expanded in +// the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (LogType) Values() []LogType { + return []LogType{ + "None", + "Tail", + } +} + +type PackageType string + +// Enum values for PackageType +const ( + PackageTypeZip PackageType = "Zip" + PackageTypeImage PackageType = "Image" +) + +// Values returns all known values for PackageType. Note that this can be expanded +// in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (PackageType) Values() []PackageType { + return []PackageType{ + "Zip", + "Image", + } +} + +type ProvisionedConcurrencyStatusEnum string + +// Enum values for ProvisionedConcurrencyStatusEnum +const ( + ProvisionedConcurrencyStatusEnumInProgress ProvisionedConcurrencyStatusEnum = "IN_PROGRESS" + ProvisionedConcurrencyStatusEnumReady ProvisionedConcurrencyStatusEnum = "READY" + ProvisionedConcurrencyStatusEnumFailed ProvisionedConcurrencyStatusEnum = "FAILED" +) + +// Values returns all known values for ProvisionedConcurrencyStatusEnum. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ProvisionedConcurrencyStatusEnum) Values() []ProvisionedConcurrencyStatusEnum { + return []ProvisionedConcurrencyStatusEnum{ + "IN_PROGRESS", + "READY", + "FAILED", + } +} + +type RecursiveLoop string + +// Enum values for RecursiveLoop +const ( + RecursiveLoopAllow RecursiveLoop = "Allow" + RecursiveLoopTerminate RecursiveLoop = "Terminate" +) + +// Values returns all known values for RecursiveLoop. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RecursiveLoop) Values() []RecursiveLoop { + return []RecursiveLoop{ + "Allow", + "Terminate", + } +} + +type ResponseStreamingInvocationType string + +// Enum values for ResponseStreamingInvocationType +const ( + ResponseStreamingInvocationTypeRequestResponse ResponseStreamingInvocationType = "RequestResponse" + ResponseStreamingInvocationTypeDryRun ResponseStreamingInvocationType = "DryRun" +) + +// Values returns all known values for ResponseStreamingInvocationType. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ResponseStreamingInvocationType) Values() []ResponseStreamingInvocationType { + return []ResponseStreamingInvocationType{ + "RequestResponse", + "DryRun", + } +} + +type Runtime string + +// Enum values for Runtime +const ( + RuntimeNodejs Runtime = "nodejs" + RuntimeNodejs43 Runtime = "nodejs4.3" + RuntimeNodejs610 Runtime = "nodejs6.10" + RuntimeNodejs810 Runtime = "nodejs8.10" + RuntimeNodejs10x Runtime = "nodejs10.x" + RuntimeNodejs12x Runtime = "nodejs12.x" + RuntimeNodejs14x Runtime = "nodejs14.x" + RuntimeNodejs16x Runtime = "nodejs16.x" + RuntimeJava8 Runtime = "java8" + RuntimeJava8al2 Runtime = "java8.al2" + RuntimeJava11 Runtime = "java11" + RuntimePython27 Runtime = "python2.7" + RuntimePython36 Runtime = "python3.6" + RuntimePython37 Runtime = "python3.7" + RuntimePython38 Runtime = "python3.8" + RuntimePython39 Runtime = "python3.9" + RuntimeDotnetcore10 Runtime = "dotnetcore1.0" + RuntimeDotnetcore20 Runtime = "dotnetcore2.0" + RuntimeDotnetcore21 Runtime = "dotnetcore2.1" + RuntimeDotnetcore31 Runtime = "dotnetcore3.1" + RuntimeDotnet6 Runtime = "dotnet6" + RuntimeDotnet8 Runtime = "dotnet8" + RuntimeNodejs43edge Runtime = "nodejs4.3-edge" + RuntimeGo1x Runtime = "go1.x" + RuntimeRuby25 Runtime = "ruby2.5" + RuntimeRuby27 Runtime = "ruby2.7" + RuntimeProvided Runtime = "provided" + RuntimeProvidedal2 Runtime = "provided.al2" + RuntimeNodejs18x Runtime = "nodejs18.x" + RuntimePython310 Runtime = "python3.10" + RuntimeJava17 Runtime = "java17" + RuntimeRuby32 Runtime = "ruby3.2" + RuntimeRuby33 Runtime = "ruby3.3" + RuntimeRuby34 Runtime = "ruby3.4" + RuntimePython311 Runtime = "python3.11" + RuntimeNodejs20x Runtime = "nodejs20.x" + RuntimeProvidedal2023 Runtime = "provided.al2023" + RuntimePython312 Runtime = "python3.12" + RuntimeJava21 Runtime = "java21" + RuntimePython313 Runtime = "python3.13" + RuntimeNodejs22x Runtime = "nodejs22.x" +) + +// Values returns all known values for Runtime. Note that this can be expanded in +// the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (Runtime) Values() []Runtime { + return []Runtime{ + "nodejs", + "nodejs4.3", + "nodejs6.10", + "nodejs8.10", + "nodejs10.x", + "nodejs12.x", + "nodejs14.x", + "nodejs16.x", + "java8", + "java8.al2", + "java11", + "python2.7", + "python3.6", + "python3.7", + "python3.8", + "python3.9", + "dotnetcore1.0", + "dotnetcore2.0", + "dotnetcore2.1", + "dotnetcore3.1", + "dotnet6", + "dotnet8", + "nodejs4.3-edge", + "go1.x", + "ruby2.5", + "ruby2.7", + "provided", + "provided.al2", + "nodejs18.x", + "python3.10", + "java17", + "ruby3.2", + "ruby3.3", + "ruby3.4", + "python3.11", + "nodejs20.x", + "provided.al2023", + "python3.12", + "java21", + "python3.13", + "nodejs22.x", + } +} + +type SnapStartApplyOn string + +// Enum values for SnapStartApplyOn +const ( + SnapStartApplyOnPublishedVersions SnapStartApplyOn = "PublishedVersions" + SnapStartApplyOnNone SnapStartApplyOn = "None" +) + +// Values returns all known values for SnapStartApplyOn. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (SnapStartApplyOn) Values() []SnapStartApplyOn { + return []SnapStartApplyOn{ + "PublishedVersions", + "None", + } +} + +type SnapStartOptimizationStatus string + +// Enum values for SnapStartOptimizationStatus +const ( + SnapStartOptimizationStatusOn SnapStartOptimizationStatus = "On" + SnapStartOptimizationStatusOff SnapStartOptimizationStatus = "Off" +) + +// Values returns all known values for SnapStartOptimizationStatus. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (SnapStartOptimizationStatus) Values() []SnapStartOptimizationStatus { + return []SnapStartOptimizationStatus{ + "On", + "Off", + } +} + +type SourceAccessType string + +// Enum values for SourceAccessType +const ( + SourceAccessTypeBasicAuth SourceAccessType = "BASIC_AUTH" + SourceAccessTypeVpcSubnet SourceAccessType = "VPC_SUBNET" + SourceAccessTypeVpcSecurityGroup SourceAccessType = "VPC_SECURITY_GROUP" + SourceAccessTypeSaslScram512Auth SourceAccessType = "SASL_SCRAM_512_AUTH" + SourceAccessTypeSaslScram256Auth SourceAccessType = "SASL_SCRAM_256_AUTH" + SourceAccessTypeVirtualHost SourceAccessType = "VIRTUAL_HOST" + SourceAccessTypeClientCertificateTlsAuth SourceAccessType = "CLIENT_CERTIFICATE_TLS_AUTH" + SourceAccessTypeServerRootCaCertificate SourceAccessType = "SERVER_ROOT_CA_CERTIFICATE" +) + +// Values returns all known values for SourceAccessType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (SourceAccessType) Values() []SourceAccessType { + return []SourceAccessType{ + "BASIC_AUTH", + "VPC_SUBNET", + "VPC_SECURITY_GROUP", + "SASL_SCRAM_512_AUTH", + "SASL_SCRAM_256_AUTH", + "VIRTUAL_HOST", + "CLIENT_CERTIFICATE_TLS_AUTH", + "SERVER_ROOT_CA_CERTIFICATE", + } +} + +type State string + +// Enum values for State +const ( + StatePending State = "Pending" + StateActive State = "Active" + StateInactive State = "Inactive" + StateFailed State = "Failed" +) + +// 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{ + "Pending", + "Active", + "Inactive", + "Failed", + } +} + +type StateReasonCode string + +// Enum values for StateReasonCode +const ( + StateReasonCodeIdle StateReasonCode = "Idle" + StateReasonCodeCreating StateReasonCode = "Creating" + StateReasonCodeRestoring StateReasonCode = "Restoring" + StateReasonCodeEniLimitExceeded StateReasonCode = "EniLimitExceeded" + StateReasonCodeInsufficientRolePermissions StateReasonCode = "InsufficientRolePermissions" + StateReasonCodeInvalidConfiguration StateReasonCode = "InvalidConfiguration" + StateReasonCodeInternalError StateReasonCode = "InternalError" + StateReasonCodeSubnetOutOfIPAddresses StateReasonCode = "SubnetOutOfIPAddresses" + StateReasonCodeInvalidSubnet StateReasonCode = "InvalidSubnet" + StateReasonCodeInvalidSecurityGroup StateReasonCode = "InvalidSecurityGroup" + StateReasonCodeImageDeleted StateReasonCode = "ImageDeleted" + StateReasonCodeImageAccessDenied StateReasonCode = "ImageAccessDenied" + StateReasonCodeInvalidImage StateReasonCode = "InvalidImage" + StateReasonCodeKMSKeyAccessDenied StateReasonCode = "KMSKeyAccessDenied" + StateReasonCodeKMSKeyNotFound StateReasonCode = "KMSKeyNotFound" + StateReasonCodeInvalidStateKMSKey StateReasonCode = "InvalidStateKMSKey" + StateReasonCodeDisabledKMSKey StateReasonCode = "DisabledKMSKey" + StateReasonCodeEFSIOError StateReasonCode = "EFSIOError" + StateReasonCodeEFSMountConnectivityError StateReasonCode = "EFSMountConnectivityError" + StateReasonCodeEFSMountFailure StateReasonCode = "EFSMountFailure" + StateReasonCodeEFSMountTimeout StateReasonCode = "EFSMountTimeout" + StateReasonCodeInvalidRuntime StateReasonCode = "InvalidRuntime" + StateReasonCodeInvalidZipFileException StateReasonCode = "InvalidZipFileException" + StateReasonCodeFunctionError StateReasonCode = "FunctionError" +) + +// Values returns all known values for StateReasonCode. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (StateReasonCode) Values() []StateReasonCode { + return []StateReasonCode{ + "Idle", + "Creating", + "Restoring", + "EniLimitExceeded", + "InsufficientRolePermissions", + "InvalidConfiguration", + "InternalError", + "SubnetOutOfIPAddresses", + "InvalidSubnet", + "InvalidSecurityGroup", + "ImageDeleted", + "ImageAccessDenied", + "InvalidImage", + "KMSKeyAccessDenied", + "KMSKeyNotFound", + "InvalidStateKMSKey", + "DisabledKMSKey", + "EFSIOError", + "EFSMountConnectivityError", + "EFSMountFailure", + "EFSMountTimeout", + "InvalidRuntime", + "InvalidZipFileException", + "FunctionError", + } +} + +type SystemLogLevel string + +// Enum values for SystemLogLevel +const ( + SystemLogLevelDebug SystemLogLevel = "DEBUG" + SystemLogLevelInfo SystemLogLevel = "INFO" + SystemLogLevelWarn SystemLogLevel = "WARN" +) + +// Values returns all known values for SystemLogLevel. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (SystemLogLevel) Values() []SystemLogLevel { + return []SystemLogLevel{ + "DEBUG", + "INFO", + "WARN", + } +} + +type ThrottleReason string + +// Enum values for ThrottleReason +const ( + ThrottleReasonConcurrentInvocationLimitExceeded ThrottleReason = "ConcurrentInvocationLimitExceeded" + ThrottleReasonFunctionInvocationRateLimitExceeded ThrottleReason = "FunctionInvocationRateLimitExceeded" + ThrottleReasonReservedFunctionConcurrentInvocationLimitExceeded ThrottleReason = "ReservedFunctionConcurrentInvocationLimitExceeded" + ThrottleReasonReservedFunctionInvocationRateLimitExceeded ThrottleReason = "ReservedFunctionInvocationRateLimitExceeded" + ThrottleReasonCallerRateLimitExceeded ThrottleReason = "CallerRateLimitExceeded" + ThrottleReasonConcurrentSnapshotCreateLimitExceeded ThrottleReason = "ConcurrentSnapshotCreateLimitExceeded" +) + +// Values returns all known values for ThrottleReason. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ThrottleReason) Values() []ThrottleReason { + return []ThrottleReason{ + "ConcurrentInvocationLimitExceeded", + "FunctionInvocationRateLimitExceeded", + "ReservedFunctionConcurrentInvocationLimitExceeded", + "ReservedFunctionInvocationRateLimitExceeded", + "CallerRateLimitExceeded", + "ConcurrentSnapshotCreateLimitExceeded", + } +} + +type TracingMode string + +// Enum values for TracingMode +const ( + TracingModeActive TracingMode = "Active" + TracingModePassThrough TracingMode = "PassThrough" +) + +// Values returns all known values for TracingMode. Note that this can be expanded +// in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (TracingMode) Values() []TracingMode { + return []TracingMode{ + "Active", + "PassThrough", + } +} + +type UpdateRuntimeOn string + +// Enum values for UpdateRuntimeOn +const ( + UpdateRuntimeOnAuto UpdateRuntimeOn = "Auto" + UpdateRuntimeOnManual UpdateRuntimeOn = "Manual" + UpdateRuntimeOnFunctionUpdate UpdateRuntimeOn = "FunctionUpdate" +) + +// Values returns all known values for UpdateRuntimeOn. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (UpdateRuntimeOn) Values() []UpdateRuntimeOn { + return []UpdateRuntimeOn{ + "Auto", + "Manual", + "FunctionUpdate", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/types/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/types/errors.go new file mode 100644 index 00000000..8f69b8c2 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/types/errors.go @@ -0,0 +1,1128 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + "fmt" + smithy "github.com/aws/smithy-go" +) + +// The specified code signing configuration does not exist. +type CodeSigningConfigNotFoundException struct { + Message *string + + ErrorCodeOverride *string + + Type *string + + noSmithyDocumentSerde +} + +func (e *CodeSigningConfigNotFoundException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *CodeSigningConfigNotFoundException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *CodeSigningConfigNotFoundException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "CodeSigningConfigNotFoundException" + } + return *e.ErrorCodeOverride +} +func (e *CodeSigningConfigNotFoundException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// Your Amazon Web Services account has exceeded its maximum total code size. For +// more information, see [Lambda quotas]. +// +// [Lambda quotas]: https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html +type CodeStorageExceededException struct { + Message *string + + ErrorCodeOverride *string + + Type *string + + noSmithyDocumentSerde +} + +func (e *CodeStorageExceededException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *CodeStorageExceededException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *CodeStorageExceededException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "CodeStorageExceededException" + } + return *e.ErrorCodeOverride +} +func (e *CodeStorageExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The code signature failed one or more of the validation checks for signature +// mismatch or expiry, and the code signing policy is set to ENFORCE. Lambda blocks +// the deployment. +type CodeVerificationFailedException struct { + Message *string + + ErrorCodeOverride *string + + Type *string + + noSmithyDocumentSerde +} + +func (e *CodeVerificationFailedException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *CodeVerificationFailedException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *CodeVerificationFailedException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "CodeVerificationFailedException" + } + return *e.ErrorCodeOverride +} +func (e *CodeVerificationFailedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Need additional permissions to configure VPC settings. +type EC2AccessDeniedException struct { + Message *string + + ErrorCodeOverride *string + + Type *string + + noSmithyDocumentSerde +} + +func (e *EC2AccessDeniedException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *EC2AccessDeniedException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *EC2AccessDeniedException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "EC2AccessDeniedException" + } + return *e.ErrorCodeOverride +} +func (e *EC2AccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } + +// Amazon EC2 throttled Lambda during Lambda function initialization using the +// execution role provided for the function. +type EC2ThrottledException struct { + Message *string + + ErrorCodeOverride *string + + Type *string + + noSmithyDocumentSerde +} + +func (e *EC2ThrottledException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *EC2ThrottledException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *EC2ThrottledException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "EC2ThrottledException" + } + return *e.ErrorCodeOverride +} +func (e *EC2ThrottledException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } + +// Lambda received an unexpected Amazon EC2 client exception while setting up for +// the Lambda function. +type EC2UnexpectedException struct { + Message *string + + ErrorCodeOverride *string + + Type *string + EC2ErrorCode *string + + noSmithyDocumentSerde +} + +func (e *EC2UnexpectedException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *EC2UnexpectedException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *EC2UnexpectedException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "EC2UnexpectedException" + } + return *e.ErrorCodeOverride +} +func (e *EC2UnexpectedException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } + +// An error occurred when reading from or writing to a connected file system. +type EFSIOException struct { + Message *string + + ErrorCodeOverride *string + + Type *string + + noSmithyDocumentSerde +} + +func (e *EFSIOException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *EFSIOException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *EFSIOException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "EFSIOException" + } + return *e.ErrorCodeOverride +} +func (e *EFSIOException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The Lambda function couldn't make a network connection to the configured file +// system. +type EFSMountConnectivityException struct { + Message *string + + ErrorCodeOverride *string + + Type *string + + noSmithyDocumentSerde +} + +func (e *EFSMountConnectivityException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *EFSMountConnectivityException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *EFSMountConnectivityException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "EFSMountConnectivityException" + } + return *e.ErrorCodeOverride +} +func (e *EFSMountConnectivityException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The Lambda function couldn't mount the configured file system due to a +// permission or configuration issue. +type EFSMountFailureException struct { + Message *string + + ErrorCodeOverride *string + + Type *string + + noSmithyDocumentSerde +} + +func (e *EFSMountFailureException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *EFSMountFailureException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *EFSMountFailureException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "EFSMountFailureException" + } + return *e.ErrorCodeOverride +} +func (e *EFSMountFailureException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The Lambda function made a network connection to the configured file system, +// but the mount operation timed out. +type EFSMountTimeoutException struct { + Message *string + + ErrorCodeOverride *string + + Type *string + + noSmithyDocumentSerde +} + +func (e *EFSMountTimeoutException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *EFSMountTimeoutException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *EFSMountTimeoutException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "EFSMountTimeoutException" + } + return *e.ErrorCodeOverride +} +func (e *EFSMountTimeoutException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Lambda couldn't create an elastic network interface in the VPC, specified as +// part of Lambda function configuration, because the limit for network interfaces +// has been reached. For more information, see [Lambda quotas]. +// +// [Lambda quotas]: https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html +type ENILimitReachedException struct { + Message *string + + ErrorCodeOverride *string + + Type *string + + noSmithyDocumentSerde +} + +func (e *ENILimitReachedException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ENILimitReachedException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ENILimitReachedException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ENILimitReachedException" + } + return *e.ErrorCodeOverride +} +func (e *ENILimitReachedException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } + +// The code signature failed the integrity check. If the integrity check fails, +// then Lambda blocks deployment, even if the code signing policy is set to WARN. +type InvalidCodeSignatureException struct { + Message *string + + ErrorCodeOverride *string + + Type *string + + noSmithyDocumentSerde +} + +func (e *InvalidCodeSignatureException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidCodeSignatureException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidCodeSignatureException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidCodeSignatureException" + } + return *e.ErrorCodeOverride +} +func (e *InvalidCodeSignatureException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// One of the parameters in the request is not valid. +type InvalidParameterValueException struct { + Message *string + + ErrorCodeOverride *string + + Type *string + + noSmithyDocumentSerde +} + +func (e *InvalidParameterValueException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidParameterValueException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidParameterValueException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidParameterValueException" + } + return *e.ErrorCodeOverride +} +func (e *InvalidParameterValueException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The request body could not be parsed as JSON, or a request header is invalid. +// For example, the 'x-amzn-RequestId' header is not a valid UUID string. +type InvalidRequestContentException struct { + Message *string + + ErrorCodeOverride *string + + Type *string + + noSmithyDocumentSerde +} + +func (e *InvalidRequestContentException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidRequestContentException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidRequestContentException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidRequestContentException" + } + return *e.ErrorCodeOverride +} +func (e *InvalidRequestContentException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The runtime or runtime version specified is not supported. +type InvalidRuntimeException struct { + Message *string + + ErrorCodeOverride *string + + Type *string + + noSmithyDocumentSerde +} + +func (e *InvalidRuntimeException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidRuntimeException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidRuntimeException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidRuntimeException" + } + return *e.ErrorCodeOverride +} +func (e *InvalidRuntimeException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } + +// The security group ID provided in the Lambda function VPC configuration is not +// valid. +type InvalidSecurityGroupIDException struct { + Message *string + + ErrorCodeOverride *string + + Type *string + + noSmithyDocumentSerde +} + +func (e *InvalidSecurityGroupIDException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidSecurityGroupIDException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidSecurityGroupIDException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidSecurityGroupIDException" + } + return *e.ErrorCodeOverride +} +func (e *InvalidSecurityGroupIDException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } + +// The subnet ID provided in the Lambda function VPC configuration is not valid. +type InvalidSubnetIDException struct { + Message *string + + ErrorCodeOverride *string + + Type *string + + noSmithyDocumentSerde +} + +func (e *InvalidSubnetIDException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidSubnetIDException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidSubnetIDException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidSubnetIDException" + } + return *e.ErrorCodeOverride +} +func (e *InvalidSubnetIDException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } + +// Lambda could not unzip the deployment package. +type InvalidZipFileException struct { + Message *string + + ErrorCodeOverride *string + + Type *string + + noSmithyDocumentSerde +} + +func (e *InvalidZipFileException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidZipFileException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidZipFileException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidZipFileException" + } + return *e.ErrorCodeOverride +} +func (e *InvalidZipFileException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } + +// Lambda couldn't decrypt the environment variables because KMS access was +// denied. Check the Lambda function's KMS permissions. +type KMSAccessDeniedException struct { + Message *string + + ErrorCodeOverride *string + + Type *string + + noSmithyDocumentSerde +} + +func (e *KMSAccessDeniedException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *KMSAccessDeniedException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *KMSAccessDeniedException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "KMSAccessDeniedException" + } + return *e.ErrorCodeOverride +} +func (e *KMSAccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } + +// Lambda couldn't decrypt the environment variables because the KMS key used is +// disabled. Check the Lambda function's KMS key settings. +type KMSDisabledException struct { + Message *string + + ErrorCodeOverride *string + + Type *string + + noSmithyDocumentSerde +} + +func (e *KMSDisabledException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *KMSDisabledException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *KMSDisabledException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "KMSDisabledException" + } + return *e.ErrorCodeOverride +} +func (e *KMSDisabledException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } + +// Lambda couldn't decrypt the environment variables because the state of the KMS +// key used is not valid for Decrypt. Check the function's KMS key settings. +type KMSInvalidStateException struct { + Message *string + + ErrorCodeOverride *string + + Type *string + + noSmithyDocumentSerde +} + +func (e *KMSInvalidStateException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *KMSInvalidStateException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *KMSInvalidStateException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "KMSInvalidStateException" + } + return *e.ErrorCodeOverride +} +func (e *KMSInvalidStateException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } + +// Lambda couldn't decrypt the environment variables because the KMS key was not +// found. Check the function's KMS key settings. +type KMSNotFoundException struct { + Message *string + + ErrorCodeOverride *string + + Type *string + + noSmithyDocumentSerde +} + +func (e *KMSNotFoundException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *KMSNotFoundException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *KMSNotFoundException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "KMSNotFoundException" + } + return *e.ErrorCodeOverride +} +func (e *KMSNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } + +// The permissions policy for the resource is too large. For more information, see [Lambda quotas] +// . +// +// [Lambda quotas]: https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html +type PolicyLengthExceededException struct { + Message *string + + ErrorCodeOverride *string + + Type *string + + noSmithyDocumentSerde +} + +func (e *PolicyLengthExceededException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *PolicyLengthExceededException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *PolicyLengthExceededException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "PolicyLengthExceededException" + } + return *e.ErrorCodeOverride +} +func (e *PolicyLengthExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The RevisionId provided does not match the latest RevisionId for the Lambda +// function or alias. +// +// - For AddPermission and RemovePermission API operations: Call GetPolicy to +// retrieve the latest RevisionId for your resource. +// +// - For all other API operations: Call GetFunction or GetAlias to retrieve the +// latest RevisionId for your resource. +type PreconditionFailedException struct { + Message *string + + ErrorCodeOverride *string + + Type *string + + noSmithyDocumentSerde +} + +func (e *PreconditionFailedException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *PreconditionFailedException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *PreconditionFailedException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "PreconditionFailedException" + } + return *e.ErrorCodeOverride +} +func (e *PreconditionFailedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The specified configuration does not exist. +type ProvisionedConcurrencyConfigNotFoundException struct { + Message *string + + ErrorCodeOverride *string + + Type *string + + noSmithyDocumentSerde +} + +func (e *ProvisionedConcurrencyConfigNotFoundException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ProvisionedConcurrencyConfigNotFoundException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ProvisionedConcurrencyConfigNotFoundException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ProvisionedConcurrencyConfigNotFoundException" + } + return *e.ErrorCodeOverride +} +func (e *ProvisionedConcurrencyConfigNotFoundException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + +// Lambda has detected your function being invoked in a recursive loop with other +// Amazon Web Services resources and stopped your function's invocation. +type RecursiveInvocationException struct { + Message *string + + ErrorCodeOverride *string + + Type *string + + noSmithyDocumentSerde +} + +func (e *RecursiveInvocationException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *RecursiveInvocationException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *RecursiveInvocationException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "RecursiveInvocationException" + } + return *e.ErrorCodeOverride +} +func (e *RecursiveInvocationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The request payload exceeded the Invoke request body JSON input quota. For more +// information, see [Lambda quotas]. +// +// [Lambda quotas]: https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html +type RequestTooLargeException struct { + Message *string + + ErrorCodeOverride *string + + Type *string + + noSmithyDocumentSerde +} + +func (e *RequestTooLargeException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *RequestTooLargeException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *RequestTooLargeException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "RequestTooLargeException" + } + return *e.ErrorCodeOverride +} +func (e *RequestTooLargeException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The resource already exists, or another operation is in progress. +type ResourceConflictException struct { + Message *string + + ErrorCodeOverride *string + + Type *string + + noSmithyDocumentSerde +} + +func (e *ResourceConflictException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ResourceConflictException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ResourceConflictException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ResourceConflictException" + } + return *e.ErrorCodeOverride +} +func (e *ResourceConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The operation conflicts with the resource's availability. For example, you +// tried to update an event source mapping in the CREATING state, or you tried to +// delete an event source mapping currently UPDATING. +type ResourceInUseException struct { + Message *string + + ErrorCodeOverride *string + + Type *string + + noSmithyDocumentSerde +} + +func (e *ResourceInUseException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ResourceInUseException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ResourceInUseException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ResourceInUseException" + } + return *e.ErrorCodeOverride +} +func (e *ResourceInUseException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The resource specified in the request does not exist. +type ResourceNotFoundException struct { + Message *string + + ErrorCodeOverride *string + + Type *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 } + +// The function is inactive and its VPC connection is no longer available. Wait +// for the VPC connection to reestablish and try again. +type ResourceNotReadyException struct { + Message *string + + ErrorCodeOverride *string + + Type *string + + noSmithyDocumentSerde +} + +func (e *ResourceNotReadyException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ResourceNotReadyException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ResourceNotReadyException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ResourceNotReadyException" + } + return *e.ErrorCodeOverride +} +func (e *ResourceNotReadyException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } + +// The Lambda service encountered an internal error. +type ServiceException struct { + Message *string + + ErrorCodeOverride *string + + Type *string + + noSmithyDocumentSerde +} + +func (e *ServiceException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ServiceException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ServiceException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ServiceException" + } + return *e.ErrorCodeOverride +} +func (e *ServiceException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } + +// The afterRestore()[runtime hook] encountered an error. For more information, check the Amazon +// CloudWatch logs. +// +// [runtime hook]: https://docs.aws.amazon.com/lambda/latest/dg/snapstart-runtime-hooks.html +type SnapStartException struct { + Message *string + + ErrorCodeOverride *string + + Type *string + + noSmithyDocumentSerde +} + +func (e *SnapStartException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *SnapStartException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *SnapStartException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "SnapStartException" + } + return *e.ErrorCodeOverride +} +func (e *SnapStartException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Lambda is initializing your function. You can invoke the function when the [function state] +// becomes Active . +// +// [function state]: https://docs.aws.amazon.com/lambda/latest/dg/functions-states.html +type SnapStartNotReadyException struct { + Message *string + + ErrorCodeOverride *string + + Type *string + + noSmithyDocumentSerde +} + +func (e *SnapStartNotReadyException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *SnapStartNotReadyException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *SnapStartNotReadyException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "SnapStartNotReadyException" + } + return *e.ErrorCodeOverride +} +func (e *SnapStartNotReadyException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Lambda couldn't restore the snapshot within the timeout limit. +type SnapStartTimeoutException struct { + Message *string + + ErrorCodeOverride *string + + Type *string + + noSmithyDocumentSerde +} + +func (e *SnapStartTimeoutException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *SnapStartTimeoutException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *SnapStartTimeoutException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "SnapStartTimeoutException" + } + return *e.ErrorCodeOverride +} +func (e *SnapStartTimeoutException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Lambda couldn't set up VPC access for the Lambda function because one or more +// configured subnets has no available IP addresses. +type SubnetIPAddressLimitReachedException struct { + Message *string + + ErrorCodeOverride *string + + Type *string + + noSmithyDocumentSerde +} + +func (e *SubnetIPAddressLimitReachedException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *SubnetIPAddressLimitReachedException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *SubnetIPAddressLimitReachedException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "SubnetIPAddressLimitReachedException" + } + return *e.ErrorCodeOverride +} +func (e *SubnetIPAddressLimitReachedException) ErrorFault() smithy.ErrorFault { + return smithy.FaultServer +} + +// The request throughput limit was exceeded. For more information, see [Lambda quotas]. +// +// [Lambda quotas]: https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html#api-requests +type TooManyRequestsException struct { + Message *string + + ErrorCodeOverride *string + + RetryAfterSeconds *string + Type *string + Reason ThrottleReason + + noSmithyDocumentSerde +} + +func (e *TooManyRequestsException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyRequestsException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyRequestsException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyRequestsException" + } + return *e.ErrorCodeOverride +} +func (e *TooManyRequestsException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The content type of the Invoke request body is not JSON. +type UnsupportedMediaTypeException struct { + Message *string + + ErrorCodeOverride *string + + Type *string + + noSmithyDocumentSerde +} + +func (e *UnsupportedMediaTypeException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *UnsupportedMediaTypeException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *UnsupportedMediaTypeException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "UnsupportedMediaTypeException" + } + return *e.ErrorCodeOverride +} +func (e *UnsupportedMediaTypeException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/types/types.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/types/types.go new file mode 100644 index 00000000..155b1aeb --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/types/types.go @@ -0,0 +1,1439 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + smithydocument "github.com/aws/smithy-go/document" + "time" +) + +// Limits that are related to concurrency and storage. All file and storage sizes +// are in bytes. +type AccountLimit struct { + + // The maximum size of a function's deployment package and layers when they're + // extracted. + CodeSizeUnzipped int64 + + // The maximum size of a deployment package when it's uploaded directly to Lambda. + // Use Amazon S3 for larger files. + CodeSizeZipped int64 + + // The maximum number of simultaneous function executions. + ConcurrentExecutions int32 + + // The amount of storage space that you can use for all deployment packages and + // layer archives. + TotalCodeSize int64 + + // The maximum number of simultaneous function executions, minus the capacity + // that's reserved for individual functions with PutFunctionConcurrency. + UnreservedConcurrentExecutions *int32 + + noSmithyDocumentSerde +} + +// The number of functions and amount of storage in use. +type AccountUsage struct { + + // The number of Lambda functions. + FunctionCount int64 + + // The amount of storage space, in bytes, that's being used by deployment packages + // and layer archives. + TotalCodeSize int64 + + noSmithyDocumentSerde +} + +// Provides configuration information about a Lambda function [alias]. +// +// [alias]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html +type AliasConfiguration struct { + + // The Amazon Resource Name (ARN) of the alias. + AliasArn *string + + // A description of the alias. + Description *string + + // The function version that the alias invokes. + FunctionVersion *string + + // The name of the alias. + Name *string + + // A unique identifier that changes when you update the alias. + RevisionId *string + + // The [routing configuration] of the alias. + // + // [routing configuration]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html + RoutingConfig *AliasRoutingConfiguration + + noSmithyDocumentSerde +} + +// The [traffic-shifting] configuration of a Lambda function alias. +// +// [traffic-shifting]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html +type AliasRoutingConfiguration struct { + + // The second version, and the percentage of traffic that's routed to it. + AdditionalVersionWeights map[string]float64 + + noSmithyDocumentSerde +} + +// List of signing profiles that can sign a code package. +type AllowedPublishers struct { + + // The Amazon Resource Name (ARN) for each of the signing profiles. A signing + // profile defines a trusted user who can sign a code package. + // + // This member is required. + SigningProfileVersionArns []string + + noSmithyDocumentSerde +} + +// Specific configuration settings for an Amazon Managed Streaming for Apache +// Kafka (Amazon MSK) event source. +type AmazonManagedKafkaEventSourceConfig struct { + + // The identifier for the Kafka consumer group to join. The consumer group ID must + // be unique among all your Kafka event sources. After creating a Kafka event + // source mapping with the consumer group ID specified, you cannot update this + // value. For more information, see [Customizable consumer group ID]. + // + // [Customizable consumer group ID]: https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#services-msk-consumer-group-id + ConsumerGroupId *string + + noSmithyDocumentSerde +} + +// Details about a [Code signing configuration]. +// +// [Code signing configuration]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-codesigning.html +type CodeSigningConfig struct { + + // List of allowed publishers. + // + // This member is required. + AllowedPublishers *AllowedPublishers + + // The Amazon Resource Name (ARN) of the Code signing configuration. + // + // This member is required. + CodeSigningConfigArn *string + + // Unique identifer for the Code signing configuration. + // + // This member is required. + CodeSigningConfigId *string + + // The code signing policy controls the validation failure action for signature + // mismatch or expiry. + // + // This member is required. + CodeSigningPolicies *CodeSigningPolicies + + // The date and time that the Code signing configuration was last modified, in + // ISO-8601 format (YYYY-MM-DDThh:mm:ss.sTZD). + // + // This member is required. + LastModified *string + + // Code signing configuration description. + Description *string + + noSmithyDocumentSerde +} + +// Code signing configuration [policies] specify the validation failure action for signature +// mismatch or expiry. +// +// [policies]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-codesigning.html#config-codesigning-policies +type CodeSigningPolicies struct { + + // Code signing configuration policy for deployment validation failure. If you set + // the policy to Enforce , Lambda blocks the deployment request if signature + // validation checks fail. If you set the policy to Warn , Lambda allows the + // deployment and creates a CloudWatch log. + // + // Default value: Warn + UntrustedArtifactOnDeployment CodeSigningPolicy + + noSmithyDocumentSerde +} + +type Concurrency struct { + + // The number of concurrent executions that are reserved for this function. For + // more information, see [Managing Lambda reserved concurrency]. + // + // [Managing Lambda reserved concurrency]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-concurrency.html + ReservedConcurrentExecutions *int32 + + noSmithyDocumentSerde +} + +// The [cross-origin resource sharing (CORS)] settings for your Lambda function URL. Use CORS to grant access to your +// function URL from any origin. You can also use CORS to control access for +// specific HTTP headers and methods in requests to your function URL. +// +// [cross-origin resource sharing (CORS)]: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS +type Cors struct { + + // Whether to allow cookies or other credentials in requests to your function URL. + // The default is false . + AllowCredentials *bool + + // The HTTP headers that origins can include in requests to your function URL. For + // example: Date , Keep-Alive , X-Custom-Header . + AllowHeaders []string + + // The HTTP methods that are allowed when calling your function URL. For example: + // GET , POST , DELETE , or the wildcard character ( * ). + AllowMethods []string + + // The origins that can access your function URL. You can list any number of + // specific origins, separated by a comma. For example: https://www.example.com , + // http://localhost:60905 . + // + // Alternatively, you can grant access to all origins using the wildcard character + // ( * ). + AllowOrigins []string + + // The HTTP headers in your function response that you want to expose to origins + // that call your function URL. For example: Date , Keep-Alive , X-Custom-Header . + ExposeHeaders []string + + // The maximum amount of time, in seconds, that web browsers can cache results of + // a preflight request. By default, this is set to 0 , which means that the browser + // doesn't cache results. + MaxAge *int32 + + noSmithyDocumentSerde +} + +// The [dead-letter queue] for failed asynchronous invocations. +// +// [dead-letter queue]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#dlq +type DeadLetterConfig struct { + + // The Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic. + TargetArn *string + + noSmithyDocumentSerde +} + +// A configuration object that specifies the destination of an event after Lambda +// processes it. +type DestinationConfig struct { + + // The destination configuration for failed invocations. + OnFailure *OnFailure + + // The destination configuration for successful invocations. + OnSuccess *OnSuccess + + noSmithyDocumentSerde +} + +// Specific configuration settings for a DocumentDB event source. +type DocumentDBEventSourceConfig struct { + + // The name of the collection to consume within the database. If you do not + // specify a collection, Lambda consumes all collections. + CollectionName *string + + // The name of the database to consume within the DocumentDB cluster. + DatabaseName *string + + // Determines what DocumentDB sends to your event stream during document update + // operations. If set to UpdateLookup, DocumentDB sends a delta describing the + // changes, along with a copy of the entire document. Otherwise, DocumentDB sends + // only a partial document that contains the changes. + FullDocument FullDocument + + noSmithyDocumentSerde +} + +// A function's environment variable settings. You can use environment variables +// to adjust your function's behavior without updating code. An environment +// variable is a pair of strings that are stored in a function's version-specific +// configuration. +type Environment struct { + + // Environment variable key-value pairs. For more information, see [Using Lambda environment variables]. + // + // [Using Lambda environment variables]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html + Variables map[string]string + + noSmithyDocumentSerde +} + +// Error messages for environment variables that couldn't be applied. +type EnvironmentError struct { + + // The error code. + ErrorCode *string + + // The error message. + Message *string + + noSmithyDocumentSerde +} + +// The results of an operation to update or read environment variables. If the +// operation succeeds, the response contains the environment variables. If it +// fails, the response contains details about the error. +type EnvironmentResponse struct { + + // Error messages for environment variables that couldn't be applied. + Error *EnvironmentError + + // Environment variable key-value pairs. Omitted from CloudTrail logs. + Variables map[string]string + + noSmithyDocumentSerde +} + +// The size of the function's /tmp directory in MB. The default value is 512, but +// can be any whole number between 512 and 10,240 MB. For more information, see [Configuring ephemeral storage (console)]. +// +// [Configuring ephemeral storage (console)]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-ephemeral-storage +type EphemeralStorage struct { + + // The size of the function's /tmp directory. + // + // This member is required. + Size *int32 + + noSmithyDocumentSerde +} + +// A mapping between an Amazon Web Services resource and a Lambda function. For +// details, see CreateEventSourceMapping. +type EventSourceMappingConfiguration struct { + + // Specific configuration settings for an Amazon Managed Streaming for Apache + // Kafka (Amazon MSK) event source. + AmazonManagedKafkaEventSourceConfig *AmazonManagedKafkaEventSourceConfig + + // The maximum number of records in each batch that Lambda pulls from your stream + // or queue and sends to your function. Lambda passes all of the records in the + // batch to the function in a single call, up to the payload limit for synchronous + // invocation (6 MB). + // + // Default value: Varies by service. For Amazon SQS, the default is 10. For all + // other services, the default is 100. + // + // Related setting: When you set BatchSize to a value greater than 10, you must + // set MaximumBatchingWindowInSeconds to at least 1. + BatchSize *int32 + + // (Kinesis and DynamoDB Streams only) If the function returns an error, split the + // batch in two and retry. The default value is false. + BisectBatchOnFunctionError *bool + + // (Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka event + // sources only) A configuration object that specifies the destination of an event + // after Lambda processes it. + DestinationConfig *DestinationConfig + + // Specific configuration settings for a DocumentDB event source. + DocumentDBEventSourceConfig *DocumentDBEventSourceConfig + + // The Amazon Resource Name (ARN) of the event source. + EventSourceArn *string + + // The Amazon Resource Name (ARN) of the event source mapping. + EventSourceMappingArn *string + + // An object that defines the filter criteria that determine whether Lambda should + // process an event. For more information, see [Lambda event filtering]. + // + // If filter criteria is encrypted, this field shows up as null in the response of + // ListEventSourceMapping API calls. You can view this field in plaintext in the + // response of GetEventSourceMapping and DeleteEventSourceMapping calls if you have + // kms:Decrypt permissions for the correct KMS key. + // + // [Lambda event filtering]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html + FilterCriteria *FilterCriteria + + // An object that contains details about an error related to filter criteria + // encryption. + FilterCriteriaError *FilterCriteriaError + + // The ARN of the Lambda function. + FunctionArn *string + + // (Kinesis, DynamoDB Streams, and Amazon SQS) A list of current response type + // enums applied to the event source mapping. + FunctionResponseTypes []FunctionResponseType + + // The ARN of the Key Management Service (KMS) customer managed key that Lambda + // uses to encrypt your function's [filter criteria]. + // + // [filter criteria]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html#filtering-basics + KMSKeyArn *string + + // The date that the event source mapping was last updated or that its state + // changed. + LastModified *time.Time + + // The result of the last Lambda invocation of your function. + LastProcessingResult *string + + // The maximum amount of time, in seconds, that Lambda spends gathering records + // before invoking the function. You can configure MaximumBatchingWindowInSeconds + // to any value from 0 seconds to 300 seconds in increments of seconds. + // + // For streams and Amazon SQS event sources, the default batching window is 0 + // seconds. For Amazon MSK, Self-managed Apache Kafka, Amazon MQ, and DocumentDB + // event sources, the default batching window is 500 ms. Note that because you can + // only change MaximumBatchingWindowInSeconds in increments of seconds, you cannot + // revert back to the 500 ms default batching window after you have changed it. To + // restore the default batching window, you must create a new event source mapping. + // + // Related setting: For streams and Amazon SQS event sources, when you set + // BatchSize to a value greater than 10, you must set + // MaximumBatchingWindowInSeconds to at least 1. + MaximumBatchingWindowInSeconds *int32 + + // (Kinesis and DynamoDB Streams only) Discard records older than the specified + // age. The default value is -1, which sets the maximum age to infinite. When the + // value is set to infinite, Lambda never discards old records. + // + // The minimum valid value for maximum record age is 60s. Although values less + // than 60 and greater than -1 fall within the parameter's absolute range, they are + // not allowed + MaximumRecordAgeInSeconds *int32 + + // (Kinesis and DynamoDB Streams only) Discard records after the specified number + // of retries. The default value is -1, which sets the maximum number of retries to + // infinite. When MaximumRetryAttempts is infinite, Lambda retries failed records + // until the record expires in the event source. + MaximumRetryAttempts *int32 + + // The metrics configuration for your event source. For more information, see [Event source mapping metrics]. + // + // [Event source mapping metrics]: https://docs.aws.amazon.com/lambda/latest/dg/monitoring-metrics-types.html#event-source-mapping-metrics + MetricsConfig *EventSourceMappingMetricsConfig + + // (Kinesis and DynamoDB Streams only) The number of batches to process + // concurrently from each shard. The default value is 1. + ParallelizationFactor *int32 + + // (Amazon MSK and self-managed Apache Kafka only) The provisioned mode + // configuration for the event source. For more information, see [provisioned mode]. + // + // [provisioned mode]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html#invocation-eventsourcemapping-provisioned-mode + ProvisionedPollerConfig *ProvisionedPollerConfig + + // (Amazon MQ) The name of the Amazon MQ broker destination queue to consume. + Queues []string + + // (Amazon SQS only) The scaling configuration for the event source. For more + // information, see [Configuring maximum concurrency for Amazon SQS event sources]. + // + // [Configuring maximum concurrency for Amazon SQS event sources]: https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-max-concurrency + ScalingConfig *ScalingConfig + + // The self-managed Apache Kafka cluster for your event source. + SelfManagedEventSource *SelfManagedEventSource + + // Specific configuration settings for a self-managed Apache Kafka event source. + SelfManagedKafkaEventSourceConfig *SelfManagedKafkaEventSourceConfig + + // An array of the authentication protocol, VPC components, or virtual host to + // secure and define your event source. + SourceAccessConfigurations []SourceAccessConfiguration + + // The position in a stream from which to start reading. Required for Amazon + // Kinesis and Amazon DynamoDB Stream event sources. AT_TIMESTAMP is supported + // only for Amazon Kinesis streams, Amazon DocumentDB, Amazon MSK, and self-managed + // Apache Kafka. + StartingPosition EventSourcePosition + + // With StartingPosition set to AT_TIMESTAMP , the time from which to start + // reading. StartingPositionTimestamp cannot be in the future. + StartingPositionTimestamp *time.Time + + // The state of the event source mapping. It can be one of the following: Creating + // , Enabling , Enabled , Disabling , Disabled , Updating , or Deleting . + State *string + + // Indicates whether a user or Lambda made the last change to the event source + // mapping. + StateTransitionReason *string + + // The name of the Kafka topic. + Topics []string + + // (Kinesis and DynamoDB Streams only) The duration in seconds of a processing + // window for DynamoDB and Kinesis Streams event sources. A value of 0 seconds + // indicates no tumbling window. + TumblingWindowInSeconds *int32 + + // The identifier of the event source mapping. + UUID *string + + noSmithyDocumentSerde +} + +// The metrics configuration for your event source. Use this configuration object +// to define which metrics you want your event source mapping to produce. +type EventSourceMappingMetricsConfig struct { + + // The metrics you want your event source mapping to produce. Include EventCount + // to receive event source mapping metrics related to the number of events + // processed by your event source mapping. For more information about these + // metrics, see [Event source mapping metrics]. + // + // [Event source mapping metrics]: https://docs.aws.amazon.com/lambda/latest/dg/monitoring-metrics-types.html#event-source-mapping-metrics + Metrics []EventSourceMappingMetric + + noSmithyDocumentSerde +} + +// Details about the connection between a Lambda function and an [Amazon EFS file system]. +// +// [Amazon EFS file system]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-filesystem.html +type FileSystemConfig struct { + + // The Amazon Resource Name (ARN) of the Amazon EFS access point that provides + // access to the file system. + // + // This member is required. + Arn *string + + // The path where the function can access the file system, starting with /mnt/ . + // + // This member is required. + LocalMountPath *string + + noSmithyDocumentSerde +} + +// A structure within a FilterCriteria object that defines an event filtering +// +// pattern. +type Filter struct { + + // A filter pattern. For more information on the syntax of a filter pattern, see [Filter rule syntax] + // . + // + // [Filter rule syntax]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html#filtering-syntax + Pattern *string + + noSmithyDocumentSerde +} + +// An object that contains the filters for an event source. +type FilterCriteria struct { + + // A list of filters. + Filters []Filter + + noSmithyDocumentSerde +} + +// An object that contains details about an error related to filter criteria +// encryption. +type FilterCriteriaError struct { + + // The KMS exception that resulted from filter criteria encryption or decryption. + ErrorCode *string + + // The error message. + Message *string + + noSmithyDocumentSerde +} + +// The code for the Lambda function. You can either specify an object in Amazon +// S3, upload a .zip file archive deployment package directly, or specify the URI +// of a container image. +type FunctionCode struct { + + // URI of a [container image] in the Amazon ECR registry. + // + // [container image]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-images.html + ImageUri *string + + // An Amazon S3 bucket in the same Amazon Web Services Region as your function. + // The bucket can be in a different Amazon Web Services account. + S3Bucket *string + + // The Amazon S3 key of the deployment package. + S3Key *string + + // For versioned objects, the version of the deployment package object to use. + S3ObjectVersion *string + + // The ARN of the Key Management Service (KMS) customer managed key that's used to + // encrypt your function's .zip deployment package. If you don't provide a customer + // managed key, Lambda uses an [Amazon Web Services owned key]. + // + // [Amazon Web Services owned key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk + SourceKMSKeyArn *string + + // The base64-encoded contents of the deployment package. Amazon Web Services SDK + // and CLI clients handle the encoding for you. + ZipFile []byte + + noSmithyDocumentSerde +} + +// Details about a function's deployment package. +type FunctionCodeLocation struct { + + // URI of a container image in the Amazon ECR registry. + ImageUri *string + + // A presigned URL that you can use to download the deployment package. + Location *string + + // The service that's hosting the file. + RepositoryType *string + + // The resolved URI for the image. + ResolvedImageUri *string + + // The ARN of the Key Management Service (KMS) customer managed key that's used to + // encrypt your function's .zip deployment package. If you don't provide a customer + // managed key, Lambda uses an [Amazon Web Services owned key]. + // + // [Amazon Web Services owned key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk + SourceKMSKeyArn *string + + noSmithyDocumentSerde +} + +// Details about a function's configuration. +type FunctionConfiguration struct { + + // The instruction set architecture that the function supports. Architecture is a + // string array with one of the valid values. The default architecture value is + // x86_64 . + Architectures []Architecture + + // The SHA256 hash of the function's deployment package. + CodeSha256 *string + + // The size of the function's deployment package, in bytes. + CodeSize int64 + + // The function's dead letter queue. + DeadLetterConfig *DeadLetterConfig + + // The function's description. + Description *string + + // The function's [environment variables]. Omitted from CloudTrail logs. + // + // [environment variables]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html + Environment *EnvironmentResponse + + // The size of the function's /tmp directory in MB. The default value is 512, but + // can be any whole number between 512 and 10,240 MB. For more information, see [Configuring ephemeral storage (console)]. + // + // [Configuring ephemeral storage (console)]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-ephemeral-storage + EphemeralStorage *EphemeralStorage + + // Connection settings for an [Amazon EFS file system]. + // + // [Amazon EFS file system]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-filesystem.html + FileSystemConfigs []FileSystemConfig + + // The function's Amazon Resource Name (ARN). + FunctionArn *string + + // The name of the function. + FunctionName *string + + // The function that Lambda calls to begin running your function. + Handler *string + + // The function's image configuration values. + ImageConfigResponse *ImageConfigResponse + + // The ARN of the Key Management Service (KMS) customer managed key that's used to + // encrypt the following resources: + // + // - The function's [environment variables]. + // + // - The function's [Lambda SnapStart]snapshots. + // + // - When used with SourceKMSKeyArn , the unzipped version of the .zip deployment + // package that's used for function invocations. For more information, see [Specifying a customer managed key for Lambda]. + // + // - The optimized version of the container image that's used for function + // invocations. Note that this is not the same key that's used to protect your + // container image in the Amazon Elastic Container Registry (Amazon ECR). For more + // information, see [Function lifecycle]. + // + // If you don't provide a customer managed key, Lambda uses an [Amazon Web Services owned key] or an [Amazon Web Services managed key]. + // + // [Amazon Web Services owned key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk + // [Specifying a customer managed key for Lambda]: https://docs.aws.amazon.com/lambda/latest/dg/encrypt-zip-package.html#enable-zip-custom-encryption + // [Lambda SnapStart]: https://docs.aws.amazon.com/lambda/latest/dg/snapstart-security.html + // [environment variables]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-encryption + // [Function lifecycle]: https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-lifecycle + // [Amazon Web Services managed key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk + KMSKeyArn *string + + // The date and time that the function was last updated, in [ISO-8601 format] + // (YYYY-MM-DDThh:mm:ss.sTZD). + // + // [ISO-8601 format]: https://www.w3.org/TR/NOTE-datetime + LastModified *string + + // The status of the last update that was performed on the function. This is first + // set to Successful after function creation completes. + LastUpdateStatus LastUpdateStatus + + // The reason for the last update that was performed on the function. + LastUpdateStatusReason *string + + // The reason code for the last update that was performed on the function. + LastUpdateStatusReasonCode LastUpdateStatusReasonCode + + // The function's [layers]. + // + // [layers]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html + Layers []Layer + + // The function's Amazon CloudWatch Logs configuration settings. + LoggingConfig *LoggingConfig + + // For Lambda@Edge functions, the ARN of the main function. + MasterArn *string + + // The amount of memory available to the function at runtime. + MemorySize *int32 + + // The type of deployment package. Set to Image for container image and set Zip + // for .zip file archive. + PackageType PackageType + + // The latest updated revision of the function or alias. + RevisionId *string + + // The function's execution role. + Role *string + + // The identifier of the function's [runtime]. Runtime is required if the deployment + // package is a .zip file archive. Specifying a runtime results in an error if + // you're deploying a function using a container image. + // + // The following list includes deprecated runtimes. Lambda blocks creating new + // functions and updating existing functions shortly after each runtime is + // deprecated. For more information, see [Runtime use after deprecation]. + // + // For a list of all currently supported runtimes, see [Supported runtimes]. + // + // [Runtime use after deprecation]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-deprecation-levels + // [runtime]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html + // [Supported runtimes]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtimes-supported + Runtime Runtime + + // The ARN of the runtime and any errors that occured. + RuntimeVersionConfig *RuntimeVersionConfig + + // The ARN of the signing job. + SigningJobArn *string + + // The ARN of the signing profile version. + SigningProfileVersionArn *string + + // Set ApplyOn to PublishedVersions to create a snapshot of the initialized + // execution environment when you publish a function version. For more information, + // see [Improving startup performance with Lambda SnapStart]. + // + // [Improving startup performance with Lambda SnapStart]: https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html + SnapStart *SnapStartResponse + + // The current state of the function. When the state is Inactive , you can + // reactivate the function by invoking it. + State State + + // The reason for the function's current state. + StateReason *string + + // The reason code for the function's current state. When the code is Creating , + // you can't invoke or modify the function. + StateReasonCode StateReasonCode + + // The amount of time in seconds that Lambda allows a function to run before + // stopping it. + Timeout *int32 + + // The function's X-Ray tracing configuration. + TracingConfig *TracingConfigResponse + + // The version of the Lambda function. + Version *string + + // The function's networking configuration. + VpcConfig *VpcConfigResponse + + noSmithyDocumentSerde +} + +type FunctionEventInvokeConfig struct { + + // A destination for events after they have been sent to a function for processing. + // + // Destinations + // + // - Function - The Amazon Resource Name (ARN) of a Lambda function. + // + // - Queue - The ARN of a standard SQS queue. + // + // - Bucket - The ARN of an Amazon S3 bucket. + // + // - Topic - The ARN of a standard SNS topic. + // + // - Event Bus - The ARN of an Amazon EventBridge event bus. + // + // S3 buckets are supported only for on-failure destinations. To retain records of + // successful invocations, use another destination type. + DestinationConfig *DestinationConfig + + // The Amazon Resource Name (ARN) of the function. + FunctionArn *string + + // The date and time that the configuration was last updated. + LastModified *time.Time + + // The maximum age of a request that Lambda sends to a function for processing. + MaximumEventAgeInSeconds *int32 + + // The maximum number of times to retry when the function returns an error. + MaximumRetryAttempts *int32 + + noSmithyDocumentSerde +} + +// Details about a Lambda function URL. +type FunctionUrlConfig struct { + + // The type of authentication that your function URL uses. Set to AWS_IAM if you + // want to restrict access to authenticated users only. Set to NONE if you want to + // bypass IAM authentication to create a public endpoint. For more information, see + // [Security and auth model for Lambda function URLs]. + // + // [Security and auth model for Lambda function URLs]: https://docs.aws.amazon.com/lambda/latest/dg/urls-auth.html + // + // This member is required. + AuthType FunctionUrlAuthType + + // When the function URL was created, in [ISO-8601 format] (YYYY-MM-DDThh:mm:ss.sTZD). + // + // [ISO-8601 format]: https://www.w3.org/TR/NOTE-datetime + // + // This member is required. + CreationTime *string + + // The Amazon Resource Name (ARN) of your function. + // + // This member is required. + FunctionArn *string + + // The HTTP URL endpoint for your function. + // + // This member is required. + FunctionUrl *string + + // When the function URL configuration was last updated, in [ISO-8601 format] + // (YYYY-MM-DDThh:mm:ss.sTZD). + // + // [ISO-8601 format]: https://www.w3.org/TR/NOTE-datetime + // + // This member is required. + LastModifiedTime *string + + // The [cross-origin resource sharing (CORS)] settings for your function URL. + // + // [cross-origin resource sharing (CORS)]: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS + Cors *Cors + + // Use one of the following options: + // + // - BUFFERED – This is the default option. Lambda invokes your function using + // the Invoke API operation. Invocation results are available when the payload is + // complete. The maximum payload size is 6 MB. + // + // - RESPONSE_STREAM – Your function streams payload results as they become + // available. Lambda invokes your function using the InvokeWithResponseStream API + // operation. The maximum response payload size is 20 MB, however, you can [request a quota increase]. + // + // [request a quota increase]: https://docs.aws.amazon.com/servicequotas/latest/userguide/request-quota-increase.html + InvokeMode InvokeMode + + noSmithyDocumentSerde +} + +// Configuration values that override the container image Dockerfile settings. For +// more information, see [Container image settings]. +// +// [Container image settings]: https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-parms +type ImageConfig struct { + + // Specifies parameters that you want to pass in with ENTRYPOINT. + Command []string + + // Specifies the entry point to their application, which is typically the location + // of the runtime executable. + EntryPoint []string + + // Specifies the working directory. + WorkingDirectory *string + + noSmithyDocumentSerde +} + +// Error response to GetFunctionConfiguration . +type ImageConfigError struct { + + // Error code. + ErrorCode *string + + // Error message. + Message *string + + noSmithyDocumentSerde +} + +// Response to a GetFunctionConfiguration request. +type ImageConfigResponse struct { + + // Error response to GetFunctionConfiguration . + Error *ImageConfigError + + // Configuration values that override the container image Dockerfile. + ImageConfig *ImageConfig + + noSmithyDocumentSerde +} + +// A chunk of the streamed response payload. +type InvokeResponseStreamUpdate struct { + + // Data returned by your Lambda function. + Payload []byte + + noSmithyDocumentSerde +} + +// A response confirming that the event stream is complete. +type InvokeWithResponseStreamCompleteEvent struct { + + // An error code. + ErrorCode *string + + // The details of any returned error. + ErrorDetails *string + + // The last 4 KB of the execution log, which is base64-encoded. + LogResult *string + + noSmithyDocumentSerde +} + +// An object that includes a chunk of the response payload. When the stream has +// ended, Lambda includes a InvokeComplete object. +// +// The following types satisfy this interface: +// +// InvokeWithResponseStreamResponseEventMemberInvokeComplete +// InvokeWithResponseStreamResponseEventMemberPayloadChunk +type InvokeWithResponseStreamResponseEvent interface { + isInvokeWithResponseStreamResponseEvent() +} + +// An object that's returned when the stream has ended and all the payload chunks +// have been returned. +type InvokeWithResponseStreamResponseEventMemberInvokeComplete struct { + Value InvokeWithResponseStreamCompleteEvent + + noSmithyDocumentSerde +} + +func (*InvokeWithResponseStreamResponseEventMemberInvokeComplete) isInvokeWithResponseStreamResponseEvent() { +} + +// A chunk of the streamed response payload. +type InvokeWithResponseStreamResponseEventMemberPayloadChunk struct { + Value InvokeResponseStreamUpdate + + noSmithyDocumentSerde +} + +func (*InvokeWithResponseStreamResponseEventMemberPayloadChunk) isInvokeWithResponseStreamResponseEvent() { +} + +// An [Lambda layer]. +// +// [Lambda layer]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html +type Layer struct { + + // The Amazon Resource Name (ARN) of the function layer. + Arn *string + + // The size of the layer archive in bytes. + CodeSize int64 + + // The Amazon Resource Name (ARN) of a signing job. + SigningJobArn *string + + // The Amazon Resource Name (ARN) for a signing profile version. + SigningProfileVersionArn *string + + noSmithyDocumentSerde +} + +// Details about an [Lambda layer]. +// +// [Lambda layer]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html +type LayersListItem struct { + + // The newest version of the layer. + LatestMatchingVersion *LayerVersionsListItem + + // The Amazon Resource Name (ARN) of the function layer. + LayerArn *string + + // The name of the layer. + LayerName *string + + noSmithyDocumentSerde +} + +// A ZIP archive that contains the contents of an [Lambda layer]. You can specify either an +// Amazon S3 location, or upload a layer archive directly. +// +// [Lambda layer]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html +type LayerVersionContentInput struct { + + // The Amazon S3 bucket of the layer archive. + S3Bucket *string + + // The Amazon S3 key of the layer archive. + S3Key *string + + // For versioned objects, the version of the layer archive object to use. + S3ObjectVersion *string + + // The base64-encoded contents of the layer archive. Amazon Web Services SDK and + // Amazon Web Services CLI clients handle the encoding for you. + ZipFile []byte + + noSmithyDocumentSerde +} + +// Details about a version of an [Lambda layer]. +// +// [Lambda layer]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html +type LayerVersionContentOutput struct { + + // The SHA-256 hash of the layer archive. + CodeSha256 *string + + // The size of the layer archive in bytes. + CodeSize int64 + + // A link to the layer archive in Amazon S3 that is valid for 10 minutes. + Location *string + + // The Amazon Resource Name (ARN) of a signing job. + SigningJobArn *string + + // The Amazon Resource Name (ARN) for a signing profile version. + SigningProfileVersionArn *string + + noSmithyDocumentSerde +} + +// Details about a version of an [Lambda layer]. +// +// [Lambda layer]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html +type LayerVersionsListItem struct { + + // A list of compatible [instruction set architectures]. + // + // [instruction set architectures]: https://docs.aws.amazon.com/lambda/latest/dg/foundation-arch.html + CompatibleArchitectures []Architecture + + // The layer's compatible runtimes. + // + // The following list includes deprecated runtimes. For more information, see [Runtime use after deprecation]. + // + // For a list of all currently supported runtimes, see [Supported runtimes]. + // + // [Runtime use after deprecation]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-deprecation-levels + // [Supported runtimes]: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtimes-supported + CompatibleRuntimes []Runtime + + // The date that the version was created, in ISO 8601 format. For example, + // 2018-11-27T15:10:45.123+0000 . + CreatedDate *string + + // The description of the version. + Description *string + + // The ARN of the layer version. + LayerVersionArn *string + + // The layer's open-source license. + LicenseInfo *string + + // The version number. + Version int64 + + noSmithyDocumentSerde +} + +// The function's Amazon CloudWatch Logs configuration settings. +type LoggingConfig struct { + + // Set this property to filter the application logs for your function that Lambda + // sends to CloudWatch. Lambda only sends application logs at the selected level of + // detail and lower, where TRACE is the highest level and FATAL is the lowest. + ApplicationLogLevel ApplicationLogLevel + + // The format in which Lambda sends your function's application and system logs to + // CloudWatch. Select between plain text and structured JSON. + LogFormat LogFormat + + // The name of the Amazon CloudWatch log group the function sends logs to. By + // default, Lambda functions send logs to a default log group named /aws/lambda/ . + // To use a different log group, enter an existing log group or enter a new log + // group name. + LogGroup *string + + // Set this property to filter the system logs for your function that Lambda sends + // to CloudWatch. Lambda only sends system logs at the selected level of detail and + // lower, where DEBUG is the highest level and WARN is the lowest. + SystemLogLevel SystemLogLevel + + noSmithyDocumentSerde +} + +// A destination for events that failed processing. +type OnFailure struct { + + // The Amazon Resource Name (ARN) of the destination resource. + // + // To retain records of unsuccessful [asynchronous invocations], you can configure an Amazon SNS topic, + // Amazon SQS queue, Amazon S3 bucket, Lambda function, or Amazon EventBridge event + // bus as the destination. + // + // To retain records of failed invocations from [Kinesis], [DynamoDB], [self-managed Kafka] or [Amazon MSK], you can configure an + // Amazon SNS topic, Amazon SQS queue, or Amazon S3 bucket as the destination. + // + // [Amazon MSK]: https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#services-msk-onfailure-destination + // [Kinesis]: https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html + // [asynchronous invocations]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-async-destinations + // [DynamoDB]: https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html + // [self-managed Kafka]: https://docs.aws.amazon.com/lambda/latest/dg/with-kafka.html#services-smaa-onfailure-destination + Destination *string + + noSmithyDocumentSerde +} + +// A destination for events that were processed successfully. +// +// To retain records of successful [asynchronous invocations], you can configure an Amazon SNS topic, Amazon +// SQS queue, Lambda function, or Amazon EventBridge event bus as the destination. +// +// [asynchronous invocations]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-async-destinations +type OnSuccess struct { + + // The Amazon Resource Name (ARN) of the destination resource. + Destination *string + + noSmithyDocumentSerde +} + +// Details about the provisioned concurrency configuration for a function alias or +// version. +type ProvisionedConcurrencyConfigListItem struct { + + // The amount of provisioned concurrency allocated. When a weighted alias is used + // during linear and canary deployments, this value fluctuates depending on the + // amount of concurrency that is provisioned for the function versions. + AllocatedProvisionedConcurrentExecutions *int32 + + // The amount of provisioned concurrency available. + AvailableProvisionedConcurrentExecutions *int32 + + // The Amazon Resource Name (ARN) of the alias or version. + FunctionArn *string + + // The date and time that a user last updated the configuration, in [ISO 8601 format]. + // + // [ISO 8601 format]: https://www.iso.org/iso-8601-date-and-time-format.html + LastModified *string + + // The amount of provisioned concurrency requested. + RequestedProvisionedConcurrentExecutions *int32 + + // The status of the allocation process. + Status ProvisionedConcurrencyStatusEnum + + // For failed allocations, the reason that provisioned concurrency could not be + // allocated. + StatusReason *string + + noSmithyDocumentSerde +} + +// The [provisioned mode] configuration for the event source. Use Provisioned Mode to customize the +// minimum and maximum number of event pollers for your event source. An event +// poller is a compute unit that provides approximately 5 MBps of throughput. +// +// [provisioned mode]: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html#invocation-eventsourcemapping-provisioned-mode +type ProvisionedPollerConfig struct { + + // The maximum number of event pollers this event source can scale up to. + MaximumPollers *int32 + + // The minimum number of event pollers this event source can scale down to. + MinimumPollers *int32 + + noSmithyDocumentSerde +} + +// The ARN of the runtime and any errors that occured. +type RuntimeVersionConfig struct { + + // Error response when Lambda is unable to retrieve the runtime version for a + // function. + Error *RuntimeVersionError + + // The ARN of the runtime version you want the function to use. + RuntimeVersionArn *string + + noSmithyDocumentSerde +} + +// Any error returned when the runtime version information for the function could +// not be retrieved. +type RuntimeVersionError struct { + + // The error code. + ErrorCode *string + + // The error message. + Message *string + + noSmithyDocumentSerde +} + +// (Amazon SQS only) The scaling configuration for the event source. To remove the +// configuration, pass an empty value. +type ScalingConfig struct { + + // Limits the number of concurrent instances that the Amazon SQS event source can + // invoke. + MaximumConcurrency *int32 + + noSmithyDocumentSerde +} + +// The self-managed Apache Kafka cluster for your event source. +type SelfManagedEventSource struct { + + // The list of bootstrap servers for your Kafka brokers in the following format: + // "KAFKA_BOOTSTRAP_SERVERS": ["abc.xyz.com:xxxx","abc2.xyz.com:xxxx"] . + Endpoints map[string][]string + + noSmithyDocumentSerde +} + +// Specific configuration settings for a self-managed Apache Kafka event source. +type SelfManagedKafkaEventSourceConfig struct { + + // The identifier for the Kafka consumer group to join. The consumer group ID must + // be unique among all your Kafka event sources. After creating a Kafka event + // source mapping with the consumer group ID specified, you cannot update this + // value. For more information, see [Customizable consumer group ID]. + // + // [Customizable consumer group ID]: https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#services-msk-consumer-group-id + ConsumerGroupId *string + + noSmithyDocumentSerde +} + +// The function's [Lambda SnapStart] setting. Set ApplyOn to PublishedVersions to create a snapshot +// of the initialized execution environment when you publish a function version. +// +// [Lambda SnapStart]: https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html +type SnapStart struct { + + // Set to PublishedVersions to create a snapshot of the initialized execution + // environment when you publish a function version. + ApplyOn SnapStartApplyOn + + noSmithyDocumentSerde +} + +// The function's [SnapStart] setting. +// +// [SnapStart]: https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html +type SnapStartResponse struct { + + // When set to PublishedVersions , Lambda creates a snapshot of the execution + // environment when you publish a function version. + ApplyOn SnapStartApplyOn + + // When you provide a [qualified Amazon Resource Name (ARN)], this response element indicates whether SnapStart is + // activated for the specified function version. + // + // [qualified Amazon Resource Name (ARN)]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html#versioning-versions-using + OptimizationStatus SnapStartOptimizationStatus + + noSmithyDocumentSerde +} + +// To secure and define access to your event source, you can specify the +// authentication protocol, VPC components, or virtual host. +type SourceAccessConfiguration struct { + + // The type of authentication protocol, VPC components, or virtual host for your + // event source. For example: "Type":"SASL_SCRAM_512_AUTH" . + // + // - BASIC_AUTH – (Amazon MQ) The Secrets Manager secret that stores your broker + // credentials. + // + // - BASIC_AUTH – (Self-managed Apache Kafka) The Secrets Manager ARN of your + // secret key used for SASL/PLAIN authentication of your Apache Kafka brokers. + // + // - VPC_SUBNET – (Self-managed Apache Kafka) The subnets associated with your + // VPC. Lambda connects to these subnets to fetch data from your self-managed + // Apache Kafka cluster. + // + // - VPC_SECURITY_GROUP – (Self-managed Apache Kafka) The VPC security group used + // to manage access to your self-managed Apache Kafka brokers. + // + // - SASL_SCRAM_256_AUTH – (Self-managed Apache Kafka) The Secrets Manager ARN of + // your secret key used for SASL SCRAM-256 authentication of your self-managed + // Apache Kafka brokers. + // + // - SASL_SCRAM_512_AUTH – (Amazon MSK, Self-managed Apache Kafka) The Secrets + // Manager ARN of your secret key used for SASL SCRAM-512 authentication of your + // self-managed Apache Kafka brokers. + // + // - VIRTUAL_HOST –- (RabbitMQ) The name of the virtual host in your RabbitMQ + // broker. Lambda uses this RabbitMQ host as the event source. This property cannot + // be specified in an UpdateEventSourceMapping API call. + // + // - CLIENT_CERTIFICATE_TLS_AUTH – (Amazon MSK, self-managed Apache Kafka) The + // Secrets Manager ARN of your secret key containing the certificate chain (X.509 + // PEM), private key (PKCS#8 PEM), and private key password (optional) used for + // mutual TLS authentication of your MSK/Apache Kafka brokers. + // + // - SERVER_ROOT_CA_CERTIFICATE – (Self-managed Apache Kafka) The Secrets Manager + // ARN of your secret key containing the root CA certificate (X.509 PEM) used for + // TLS encryption of your Apache Kafka brokers. + Type SourceAccessType + + // The value for your chosen configuration in Type . For example: "URI": + // "arn:aws:secretsmanager:us-east-1:01234567890:secret:MyBrokerSecretName" . + URI *string + + noSmithyDocumentSerde +} + +// An object that contains details about an error related to retrieving tags. +type TagsError struct { + + // The error code. + // + // This member is required. + ErrorCode *string + + // The error message. + // + // This member is required. + Message *string + + noSmithyDocumentSerde +} + +// The function's [X-Ray] tracing configuration. To sample and record incoming requests, +// set Mode to Active . +// +// [X-Ray]: https://docs.aws.amazon.com/lambda/latest/dg/services-xray.html +type TracingConfig struct { + + // The tracing mode. + Mode TracingMode + + noSmithyDocumentSerde +} + +// The function's X-Ray tracing configuration. +type TracingConfigResponse struct { + + // The tracing mode. + Mode TracingMode + + noSmithyDocumentSerde +} + +// The VPC security groups and subnets that are attached to a Lambda function. For +// more information, see [Configuring a Lambda function to access resources in a VPC]. +// +// [Configuring a Lambda function to access resources in a VPC]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html +type VpcConfig struct { + + // Allows outbound IPv6 traffic on VPC functions that are connected to dual-stack + // subnets. + Ipv6AllowedForDualStack *bool + + // A list of VPC security group IDs. + SecurityGroupIds []string + + // A list of VPC subnet IDs. + SubnetIds []string + + noSmithyDocumentSerde +} + +// The VPC security groups and subnets that are attached to a Lambda function. +type VpcConfigResponse struct { + + // Allows outbound IPv6 traffic on VPC functions that are connected to dual-stack + // subnets. + Ipv6AllowedForDualStack *bool + + // A list of VPC security group IDs. + SecurityGroupIds []string + + // A list of VPC subnet IDs. + SubnetIds []string + + // The ID of the VPC. + VpcId *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) isInvokeWithResponseStreamResponseEvent() {} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/validators.go b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/validators.go new file mode 100644 index 00000000..c4c103d7 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/lambda/validators.go @@ -0,0 +1,2661 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lambda + +import ( + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/lambda/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/middleware" +) + +type validateOpAddLayerVersionPermission struct { +} + +func (*validateOpAddLayerVersionPermission) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpAddLayerVersionPermission) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*AddLayerVersionPermissionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpAddLayerVersionPermissionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpAddPermission struct { +} + +func (*validateOpAddPermission) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpAddPermission) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*AddPermissionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpAddPermissionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateAlias struct { +} + +func (*validateOpCreateAlias) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateAlias) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateAliasInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateAliasInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateCodeSigningConfig struct { +} + +func (*validateOpCreateCodeSigningConfig) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateCodeSigningConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateCodeSigningConfigInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateCodeSigningConfigInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateEventSourceMapping struct { +} + +func (*validateOpCreateEventSourceMapping) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateEventSourceMapping) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateEventSourceMappingInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateEventSourceMappingInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateFunction struct { +} + +func (*validateOpCreateFunction) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateFunction) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateFunctionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateFunctionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateFunctionUrlConfig struct { +} + +func (*validateOpCreateFunctionUrlConfig) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateFunctionUrlConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateFunctionUrlConfigInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateFunctionUrlConfigInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteAlias struct { +} + +func (*validateOpDeleteAlias) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteAlias) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteAliasInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteAliasInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteCodeSigningConfig struct { +} + +func (*validateOpDeleteCodeSigningConfig) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteCodeSigningConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteCodeSigningConfigInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteCodeSigningConfigInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteEventSourceMapping struct { +} + +func (*validateOpDeleteEventSourceMapping) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteEventSourceMapping) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteEventSourceMappingInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteEventSourceMappingInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteFunctionCodeSigningConfig struct { +} + +func (*validateOpDeleteFunctionCodeSigningConfig) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteFunctionCodeSigningConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteFunctionCodeSigningConfigInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteFunctionCodeSigningConfigInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteFunctionConcurrency struct { +} + +func (*validateOpDeleteFunctionConcurrency) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteFunctionConcurrency) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteFunctionConcurrencyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteFunctionConcurrencyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteFunctionEventInvokeConfig struct { +} + +func (*validateOpDeleteFunctionEventInvokeConfig) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteFunctionEventInvokeConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteFunctionEventInvokeConfigInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteFunctionEventInvokeConfigInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteFunction struct { +} + +func (*validateOpDeleteFunction) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteFunction) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteFunctionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteFunctionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteFunctionUrlConfig struct { +} + +func (*validateOpDeleteFunctionUrlConfig) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteFunctionUrlConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteFunctionUrlConfigInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteFunctionUrlConfigInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteLayerVersion struct { +} + +func (*validateOpDeleteLayerVersion) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteLayerVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteLayerVersionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteLayerVersionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteProvisionedConcurrencyConfig struct { +} + +func (*validateOpDeleteProvisionedConcurrencyConfig) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteProvisionedConcurrencyConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteProvisionedConcurrencyConfigInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteProvisionedConcurrencyConfigInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetAlias struct { +} + +func (*validateOpGetAlias) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetAlias) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetAliasInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetAliasInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetCodeSigningConfig struct { +} + +func (*validateOpGetCodeSigningConfig) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetCodeSigningConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetCodeSigningConfigInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetCodeSigningConfigInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetEventSourceMapping struct { +} + +func (*validateOpGetEventSourceMapping) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetEventSourceMapping) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetEventSourceMappingInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetEventSourceMappingInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetFunctionCodeSigningConfig struct { +} + +func (*validateOpGetFunctionCodeSigningConfig) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetFunctionCodeSigningConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetFunctionCodeSigningConfigInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetFunctionCodeSigningConfigInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetFunctionConcurrency struct { +} + +func (*validateOpGetFunctionConcurrency) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetFunctionConcurrency) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetFunctionConcurrencyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetFunctionConcurrencyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetFunctionConfiguration struct { +} + +func (*validateOpGetFunctionConfiguration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetFunctionConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetFunctionConfigurationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetFunctionConfigurationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetFunctionEventInvokeConfig struct { +} + +func (*validateOpGetFunctionEventInvokeConfig) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetFunctionEventInvokeConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetFunctionEventInvokeConfigInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetFunctionEventInvokeConfigInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetFunction struct { +} + +func (*validateOpGetFunction) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetFunction) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetFunctionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetFunctionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetFunctionRecursionConfig struct { +} + +func (*validateOpGetFunctionRecursionConfig) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetFunctionRecursionConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetFunctionRecursionConfigInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetFunctionRecursionConfigInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetFunctionUrlConfig struct { +} + +func (*validateOpGetFunctionUrlConfig) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetFunctionUrlConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetFunctionUrlConfigInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetFunctionUrlConfigInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetLayerVersionByArn struct { +} + +func (*validateOpGetLayerVersionByArn) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetLayerVersionByArn) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetLayerVersionByArnInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetLayerVersionByArnInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetLayerVersion struct { +} + +func (*validateOpGetLayerVersion) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetLayerVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetLayerVersionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetLayerVersionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetLayerVersionPolicy struct { +} + +func (*validateOpGetLayerVersionPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetLayerVersionPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetLayerVersionPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetLayerVersionPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetPolicy struct { +} + +func (*validateOpGetPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetProvisionedConcurrencyConfig struct { +} + +func (*validateOpGetProvisionedConcurrencyConfig) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetProvisionedConcurrencyConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetProvisionedConcurrencyConfigInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetProvisionedConcurrencyConfigInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetRuntimeManagementConfig struct { +} + +func (*validateOpGetRuntimeManagementConfig) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetRuntimeManagementConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetRuntimeManagementConfigInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetRuntimeManagementConfigInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpInvokeAsync struct { +} + +func (*validateOpInvokeAsync) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpInvokeAsync) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*InvokeAsyncInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpInvokeAsyncInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpInvoke struct { +} + +func (*validateOpInvoke) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpInvoke) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*InvokeInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpInvokeInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpInvokeWithResponseStream struct { +} + +func (*validateOpInvokeWithResponseStream) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpInvokeWithResponseStream) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*InvokeWithResponseStreamInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpInvokeWithResponseStreamInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListAliases struct { +} + +func (*validateOpListAliases) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListAliases) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListAliasesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListAliasesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListFunctionEventInvokeConfigs struct { +} + +func (*validateOpListFunctionEventInvokeConfigs) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListFunctionEventInvokeConfigs) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListFunctionEventInvokeConfigsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListFunctionEventInvokeConfigsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListFunctionsByCodeSigningConfig struct { +} + +func (*validateOpListFunctionsByCodeSigningConfig) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListFunctionsByCodeSigningConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListFunctionsByCodeSigningConfigInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListFunctionsByCodeSigningConfigInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListFunctionUrlConfigs struct { +} + +func (*validateOpListFunctionUrlConfigs) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListFunctionUrlConfigs) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListFunctionUrlConfigsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListFunctionUrlConfigsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListLayerVersions struct { +} + +func (*validateOpListLayerVersions) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListLayerVersions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListLayerVersionsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListLayerVersionsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListProvisionedConcurrencyConfigs struct { +} + +func (*validateOpListProvisionedConcurrencyConfigs) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListProvisionedConcurrencyConfigs) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListProvisionedConcurrencyConfigsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListProvisionedConcurrencyConfigsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListTags struct { +} + +func (*validateOpListTags) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListTags) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListTagsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListTagsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListVersionsByFunction struct { +} + +func (*validateOpListVersionsByFunction) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListVersionsByFunction) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListVersionsByFunctionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListVersionsByFunctionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpPublishLayerVersion struct { +} + +func (*validateOpPublishLayerVersion) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPublishLayerVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PublishLayerVersionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPublishLayerVersionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpPublishVersion struct { +} + +func (*validateOpPublishVersion) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPublishVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PublishVersionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPublishVersionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpPutFunctionCodeSigningConfig struct { +} + +func (*validateOpPutFunctionCodeSigningConfig) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutFunctionCodeSigningConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutFunctionCodeSigningConfigInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutFunctionCodeSigningConfigInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpPutFunctionConcurrency struct { +} + +func (*validateOpPutFunctionConcurrency) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutFunctionConcurrency) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutFunctionConcurrencyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutFunctionConcurrencyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpPutFunctionEventInvokeConfig struct { +} + +func (*validateOpPutFunctionEventInvokeConfig) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutFunctionEventInvokeConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutFunctionEventInvokeConfigInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutFunctionEventInvokeConfigInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpPutFunctionRecursionConfig struct { +} + +func (*validateOpPutFunctionRecursionConfig) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutFunctionRecursionConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutFunctionRecursionConfigInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutFunctionRecursionConfigInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpPutProvisionedConcurrencyConfig struct { +} + +func (*validateOpPutProvisionedConcurrencyConfig) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutProvisionedConcurrencyConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutProvisionedConcurrencyConfigInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutProvisionedConcurrencyConfigInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpPutRuntimeManagementConfig struct { +} + +func (*validateOpPutRuntimeManagementConfig) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutRuntimeManagementConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutRuntimeManagementConfigInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutRuntimeManagementConfigInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpRemoveLayerVersionPermission struct { +} + +func (*validateOpRemoveLayerVersionPermission) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpRemoveLayerVersionPermission) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*RemoveLayerVersionPermissionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpRemoveLayerVersionPermissionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpRemovePermission struct { +} + +func (*validateOpRemovePermission) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpRemovePermission) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*RemovePermissionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpRemovePermissionInput(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 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 validateOpUpdateAlias struct { +} + +func (*validateOpUpdateAlias) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateAlias) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateAliasInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateAliasInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateCodeSigningConfig struct { +} + +func (*validateOpUpdateCodeSigningConfig) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateCodeSigningConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateCodeSigningConfigInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateCodeSigningConfigInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateEventSourceMapping struct { +} + +func (*validateOpUpdateEventSourceMapping) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateEventSourceMapping) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateEventSourceMappingInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateEventSourceMappingInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateFunctionCode struct { +} + +func (*validateOpUpdateFunctionCode) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateFunctionCode) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateFunctionCodeInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateFunctionCodeInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateFunctionConfiguration struct { +} + +func (*validateOpUpdateFunctionConfiguration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateFunctionConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateFunctionConfigurationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateFunctionConfigurationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateFunctionEventInvokeConfig struct { +} + +func (*validateOpUpdateFunctionEventInvokeConfig) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateFunctionEventInvokeConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateFunctionEventInvokeConfigInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateFunctionEventInvokeConfigInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateFunctionUrlConfig struct { +} + +func (*validateOpUpdateFunctionUrlConfig) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateFunctionUrlConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateFunctionUrlConfigInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateFunctionUrlConfigInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +func addOpAddLayerVersionPermissionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAddLayerVersionPermission{}, middleware.After) +} + +func addOpAddPermissionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAddPermission{}, middleware.After) +} + +func addOpCreateAliasValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateAlias{}, middleware.After) +} + +func addOpCreateCodeSigningConfigValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateCodeSigningConfig{}, middleware.After) +} + +func addOpCreateEventSourceMappingValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateEventSourceMapping{}, middleware.After) +} + +func addOpCreateFunctionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateFunction{}, middleware.After) +} + +func addOpCreateFunctionUrlConfigValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateFunctionUrlConfig{}, middleware.After) +} + +func addOpDeleteAliasValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteAlias{}, middleware.After) +} + +func addOpDeleteCodeSigningConfigValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteCodeSigningConfig{}, middleware.After) +} + +func addOpDeleteEventSourceMappingValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteEventSourceMapping{}, middleware.After) +} + +func addOpDeleteFunctionCodeSigningConfigValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteFunctionCodeSigningConfig{}, middleware.After) +} + +func addOpDeleteFunctionConcurrencyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteFunctionConcurrency{}, middleware.After) +} + +func addOpDeleteFunctionEventInvokeConfigValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteFunctionEventInvokeConfig{}, middleware.After) +} + +func addOpDeleteFunctionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteFunction{}, middleware.After) +} + +func addOpDeleteFunctionUrlConfigValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteFunctionUrlConfig{}, middleware.After) +} + +func addOpDeleteLayerVersionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteLayerVersion{}, middleware.After) +} + +func addOpDeleteProvisionedConcurrencyConfigValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteProvisionedConcurrencyConfig{}, middleware.After) +} + +func addOpGetAliasValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetAlias{}, middleware.After) +} + +func addOpGetCodeSigningConfigValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetCodeSigningConfig{}, middleware.After) +} + +func addOpGetEventSourceMappingValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetEventSourceMapping{}, middleware.After) +} + +func addOpGetFunctionCodeSigningConfigValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetFunctionCodeSigningConfig{}, middleware.After) +} + +func addOpGetFunctionConcurrencyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetFunctionConcurrency{}, middleware.After) +} + +func addOpGetFunctionConfigurationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetFunctionConfiguration{}, middleware.After) +} + +func addOpGetFunctionEventInvokeConfigValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetFunctionEventInvokeConfig{}, middleware.After) +} + +func addOpGetFunctionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetFunction{}, middleware.After) +} + +func addOpGetFunctionRecursionConfigValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetFunctionRecursionConfig{}, middleware.After) +} + +func addOpGetFunctionUrlConfigValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetFunctionUrlConfig{}, middleware.After) +} + +func addOpGetLayerVersionByArnValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetLayerVersionByArn{}, middleware.After) +} + +func addOpGetLayerVersionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetLayerVersion{}, middleware.After) +} + +func addOpGetLayerVersionPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetLayerVersionPolicy{}, middleware.After) +} + +func addOpGetPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetPolicy{}, middleware.After) +} + +func addOpGetProvisionedConcurrencyConfigValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetProvisionedConcurrencyConfig{}, middleware.After) +} + +func addOpGetRuntimeManagementConfigValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetRuntimeManagementConfig{}, middleware.After) +} + +func addOpInvokeAsyncValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpInvokeAsync{}, middleware.After) +} + +func addOpInvokeValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpInvoke{}, middleware.After) +} + +func addOpInvokeWithResponseStreamValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpInvokeWithResponseStream{}, middleware.After) +} + +func addOpListAliasesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListAliases{}, middleware.After) +} + +func addOpListFunctionEventInvokeConfigsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListFunctionEventInvokeConfigs{}, middleware.After) +} + +func addOpListFunctionsByCodeSigningConfigValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListFunctionsByCodeSigningConfig{}, middleware.After) +} + +func addOpListFunctionUrlConfigsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListFunctionUrlConfigs{}, middleware.After) +} + +func addOpListLayerVersionsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListLayerVersions{}, middleware.After) +} + +func addOpListProvisionedConcurrencyConfigsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListProvisionedConcurrencyConfigs{}, middleware.After) +} + +func addOpListTagsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListTags{}, middleware.After) +} + +func addOpListVersionsByFunctionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListVersionsByFunction{}, middleware.After) +} + +func addOpPublishLayerVersionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPublishLayerVersion{}, middleware.After) +} + +func addOpPublishVersionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPublishVersion{}, middleware.After) +} + +func addOpPutFunctionCodeSigningConfigValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutFunctionCodeSigningConfig{}, middleware.After) +} + +func addOpPutFunctionConcurrencyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutFunctionConcurrency{}, middleware.After) +} + +func addOpPutFunctionEventInvokeConfigValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutFunctionEventInvokeConfig{}, middleware.After) +} + +func addOpPutFunctionRecursionConfigValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutFunctionRecursionConfig{}, middleware.After) +} + +func addOpPutProvisionedConcurrencyConfigValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutProvisionedConcurrencyConfig{}, middleware.After) +} + +func addOpPutRuntimeManagementConfigValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutRuntimeManagementConfig{}, middleware.After) +} + +func addOpRemoveLayerVersionPermissionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpRemoveLayerVersionPermission{}, middleware.After) +} + +func addOpRemovePermissionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpRemovePermission{}, middleware.After) +} + +func addOpTagResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpTagResource{}, middleware.After) +} + +func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After) +} + +func addOpUpdateAliasValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateAlias{}, middleware.After) +} + +func addOpUpdateCodeSigningConfigValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateCodeSigningConfig{}, middleware.After) +} + +func addOpUpdateEventSourceMappingValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateEventSourceMapping{}, middleware.After) +} + +func addOpUpdateFunctionCodeValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateFunctionCode{}, middleware.After) +} + +func addOpUpdateFunctionConfigurationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateFunctionConfiguration{}, middleware.After) +} + +func addOpUpdateFunctionEventInvokeConfigValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateFunctionEventInvokeConfig{}, middleware.After) +} + +func addOpUpdateFunctionUrlConfigValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateFunctionUrlConfig{}, middleware.After) +} + +func validateAllowedPublishers(v *types.AllowedPublishers) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AllowedPublishers"} + if v.SigningProfileVersionArns == nil { + invalidParams.Add(smithy.NewErrParamRequired("SigningProfileVersionArns")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateEphemeralStorage(v *types.EphemeralStorage) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "EphemeralStorage"} + if v.Size == nil { + invalidParams.Add(smithy.NewErrParamRequired("Size")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateFileSystemConfig(v *types.FileSystemConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "FileSystemConfig"} + if v.Arn == nil { + invalidParams.Add(smithy.NewErrParamRequired("Arn")) + } + if v.LocalMountPath == nil { + invalidParams.Add(smithy.NewErrParamRequired("LocalMountPath")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateFileSystemConfigList(v []types.FileSystemConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "FileSystemConfigList"} + for i := range v { + if err := validateFileSystemConfig(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpAddLayerVersionPermissionInput(v *AddLayerVersionPermissionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AddLayerVersionPermissionInput"} + if v.LayerName == nil { + invalidParams.Add(smithy.NewErrParamRequired("LayerName")) + } + if v.VersionNumber == nil { + invalidParams.Add(smithy.NewErrParamRequired("VersionNumber")) + } + if v.StatementId == nil { + invalidParams.Add(smithy.NewErrParamRequired("StatementId")) + } + if v.Action == nil { + invalidParams.Add(smithy.NewErrParamRequired("Action")) + } + if v.Principal == nil { + invalidParams.Add(smithy.NewErrParamRequired("Principal")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpAddPermissionInput(v *AddPermissionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AddPermissionInput"} + if v.FunctionName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FunctionName")) + } + if v.StatementId == nil { + invalidParams.Add(smithy.NewErrParamRequired("StatementId")) + } + if v.Action == nil { + invalidParams.Add(smithy.NewErrParamRequired("Action")) + } + if v.Principal == nil { + invalidParams.Add(smithy.NewErrParamRequired("Principal")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateAliasInput(v *CreateAliasInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateAliasInput"} + if v.FunctionName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FunctionName")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.FunctionVersion == nil { + invalidParams.Add(smithy.NewErrParamRequired("FunctionVersion")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateCodeSigningConfigInput(v *CreateCodeSigningConfigInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateCodeSigningConfigInput"} + if v.AllowedPublishers == nil { + invalidParams.Add(smithy.NewErrParamRequired("AllowedPublishers")) + } else if v.AllowedPublishers != nil { + if err := validateAllowedPublishers(v.AllowedPublishers); err != nil { + invalidParams.AddNested("AllowedPublishers", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateEventSourceMappingInput(v *CreateEventSourceMappingInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateEventSourceMappingInput"} + if v.FunctionName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FunctionName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateFunctionInput(v *CreateFunctionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateFunctionInput"} + if v.FunctionName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FunctionName")) + } + if v.Role == nil { + invalidParams.Add(smithy.NewErrParamRequired("Role")) + } + if v.Code == nil { + invalidParams.Add(smithy.NewErrParamRequired("Code")) + } + if v.FileSystemConfigs != nil { + if err := validateFileSystemConfigList(v.FileSystemConfigs); err != nil { + invalidParams.AddNested("FileSystemConfigs", err.(smithy.InvalidParamsError)) + } + } + if v.EphemeralStorage != nil { + if err := validateEphemeralStorage(v.EphemeralStorage); err != nil { + invalidParams.AddNested("EphemeralStorage", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateFunctionUrlConfigInput(v *CreateFunctionUrlConfigInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateFunctionUrlConfigInput"} + if v.FunctionName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FunctionName")) + } + if len(v.AuthType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("AuthType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteAliasInput(v *DeleteAliasInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteAliasInput"} + if v.FunctionName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FunctionName")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteCodeSigningConfigInput(v *DeleteCodeSigningConfigInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteCodeSigningConfigInput"} + if v.CodeSigningConfigArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("CodeSigningConfigArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteEventSourceMappingInput(v *DeleteEventSourceMappingInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteEventSourceMappingInput"} + if v.UUID == nil { + invalidParams.Add(smithy.NewErrParamRequired("UUID")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteFunctionCodeSigningConfigInput(v *DeleteFunctionCodeSigningConfigInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteFunctionCodeSigningConfigInput"} + if v.FunctionName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FunctionName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteFunctionConcurrencyInput(v *DeleteFunctionConcurrencyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteFunctionConcurrencyInput"} + if v.FunctionName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FunctionName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteFunctionEventInvokeConfigInput(v *DeleteFunctionEventInvokeConfigInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteFunctionEventInvokeConfigInput"} + if v.FunctionName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FunctionName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteFunctionInput(v *DeleteFunctionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteFunctionInput"} + if v.FunctionName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FunctionName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteFunctionUrlConfigInput(v *DeleteFunctionUrlConfigInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteFunctionUrlConfigInput"} + if v.FunctionName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FunctionName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteLayerVersionInput(v *DeleteLayerVersionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteLayerVersionInput"} + if v.LayerName == nil { + invalidParams.Add(smithy.NewErrParamRequired("LayerName")) + } + if v.VersionNumber == nil { + invalidParams.Add(smithy.NewErrParamRequired("VersionNumber")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteProvisionedConcurrencyConfigInput(v *DeleteProvisionedConcurrencyConfigInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteProvisionedConcurrencyConfigInput"} + if v.FunctionName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FunctionName")) + } + if v.Qualifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Qualifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetAliasInput(v *GetAliasInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetAliasInput"} + if v.FunctionName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FunctionName")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetCodeSigningConfigInput(v *GetCodeSigningConfigInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetCodeSigningConfigInput"} + if v.CodeSigningConfigArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("CodeSigningConfigArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetEventSourceMappingInput(v *GetEventSourceMappingInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetEventSourceMappingInput"} + if v.UUID == nil { + invalidParams.Add(smithy.NewErrParamRequired("UUID")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetFunctionCodeSigningConfigInput(v *GetFunctionCodeSigningConfigInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetFunctionCodeSigningConfigInput"} + if v.FunctionName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FunctionName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetFunctionConcurrencyInput(v *GetFunctionConcurrencyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetFunctionConcurrencyInput"} + if v.FunctionName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FunctionName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetFunctionConfigurationInput(v *GetFunctionConfigurationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetFunctionConfigurationInput"} + if v.FunctionName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FunctionName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetFunctionEventInvokeConfigInput(v *GetFunctionEventInvokeConfigInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetFunctionEventInvokeConfigInput"} + if v.FunctionName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FunctionName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetFunctionInput(v *GetFunctionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetFunctionInput"} + if v.FunctionName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FunctionName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetFunctionRecursionConfigInput(v *GetFunctionRecursionConfigInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetFunctionRecursionConfigInput"} + if v.FunctionName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FunctionName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetFunctionUrlConfigInput(v *GetFunctionUrlConfigInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetFunctionUrlConfigInput"} + if v.FunctionName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FunctionName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetLayerVersionByArnInput(v *GetLayerVersionByArnInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetLayerVersionByArnInput"} + if v.Arn == nil { + invalidParams.Add(smithy.NewErrParamRequired("Arn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetLayerVersionInput(v *GetLayerVersionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetLayerVersionInput"} + if v.LayerName == nil { + invalidParams.Add(smithy.NewErrParamRequired("LayerName")) + } + if v.VersionNumber == nil { + invalidParams.Add(smithy.NewErrParamRequired("VersionNumber")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetLayerVersionPolicyInput(v *GetLayerVersionPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetLayerVersionPolicyInput"} + if v.LayerName == nil { + invalidParams.Add(smithy.NewErrParamRequired("LayerName")) + } + if v.VersionNumber == nil { + invalidParams.Add(smithy.NewErrParamRequired("VersionNumber")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetPolicyInput(v *GetPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetPolicyInput"} + if v.FunctionName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FunctionName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetProvisionedConcurrencyConfigInput(v *GetProvisionedConcurrencyConfigInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetProvisionedConcurrencyConfigInput"} + if v.FunctionName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FunctionName")) + } + if v.Qualifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Qualifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetRuntimeManagementConfigInput(v *GetRuntimeManagementConfigInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetRuntimeManagementConfigInput"} + if v.FunctionName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FunctionName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpInvokeAsyncInput(v *InvokeAsyncInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "InvokeAsyncInput"} + if v.FunctionName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FunctionName")) + } + if v.InvokeArgs == nil { + invalidParams.Add(smithy.NewErrParamRequired("InvokeArgs")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpInvokeInput(v *InvokeInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "InvokeInput"} + if v.FunctionName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FunctionName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpInvokeWithResponseStreamInput(v *InvokeWithResponseStreamInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "InvokeWithResponseStreamInput"} + if v.FunctionName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FunctionName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListAliasesInput(v *ListAliasesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListAliasesInput"} + if v.FunctionName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FunctionName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListFunctionEventInvokeConfigsInput(v *ListFunctionEventInvokeConfigsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListFunctionEventInvokeConfigsInput"} + if v.FunctionName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FunctionName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListFunctionsByCodeSigningConfigInput(v *ListFunctionsByCodeSigningConfigInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListFunctionsByCodeSigningConfigInput"} + if v.CodeSigningConfigArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("CodeSigningConfigArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListFunctionUrlConfigsInput(v *ListFunctionUrlConfigsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListFunctionUrlConfigsInput"} + if v.FunctionName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FunctionName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListLayerVersionsInput(v *ListLayerVersionsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListLayerVersionsInput"} + if v.LayerName == nil { + invalidParams.Add(smithy.NewErrParamRequired("LayerName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListProvisionedConcurrencyConfigsInput(v *ListProvisionedConcurrencyConfigsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListProvisionedConcurrencyConfigsInput"} + if v.FunctionName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FunctionName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListTagsInput(v *ListTagsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListTagsInput"} + if v.Resource == nil { + invalidParams.Add(smithy.NewErrParamRequired("Resource")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListVersionsByFunctionInput(v *ListVersionsByFunctionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListVersionsByFunctionInput"} + if v.FunctionName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FunctionName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpPublishLayerVersionInput(v *PublishLayerVersionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PublishLayerVersionInput"} + if v.LayerName == nil { + invalidParams.Add(smithy.NewErrParamRequired("LayerName")) + } + if v.Content == nil { + invalidParams.Add(smithy.NewErrParamRequired("Content")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpPublishVersionInput(v *PublishVersionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PublishVersionInput"} + if v.FunctionName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FunctionName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpPutFunctionCodeSigningConfigInput(v *PutFunctionCodeSigningConfigInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutFunctionCodeSigningConfigInput"} + if v.CodeSigningConfigArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("CodeSigningConfigArn")) + } + if v.FunctionName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FunctionName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpPutFunctionConcurrencyInput(v *PutFunctionConcurrencyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutFunctionConcurrencyInput"} + if v.FunctionName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FunctionName")) + } + if v.ReservedConcurrentExecutions == nil { + invalidParams.Add(smithy.NewErrParamRequired("ReservedConcurrentExecutions")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpPutFunctionEventInvokeConfigInput(v *PutFunctionEventInvokeConfigInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutFunctionEventInvokeConfigInput"} + if v.FunctionName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FunctionName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpPutFunctionRecursionConfigInput(v *PutFunctionRecursionConfigInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutFunctionRecursionConfigInput"} + if v.FunctionName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FunctionName")) + } + if len(v.RecursiveLoop) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("RecursiveLoop")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpPutProvisionedConcurrencyConfigInput(v *PutProvisionedConcurrencyConfigInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutProvisionedConcurrencyConfigInput"} + if v.FunctionName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FunctionName")) + } + if v.Qualifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Qualifier")) + } + if v.ProvisionedConcurrentExecutions == nil { + invalidParams.Add(smithy.NewErrParamRequired("ProvisionedConcurrentExecutions")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpPutRuntimeManagementConfigInput(v *PutRuntimeManagementConfigInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutRuntimeManagementConfigInput"} + if v.FunctionName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FunctionName")) + } + if len(v.UpdateRuntimeOn) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("UpdateRuntimeOn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpRemoveLayerVersionPermissionInput(v *RemoveLayerVersionPermissionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RemoveLayerVersionPermissionInput"} + if v.LayerName == nil { + invalidParams.Add(smithy.NewErrParamRequired("LayerName")) + } + if v.VersionNumber == nil { + invalidParams.Add(smithy.NewErrParamRequired("VersionNumber")) + } + if v.StatementId == nil { + invalidParams.Add(smithy.NewErrParamRequired("StatementId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpRemovePermissionInput(v *RemovePermissionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RemovePermissionInput"} + if v.FunctionName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FunctionName")) + } + if v.StatementId == nil { + invalidParams.Add(smithy.NewErrParamRequired("StatementId")) + } + 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.Resource == nil { + invalidParams.Add(smithy.NewErrParamRequired("Resource")) + } + 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.Resource == nil { + invalidParams.Add(smithy.NewErrParamRequired("Resource")) + } + if v.TagKeys == nil { + invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateAliasInput(v *UpdateAliasInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateAliasInput"} + if v.FunctionName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FunctionName")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateCodeSigningConfigInput(v *UpdateCodeSigningConfigInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateCodeSigningConfigInput"} + if v.CodeSigningConfigArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("CodeSigningConfigArn")) + } + if v.AllowedPublishers != nil { + if err := validateAllowedPublishers(v.AllowedPublishers); err != nil { + invalidParams.AddNested("AllowedPublishers", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateEventSourceMappingInput(v *UpdateEventSourceMappingInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateEventSourceMappingInput"} + if v.UUID == nil { + invalidParams.Add(smithy.NewErrParamRequired("UUID")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateFunctionCodeInput(v *UpdateFunctionCodeInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateFunctionCodeInput"} + if v.FunctionName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FunctionName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateFunctionConfigurationInput(v *UpdateFunctionConfigurationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateFunctionConfigurationInput"} + if v.FunctionName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FunctionName")) + } + if v.FileSystemConfigs != nil { + if err := validateFileSystemConfigList(v.FileSystemConfigs); err != nil { + invalidParams.AddNested("FileSystemConfigs", err.(smithy.InvalidParamsError)) + } + } + if v.EphemeralStorage != nil { + if err := validateEphemeralStorage(v.EphemeralStorage); err != nil { + invalidParams.AddNested("EphemeralStorage", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateFunctionEventInvokeConfigInput(v *UpdateFunctionEventInvokeConfigInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateFunctionEventInvokeConfigInput"} + if v.FunctionName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FunctionName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateFunctionUrlConfigInput(v *UpdateFunctionUrlConfigInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateFunctionUrlConfigInput"} + if v.FunctionName == nil { + invalidParams.Add(smithy.NewErrParamRequired("FunctionName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} diff --git a/vendor/github.com/conductorone/baton-sdk/internal/connector/connector.go b/vendor/github.com/conductorone/baton-sdk/internal/connector/connector.go index 04fb83ad..45642ad3 100644 --- a/vendor/github.com/conductorone/baton-sdk/internal/connector/connector.go +++ b/vendor/github.com/conductorone/baton-sdk/internal/connector/connector.go @@ -35,6 +35,7 @@ const listenerFdEnv = "BATON_CONNECTOR_SERVICE_LISTENER_FD" type connectorClient struct { connectorV2.ResourceTypesServiceClient connectorV2.ResourcesServiceClient + connectorV2.ResourceGetterServiceClient connectorV2.EntitlementsServiceClient connectorV2.GrantsServiceClient connectorV2.ConnectorServiceClient @@ -42,10 +43,12 @@ type connectorClient struct { ratelimitV1.RateLimiterServiceClient connectorV2.GrantManagerServiceClient connectorV2.ResourceManagerServiceClient + connectorV2.ResourceDeleterServiceClient connectorV2.AccountManagerServiceClient connectorV2.CredentialManagerServiceClient connectorV2.EventServiceClient connectorV2.TicketsServiceClient + connectorV2.ActionServiceClient } var ErrConnectorNotImplemented = errors.New("client does not implement connector connectorV2") @@ -53,13 +56,14 @@ var ErrConnectorNotImplemented = errors.New("client does not implement connector type wrapper struct { mtx sync.RWMutex - server types.ConnectorServer - client types.ConnectorClient - serverStdin io.WriteCloser - conn *grpc.ClientConn - provisioningEnabled bool - ticketingEnabled bool - fullSyncDisabled bool + server types.ConnectorServer + client types.ConnectorClient + serverStdin io.WriteCloser + conn *grpc.ClientConn + provisioningEnabled bool + ticketingEnabled bool + fullSyncDisabled bool + targetedSyncResourceIDs []string rateLimiter ratelimitV1.RateLimiterServiceServer rlCfg *ratelimitV1.RateLimiterConfig @@ -113,6 +117,13 @@ func WithTicketingEnabled() Option { } } +func WithTargetedSyncResourceIDs(resourceIDs []string) Option { + return func(ctx context.Context, w *wrapper) error { + w.targetedSyncResourceIDs = resourceIDs + return nil + } +} + // NewConnectorWrapper returns a connector wrapper for running connector services locally. func NewWrapper(ctx context.Context, server interface{}, opts ...Option) (*wrapper, error) { connectorServer, isServer := server.(types.ConnectorServer) @@ -163,42 +174,18 @@ func (cw *wrapper) Run(ctx context.Context, serverCfg *connectorwrapperV1.Server ), )), ) - connectorV2.RegisterConnectorServiceServer(server, cw.server) - connectorV2.RegisterGrantsServiceServer(server, cw.server) - connectorV2.RegisterEntitlementsServiceServer(server, cw.server) - connectorV2.RegisterResourcesServiceServer(server, cw.server) - connectorV2.RegisterResourceTypesServiceServer(server, cw.server) - connectorV2.RegisterAssetServiceServer(server, cw.server) - connectorV2.RegisterEventServiceServer(server, cw.server) - - if cw.ticketingEnabled { - connectorV2.RegisterTicketsServiceServer(server, cw.server) - } else { - noop := &noopTicketing{} - connectorV2.RegisterTicketsServiceServer(server, noop) - } - - if cw.provisioningEnabled { - connectorV2.RegisterGrantManagerServiceServer(server, cw.server) - connectorV2.RegisterResourceManagerServiceServer(server, cw.server) - connectorV2.RegisterAccountManagerServiceServer(server, cw.server) - connectorV2.RegisterCredentialManagerServiceServer(server, cw.server) - } else { - noop := &noopProvisioner{} - connectorV2.RegisterGrantManagerServiceServer(server, noop) - connectorV2.RegisterResourceManagerServiceServer(server, noop) - connectorV2.RegisterAccountManagerServiceServer(server, noop) - connectorV2.RegisterCredentialManagerServiceServer(server, noop) - } rl, err := ratelimit2.NewLimiter(ctx, cw.now, serverCfg.RateLimiterConfig) if err != nil { return err } cw.rateLimiter = rl - - ratelimitV1.RegisterRateLimiterServiceServer(server, cw.rateLimiter) - + opts := &RegisterOps{ + Ratelimiter: cw.rateLimiter, + ProvisioningEnabled: cw.provisioningEnabled, + TicketingEnabled: cw.ticketingEnabled, + } + Register(ctx, server, cw.server, opts) return server.Serve(l) } @@ -344,23 +331,7 @@ func (cw *wrapper) C(ctx context.Context) (types.ConnectorClient, error) { } cw.conn = conn - - cw.client = &connectorClient{ - ResourceTypesServiceClient: connectorV2.NewResourceTypesServiceClient(cw.conn), - ResourcesServiceClient: connectorV2.NewResourcesServiceClient(cw.conn), - EntitlementsServiceClient: connectorV2.NewEntitlementsServiceClient(cw.conn), - GrantsServiceClient: connectorV2.NewGrantsServiceClient(cw.conn), - ConnectorServiceClient: connectorV2.NewConnectorServiceClient(cw.conn), - AssetServiceClient: connectorV2.NewAssetServiceClient(cw.conn), - RateLimiterServiceClient: ratelimitV1.NewRateLimiterServiceClient(cw.conn), - GrantManagerServiceClient: connectorV2.NewGrantManagerServiceClient(cw.conn), - ResourceManagerServiceClient: connectorV2.NewResourceManagerServiceClient(cw.conn), - AccountManagerServiceClient: connectorV2.NewAccountManagerServiceClient(cw.conn), - CredentialManagerServiceClient: connectorV2.NewCredentialManagerServiceClient(cw.conn), - EventServiceClient: connectorV2.NewEventServiceClient(cw.conn), - TicketsServiceClient: connectorV2.NewTicketsServiceClient(cw.conn), - } - + cw.client = NewConnectorClient(ctx, cw.conn) return cw.client, nil } @@ -391,3 +362,75 @@ func (cw *wrapper) Close() error { return nil } + +type RegisterOps struct { + Ratelimiter ratelimitV1.RateLimiterServiceServer + ProvisioningEnabled bool + TicketingEnabled bool +} + +func Register(ctx context.Context, s grpc.ServiceRegistrar, srv types.ConnectorServer, opts *RegisterOps) { + if opts == nil { + opts = &RegisterOps{} + } + + connectorV2.RegisterConnectorServiceServer(s, srv) + connectorV2.RegisterGrantsServiceServer(s, srv) + connectorV2.RegisterEntitlementsServiceServer(s, srv) + connectorV2.RegisterResourcesServiceServer(s, srv) + connectorV2.RegisterResourceTypesServiceServer(s, srv) + connectorV2.RegisterAssetServiceServer(s, srv) + connectorV2.RegisterEventServiceServer(s, srv) + connectorV2.RegisterResourceGetterServiceServer(s, srv) + + if opts.TicketingEnabled { + connectorV2.RegisterTicketsServiceServer(s, srv) + } else { + noop := &noopTicketing{} + connectorV2.RegisterTicketsServiceServer(s, noop) + } + + connectorV2.RegisterActionServiceServer(s, srv) + + if opts.ProvisioningEnabled { + connectorV2.RegisterGrantManagerServiceServer(s, srv) + connectorV2.RegisterResourceManagerServiceServer(s, srv) + connectorV2.RegisterResourceDeleterServiceServer(s, srv) + connectorV2.RegisterAccountManagerServiceServer(s, srv) + connectorV2.RegisterCredentialManagerServiceServer(s, srv) + } else { + noop := &noopProvisioner{} + connectorV2.RegisterGrantManagerServiceServer(s, noop) + connectorV2.RegisterResourceManagerServiceServer(s, noop) + connectorV2.RegisterResourceDeleterServiceServer(s, noop) + connectorV2.RegisterAccountManagerServiceServer(s, noop) + connectorV2.RegisterCredentialManagerServiceServer(s, noop) + } + + if opts.Ratelimiter != nil { + ratelimitV1.RegisterRateLimiterServiceServer(s, opts.Ratelimiter) + } +} + +// NewConnectorClient takes a grpc.ClientConnInterface and returns an implementation of the ConnectorClient interface. +// It does not check that the connection actually supports the services. +func NewConnectorClient(ctx context.Context, cc grpc.ClientConnInterface) types.ConnectorClient { + return &connectorClient{ + ResourceTypesServiceClient: connectorV2.NewResourceTypesServiceClient(cc), + ResourcesServiceClient: connectorV2.NewResourcesServiceClient(cc), + EntitlementsServiceClient: connectorV2.NewEntitlementsServiceClient(cc), + GrantsServiceClient: connectorV2.NewGrantsServiceClient(cc), + ConnectorServiceClient: connectorV2.NewConnectorServiceClient(cc), + AssetServiceClient: connectorV2.NewAssetServiceClient(cc), + RateLimiterServiceClient: ratelimitV1.NewRateLimiterServiceClient(cc), + GrantManagerServiceClient: connectorV2.NewGrantManagerServiceClient(cc), + ResourceManagerServiceClient: connectorV2.NewResourceManagerServiceClient(cc), + ResourceDeleterServiceClient: connectorV2.NewResourceDeleterServiceClient(cc), + AccountManagerServiceClient: connectorV2.NewAccountManagerServiceClient(cc), + CredentialManagerServiceClient: connectorV2.NewCredentialManagerServiceClient(cc), + EventServiceClient: connectorV2.NewEventServiceClient(cc), + TicketsServiceClient: connectorV2.NewTicketsServiceClient(cc), + ActionServiceClient: connectorV2.NewActionServiceClient(cc), + ResourceGetterServiceClient: connectorV2.NewResourceGetterServiceClient(cc), + } +} diff --git a/vendor/github.com/conductorone/baton-sdk/internal/connector/noop_provisioner.go b/vendor/github.com/conductorone/baton-sdk/internal/connector/noop_provisioner.go index 63b3b846..85f57ea9 100644 --- a/vendor/github.com/conductorone/baton-sdk/internal/connector/noop_provisioner.go +++ b/vendor/github.com/conductorone/baton-sdk/internal/connector/noop_provisioner.go @@ -26,6 +26,10 @@ func (n *noopProvisioner) DeleteResource(ctx context.Context, request *v2.Delete return nil, status.Error(codes.FailedPrecondition, "provisioning is not enabled") } +func (n *noopProvisioner) DeleteResourceV2(ctx context.Context, request *v2.DeleteResourceV2Request) (*v2.DeleteResourceV2Response, error) { + return nil, status.Error(codes.FailedPrecondition, "provisioning is not enabled") +} + func (n *noopProvisioner) RotateCredential(ctx context.Context, request *v2.RotateCredentialRequest) (*v2.RotateCredentialResponse, error) { return nil, status.Error(codes.FailedPrecondition, "provisioning is not enabled") } diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/config/v1/config.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/config/v1/config.pb.go new file mode 100644 index 00000000..ac5856b5 --- /dev/null +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/config/v1/config.pb.go @@ -0,0 +1,1107 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.4 +// protoc (unknown) +// source: c1/config/v1/config.proto + +package v1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + anypb "google.golang.org/protobuf/types/known/anypb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ConstraintKind int32 + +const ( + ConstraintKind_CONSTRAINT_KIND_UNSPECIFIED ConstraintKind = 0 + ConstraintKind_CONSTRAINT_KIND_REQUIRED_TOGETHER ConstraintKind = 1 + ConstraintKind_CONSTRAINT_KIND_AT_LEAST_ONE ConstraintKind = 2 + ConstraintKind_CONSTRAINT_KIND_MUTUALLY_EXCLUSIVE ConstraintKind = 3 + ConstraintKind_CONSTRAINT_KIND_DEPENDENT_ON ConstraintKind = 4 +) + +// Enum value maps for ConstraintKind. +var ( + ConstraintKind_name = map[int32]string{ + 0: "CONSTRAINT_KIND_UNSPECIFIED", + 1: "CONSTRAINT_KIND_REQUIRED_TOGETHER", + 2: "CONSTRAINT_KIND_AT_LEAST_ONE", + 3: "CONSTRAINT_KIND_MUTUALLY_EXCLUSIVE", + 4: "CONSTRAINT_KIND_DEPENDENT_ON", + } + ConstraintKind_value = map[string]int32{ + "CONSTRAINT_KIND_UNSPECIFIED": 0, + "CONSTRAINT_KIND_REQUIRED_TOGETHER": 1, + "CONSTRAINT_KIND_AT_LEAST_ONE": 2, + "CONSTRAINT_KIND_MUTUALLY_EXCLUSIVE": 3, + "CONSTRAINT_KIND_DEPENDENT_ON": 4, + } +) + +func (x ConstraintKind) Enum() *ConstraintKind { + p := new(ConstraintKind) + *p = x + return p +} + +func (x ConstraintKind) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ConstraintKind) Descriptor() protoreflect.EnumDescriptor { + return file_c1_config_v1_config_proto_enumTypes[0].Descriptor() +} + +func (ConstraintKind) Type() protoreflect.EnumType { + return &file_c1_config_v1_config_proto_enumTypes[0] +} + +func (x ConstraintKind) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ConstraintKind.Descriptor instead. +func (ConstraintKind) EnumDescriptor() ([]byte, []int) { + return file_c1_config_v1_config_proto_rawDescGZIP(), []int{0} +} + +type StringFieldType int32 + +const ( + StringFieldType_STRING_FIELD_TYPE_TEXT_UNSPECIFIED StringFieldType = 0 // default/catch all. Its a text field. + StringFieldType_STRING_FIELD_TYPE_RANDOM StringFieldType = 1 + StringFieldType_STRING_FIELD_TYPE_OAUTH2 StringFieldType = 2 + StringFieldType_STRING_FIELD_TYPE_CONNECTOR_DERIVED_OPTIONS StringFieldType = 3 + StringFieldType_STRING_FIELD_TYPE_FILE_UPLOAD StringFieldType = 4 +) + +// Enum value maps for StringFieldType. +var ( + StringFieldType_name = map[int32]string{ + 0: "STRING_FIELD_TYPE_TEXT_UNSPECIFIED", + 1: "STRING_FIELD_TYPE_RANDOM", + 2: "STRING_FIELD_TYPE_OAUTH2", + 3: "STRING_FIELD_TYPE_CONNECTOR_DERIVED_OPTIONS", + 4: "STRING_FIELD_TYPE_FILE_UPLOAD", + } + StringFieldType_value = map[string]int32{ + "STRING_FIELD_TYPE_TEXT_UNSPECIFIED": 0, + "STRING_FIELD_TYPE_RANDOM": 1, + "STRING_FIELD_TYPE_OAUTH2": 2, + "STRING_FIELD_TYPE_CONNECTOR_DERIVED_OPTIONS": 3, + "STRING_FIELD_TYPE_FILE_UPLOAD": 4, + } +) + +func (x StringFieldType) Enum() *StringFieldType { + p := new(StringFieldType) + *p = x + return p +} + +func (x StringFieldType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (StringFieldType) Descriptor() protoreflect.EnumDescriptor { + return file_c1_config_v1_config_proto_enumTypes[1].Descriptor() +} + +func (StringFieldType) Type() protoreflect.EnumType { + return &file_c1_config_v1_config_proto_enumTypes[1] +} + +func (x StringFieldType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use StringFieldType.Descriptor instead. +func (StringFieldType) EnumDescriptor() ([]byte, []int) { + return file_c1_config_v1_config_proto_rawDescGZIP(), []int{1} +} + +type Configuration struct { + state protoimpl.MessageState `protogen:"open.v1"` + Fields []*Field `protobuf:"bytes,1,rep,name=fields,proto3" json:"fields,omitempty"` + Constraints []*Constraint `protobuf:"bytes,2,rep,name=constraints,proto3" json:"constraints,omitempty"` + DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + HelpUrl string `protobuf:"bytes,4,opt,name=help_url,json=helpUrl,proto3" json:"help_url,omitempty"` + IconUrl string `protobuf:"bytes,5,opt,name=icon_url,json=iconUrl,proto3" json:"icon_url,omitempty"` + IsDirectory bool `protobuf:"varint,7,opt,name=is_directory,json=isDirectory,proto3" json:"is_directory,omitempty"` + CatalogId string `protobuf:"bytes,8,opt,name=catalog_id,json=catalogId,proto3" json:"catalog_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Configuration) Reset() { + *x = Configuration{} + mi := &file_c1_config_v1_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Configuration) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Configuration) ProtoMessage() {} + +func (x *Configuration) ProtoReflect() protoreflect.Message { + mi := &file_c1_config_v1_config_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Configuration.ProtoReflect.Descriptor instead. +func (*Configuration) Descriptor() ([]byte, []int) { + return file_c1_config_v1_config_proto_rawDescGZIP(), []int{0} +} + +func (x *Configuration) GetFields() []*Field { + if x != nil { + return x.Fields + } + return nil +} + +func (x *Configuration) GetConstraints() []*Constraint { + if x != nil { + return x.Constraints + } + return nil +} + +func (x *Configuration) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *Configuration) GetHelpUrl() string { + if x != nil { + return x.HelpUrl + } + return "" +} + +func (x *Configuration) GetIconUrl() string { + if x != nil { + return x.IconUrl + } + return "" +} + +func (x *Configuration) GetIsDirectory() bool { + if x != nil { + return x.IsDirectory + } + return false +} + +func (x *Configuration) GetCatalogId() string { + if x != nil { + return x.CatalogId + } + return "" +} + +type Constraint struct { + state protoimpl.MessageState `protogen:"open.v1"` + Kind ConstraintKind `protobuf:"varint,1,opt,name=kind,proto3,enum=c1.config.v1.ConstraintKind" json:"kind,omitempty"` + FieldNames []string `protobuf:"bytes,2,rep,name=field_names,json=fieldNames,proto3" json:"field_names,omitempty"` + SecondaryFieldNames []string `protobuf:"bytes,3,rep,name=secondary_field_names,json=secondaryFieldNames,proto3" json:"secondary_field_names,omitempty"` + Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` // optional + HelpText string `protobuf:"bytes,5,opt,name=help_text,json=helpText,proto3" json:"help_text,omitempty"` // optional + IsFieldGroup bool `protobuf:"varint,6,opt,name=is_field_group,json=isFieldGroup,proto3" json:"is_field_group,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Constraint) Reset() { + *x = Constraint{} + mi := &file_c1_config_v1_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Constraint) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Constraint) ProtoMessage() {} + +func (x *Constraint) ProtoReflect() protoreflect.Message { + mi := &file_c1_config_v1_config_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Constraint.ProtoReflect.Descriptor instead. +func (*Constraint) Descriptor() ([]byte, []int) { + return file_c1_config_v1_config_proto_rawDescGZIP(), []int{1} +} + +func (x *Constraint) GetKind() ConstraintKind { + if x != nil { + return x.Kind + } + return ConstraintKind_CONSTRAINT_KIND_UNSPECIFIED +} + +func (x *Constraint) GetFieldNames() []string { + if x != nil { + return x.FieldNames + } + return nil +} + +func (x *Constraint) GetSecondaryFieldNames() []string { + if x != nil { + return x.SecondaryFieldNames + } + return nil +} + +func (x *Constraint) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Constraint) GetHelpText() string { + if x != nil { + return x.HelpText + } + return "" +} + +func (x *Constraint) GetIsFieldGroup() bool { + if x != nil { + return x.IsFieldGroup + } + return false +} + +type Field struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // canonical name, typically in snake + DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + Placeholder string `protobuf:"bytes,4,opt,name=placeholder,proto3" json:"placeholder,omitempty"` + IsRequired bool `protobuf:"varint,5,opt,name=is_required,json=isRequired,proto3" json:"is_required,omitempty"` + IsOps bool `protobuf:"varint,6,opt,name=is_ops,json=isOps,proto3" json:"is_ops,omitempty"` + IsSecret bool `protobuf:"varint,7,opt,name=is_secret,json=isSecret,proto3" json:"is_secret,omitempty"` + // Types that are valid to be assigned to Field: + // + // *Field_StringField + // *Field_IntField + // *Field_BoolField + // *Field_StringSliceField + // *Field_StringMapField + Field isField_Field `protobuf_oneof:"field"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Field) Reset() { + *x = Field{} + mi := &file_c1_config_v1_config_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Field) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Field) ProtoMessage() {} + +func (x *Field) ProtoReflect() protoreflect.Message { + mi := &file_c1_config_v1_config_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Field.ProtoReflect.Descriptor instead. +func (*Field) Descriptor() ([]byte, []int) { + return file_c1_config_v1_config_proto_rawDescGZIP(), []int{2} +} + +func (x *Field) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Field) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *Field) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Field) GetPlaceholder() string { + if x != nil { + return x.Placeholder + } + return "" +} + +func (x *Field) GetIsRequired() bool { + if x != nil { + return x.IsRequired + } + return false +} + +func (x *Field) GetIsOps() bool { + if x != nil { + return x.IsOps + } + return false +} + +func (x *Field) GetIsSecret() bool { + if x != nil { + return x.IsSecret + } + return false +} + +func (x *Field) GetField() isField_Field { + if x != nil { + return x.Field + } + return nil +} + +func (x *Field) GetStringField() *StringField { + if x != nil { + if x, ok := x.Field.(*Field_StringField); ok { + return x.StringField + } + } + return nil +} + +func (x *Field) GetIntField() *IntField { + if x != nil { + if x, ok := x.Field.(*Field_IntField); ok { + return x.IntField + } + } + return nil +} + +func (x *Field) GetBoolField() *BoolField { + if x != nil { + if x, ok := x.Field.(*Field_BoolField); ok { + return x.BoolField + } + } + return nil +} + +func (x *Field) GetStringSliceField() *StringSliceField { + if x != nil { + if x, ok := x.Field.(*Field_StringSliceField); ok { + return x.StringSliceField + } + } + return nil +} + +func (x *Field) GetStringMapField() *StringMapField { + if x != nil { + if x, ok := x.Field.(*Field_StringMapField); ok { + return x.StringMapField + } + } + return nil +} + +type isField_Field interface { + isField_Field() +} + +type Field_StringField struct { + StringField *StringField `protobuf:"bytes,100,opt,name=string_field,json=stringField,proto3,oneof"` +} + +type Field_IntField struct { + IntField *IntField `protobuf:"bytes,101,opt,name=int_field,json=intField,proto3,oneof"` +} + +type Field_BoolField struct { + BoolField *BoolField `protobuf:"bytes,102,opt,name=bool_field,json=boolField,proto3,oneof"` +} + +type Field_StringSliceField struct { + StringSliceField *StringSliceField `protobuf:"bytes,103,opt,name=string_slice_field,json=stringSliceField,proto3,oneof"` +} + +type Field_StringMapField struct { + StringMapField *StringMapField `protobuf:"bytes,104,opt,name=string_map_field,json=stringMapField,proto3,oneof"` +} + +func (*Field_StringField) isField_Field() {} + +func (*Field_IntField) isField_Field() {} + +func (*Field_BoolField) isField_Field() {} + +func (*Field_StringSliceField) isField_Field() {} + +func (*Field_StringMapField) isField_Field() {} + +type IntField struct { + state protoimpl.MessageState `protogen:"open.v1"` + // rules + DefaultValue int64 `protobuf:"varint,1,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` + Rules *Int64Rules `protobuf:"bytes,2,opt,name=rules,proto3,oneof" json:"rules,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *IntField) Reset() { + *x = IntField{} + mi := &file_c1_config_v1_config_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *IntField) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IntField) ProtoMessage() {} + +func (x *IntField) ProtoReflect() protoreflect.Message { + mi := &file_c1_config_v1_config_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IntField.ProtoReflect.Descriptor instead. +func (*IntField) Descriptor() ([]byte, []int) { + return file_c1_config_v1_config_proto_rawDescGZIP(), []int{3} +} + +func (x *IntField) GetDefaultValue() int64 { + if x != nil { + return x.DefaultValue + } + return 0 +} + +func (x *IntField) GetRules() *Int64Rules { + if x != nil { + return x.Rules + } + return nil +} + +type BoolField struct { + state protoimpl.MessageState `protogen:"open.v1"` + DefaultValue bool `protobuf:"varint,1,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` + Rules *BoolRules `protobuf:"bytes,2,opt,name=rules,proto3,oneof" json:"rules,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BoolField) Reset() { + *x = BoolField{} + mi := &file_c1_config_v1_config_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BoolField) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BoolField) ProtoMessage() {} + +func (x *BoolField) ProtoReflect() protoreflect.Message { + mi := &file_c1_config_v1_config_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BoolField.ProtoReflect.Descriptor instead. +func (*BoolField) Descriptor() ([]byte, []int) { + return file_c1_config_v1_config_proto_rawDescGZIP(), []int{4} +} + +func (x *BoolField) GetDefaultValue() bool { + if x != nil { + return x.DefaultValue + } + return false +} + +func (x *BoolField) GetRules() *BoolRules { + if x != nil { + return x.Rules + } + return nil +} + +type StringSliceField struct { + state protoimpl.MessageState `protogen:"open.v1"` + DefaultValue []string `protobuf:"bytes,1,rep,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` + Rules *RepeatedStringRules `protobuf:"bytes,2,opt,name=rules,proto3,oneof" json:"rules,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StringSliceField) Reset() { + *x = StringSliceField{} + mi := &file_c1_config_v1_config_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StringSliceField) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StringSliceField) ProtoMessage() {} + +func (x *StringSliceField) ProtoReflect() protoreflect.Message { + mi := &file_c1_config_v1_config_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StringSliceField.ProtoReflect.Descriptor instead. +func (*StringSliceField) Descriptor() ([]byte, []int) { + return file_c1_config_v1_config_proto_rawDescGZIP(), []int{5} +} + +func (x *StringSliceField) GetDefaultValue() []string { + if x != nil { + return x.DefaultValue + } + return nil +} + +func (x *StringSliceField) GetRules() *RepeatedStringRules { + if x != nil { + return x.Rules + } + return nil +} + +type StringMapField struct { + state protoimpl.MessageState `protogen:"open.v1"` + DefaultValue map[string]*anypb.Any `protobuf:"bytes,1,rep,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Rules *StringMapRules `protobuf:"bytes,2,opt,name=rules,proto3,oneof" json:"rules,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StringMapField) Reset() { + *x = StringMapField{} + mi := &file_c1_config_v1_config_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StringMapField) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StringMapField) ProtoMessage() {} + +func (x *StringMapField) ProtoReflect() protoreflect.Message { + mi := &file_c1_config_v1_config_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StringMapField.ProtoReflect.Descriptor instead. +func (*StringMapField) Descriptor() ([]byte, []int) { + return file_c1_config_v1_config_proto_rawDescGZIP(), []int{6} +} + +func (x *StringMapField) GetDefaultValue() map[string]*anypb.Any { + if x != nil { + return x.DefaultValue + } + return nil +} + +func (x *StringMapField) GetRules() *StringMapRules { + if x != nil { + return x.Rules + } + return nil +} + +type StringFieldOption struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StringFieldOption) Reset() { + *x = StringFieldOption{} + mi := &file_c1_config_v1_config_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StringFieldOption) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StringFieldOption) ProtoMessage() {} + +func (x *StringFieldOption) ProtoReflect() protoreflect.Message { + mi := &file_c1_config_v1_config_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StringFieldOption.ProtoReflect.Descriptor instead. +func (*StringFieldOption) Descriptor() ([]byte, []int) { + return file_c1_config_v1_config_proto_rawDescGZIP(), []int{7} +} + +func (x *StringFieldOption) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *StringFieldOption) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +func (x *StringFieldOption) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +type StringField struct { + state protoimpl.MessageState `protogen:"open.v1"` + DefaultValue string `protobuf:"bytes,1,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` + Rules *StringRules `protobuf:"bytes,2,opt,name=rules,proto3,oneof" json:"rules,omitempty"` + Type StringFieldType `protobuf:"varint,3,opt,name=type,proto3,enum=c1.config.v1.StringFieldType" json:"type,omitempty"` + // only used for FileUpload atm, oneofs are evil + AllowedExtensions []string `protobuf:"bytes,4,rep,name=allowed_extensions,json=allowedExtensions,proto3" json:"allowed_extensions,omitempty"` + Options []*StringFieldOption `protobuf:"bytes,5,rep,name=options,proto3" json:"options,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StringField) Reset() { + *x = StringField{} + mi := &file_c1_config_v1_config_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StringField) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StringField) ProtoMessage() {} + +func (x *StringField) ProtoReflect() protoreflect.Message { + mi := &file_c1_config_v1_config_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StringField.ProtoReflect.Descriptor instead. +func (*StringField) Descriptor() ([]byte, []int) { + return file_c1_config_v1_config_proto_rawDescGZIP(), []int{8} +} + +func (x *StringField) GetDefaultValue() string { + if x != nil { + return x.DefaultValue + } + return "" +} + +func (x *StringField) GetRules() *StringRules { + if x != nil { + return x.Rules + } + return nil +} + +func (x *StringField) GetType() StringFieldType { + if x != nil { + return x.Type + } + return StringFieldType_STRING_FIELD_TYPE_TEXT_UNSPECIFIED +} + +func (x *StringField) GetAllowedExtensions() []string { + if x != nil { + return x.AllowedExtensions + } + return nil +} + +func (x *StringField) GetOptions() []*StringFieldOption { + if x != nil { + return x.Options + } + return nil +} + +var File_c1_config_v1_config_proto protoreflect.FileDescriptor + +var file_c1_config_v1_config_proto_rawDesc = string([]byte{ + 0x0a, 0x19, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x63, 0x31, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x1a, 0x18, 0x63, 0x31, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x93, + 0x02, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x2b, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x13, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x3a, 0x0a, + 0x0b, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, + 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x52, 0x0b, 0x63, 0x6f, + 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, + 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, + 0x68, 0x65, 0x6c, 0x70, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x68, 0x65, 0x6c, 0x70, 0x55, 0x72, 0x6c, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x63, 0x6f, 0x6e, 0x5f, + 0x75, 0x72, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x69, 0x63, 0x6f, 0x6e, 0x55, + 0x72, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x44, 0x69, 0x72, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, + 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x61, 0x74, 0x61, 0x6c, + 0x6f, 0x67, 0x49, 0x64, 0x22, 0xea, 0x01, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, + 0x69, 0x6e, 0x74, 0x12, 0x30, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x1c, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, + 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x4b, 0x69, 0x6e, 0x64, 0x52, + 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x66, 0x69, 0x65, 0x6c, + 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, + 0x61, 0x72, 0x79, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x13, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1b, + 0x0a, 0x09, 0x68, 0x65, 0x6c, 0x70, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x68, 0x65, 0x6c, 0x70, 0x54, 0x65, 0x78, 0x74, 0x12, 0x24, 0x0a, 0x0e, 0x69, + 0x73, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x73, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x22, 0xab, 0x04, 0x0a, 0x05, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x68, 0x6f, 0x6c, + 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x6c, 0x61, 0x63, 0x65, + 0x68, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x72, 0x65, 0x71, + 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x69, 0x73, 0x5f, 0x6f, 0x70, + 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x69, 0x73, 0x4f, 0x70, 0x73, 0x12, 0x1b, + 0x0a, 0x09, 0x69, 0x73, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x08, 0x69, 0x73, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x3e, 0x0a, 0x0c, 0x73, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x64, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48, 0x00, 0x52, 0x0b, + 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x35, 0x0a, 0x09, 0x69, + 0x6e, 0x74, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, + 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, + 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48, 0x00, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x46, 0x69, 0x65, + 0x6c, 0x64, 0x12, 0x38, 0x0a, 0x0a, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, + 0x18, 0x66, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48, + 0x00, 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x4e, 0x0a, 0x12, + 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x5f, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x18, 0x67, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x53, 0x6c, + 0x69, 0x63, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48, 0x00, 0x52, 0x10, 0x73, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x53, 0x6c, 0x69, 0x63, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x48, 0x0a, 0x10, + 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x61, 0x70, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, + 0x18, 0x68, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x70, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x48, 0x00, 0x52, 0x0e, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, + 0x70, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x07, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x22, + 0x6e, 0x0a, 0x08, 0x49, 0x6e, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x64, + 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x12, 0x33, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x18, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x49, + 0x6e, 0x74, 0x36, 0x34, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x05, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x22, + 0x6e, 0x0a, 0x09, 0x42, 0x6f, 0x6f, 0x6c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x23, 0x0a, 0x0d, + 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x12, 0x32, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, + 0x42, 0x6f, 0x6f, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x05, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x22, + 0x7f, 0x0a, 0x10, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x53, 0x6c, 0x69, 0x63, 0x65, 0x46, 0x69, + 0x65, 0x6c, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3c, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x53, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x05, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x22, 0xff, 0x01, 0x0a, 0x0e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x70, 0x46, 0x69, + 0x65, 0x6c, 0x64, 0x12, 0x53, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x63, 0x31, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x4d, 0x61, 0x70, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x2e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x37, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x70, + 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x88, 0x01, + 0x01, 0x1a, 0x55, 0x0a, 0x11, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x22, 0x60, 0x0a, 0x11, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x69, 0x65, 0x6c, + 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, + 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x8f, 0x02, 0x0a, 0x0b, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, + 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x34, 0x0a, 0x05, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x75, + 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x88, 0x01, 0x01, 0x12, + 0x31, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, + 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, + 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x39, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x08, 0x0a, 0x06, + 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2a, 0xc4, 0x01, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x73, 0x74, + 0x72, 0x61, 0x69, 0x6e, 0x74, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x1f, 0x0a, 0x1b, 0x43, 0x4f, 0x4e, + 0x53, 0x54, 0x52, 0x41, 0x49, 0x4e, 0x54, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x25, 0x0a, 0x21, 0x43, 0x4f, + 0x4e, 0x53, 0x54, 0x52, 0x41, 0x49, 0x4e, 0x54, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x52, 0x45, + 0x51, 0x55, 0x49, 0x52, 0x45, 0x44, 0x5f, 0x54, 0x4f, 0x47, 0x45, 0x54, 0x48, 0x45, 0x52, 0x10, + 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x43, 0x4f, 0x4e, 0x53, 0x54, 0x52, 0x41, 0x49, 0x4e, 0x54, 0x5f, + 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x41, 0x54, 0x5f, 0x4c, 0x45, 0x41, 0x53, 0x54, 0x5f, 0x4f, 0x4e, + 0x45, 0x10, 0x02, 0x12, 0x26, 0x0a, 0x22, 0x43, 0x4f, 0x4e, 0x53, 0x54, 0x52, 0x41, 0x49, 0x4e, + 0x54, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x4d, 0x55, 0x54, 0x55, 0x41, 0x4c, 0x4c, 0x59, 0x5f, + 0x45, 0x58, 0x43, 0x4c, 0x55, 0x53, 0x49, 0x56, 0x45, 0x10, 0x03, 0x12, 0x20, 0x0a, 0x1c, 0x43, + 0x4f, 0x4e, 0x53, 0x54, 0x52, 0x41, 0x49, 0x4e, 0x54, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x44, + 0x45, 0x50, 0x45, 0x4e, 0x44, 0x45, 0x4e, 0x54, 0x5f, 0x4f, 0x4e, 0x10, 0x04, 0x2a, 0xc9, 0x01, + 0x0a, 0x0f, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x26, 0x0a, 0x22, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x46, 0x49, 0x45, 0x4c, + 0x44, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x45, 0x58, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, + 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x54, 0x52, + 0x49, 0x4e, 0x47, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, + 0x41, 0x4e, 0x44, 0x4f, 0x4d, 0x10, 0x01, 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x54, 0x52, 0x49, 0x4e, + 0x47, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x41, 0x55, + 0x54, 0x48, 0x32, 0x10, 0x02, 0x12, 0x2f, 0x0a, 0x2b, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, + 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x4e, 0x45, + 0x43, 0x54, 0x4f, 0x52, 0x5f, 0x44, 0x45, 0x52, 0x49, 0x56, 0x45, 0x44, 0x5f, 0x4f, 0x50, 0x54, + 0x49, 0x4f, 0x4e, 0x53, 0x10, 0x03, 0x12, 0x21, 0x0a, 0x1d, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, + 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x4c, 0x45, + 0x5f, 0x55, 0x50, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x04, 0x42, 0x33, 0x5a, 0x31, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, + 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, + 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x76, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +}) + +var ( + file_c1_config_v1_config_proto_rawDescOnce sync.Once + file_c1_config_v1_config_proto_rawDescData []byte +) + +func file_c1_config_v1_config_proto_rawDescGZIP() []byte { + file_c1_config_v1_config_proto_rawDescOnce.Do(func() { + file_c1_config_v1_config_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_c1_config_v1_config_proto_rawDesc), len(file_c1_config_v1_config_proto_rawDesc))) + }) + return file_c1_config_v1_config_proto_rawDescData +} + +var file_c1_config_v1_config_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_c1_config_v1_config_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_c1_config_v1_config_proto_goTypes = []any{ + (ConstraintKind)(0), // 0: c1.config.v1.ConstraintKind + (StringFieldType)(0), // 1: c1.config.v1.StringFieldType + (*Configuration)(nil), // 2: c1.config.v1.Configuration + (*Constraint)(nil), // 3: c1.config.v1.Constraint + (*Field)(nil), // 4: c1.config.v1.Field + (*IntField)(nil), // 5: c1.config.v1.IntField + (*BoolField)(nil), // 6: c1.config.v1.BoolField + (*StringSliceField)(nil), // 7: c1.config.v1.StringSliceField + (*StringMapField)(nil), // 8: c1.config.v1.StringMapField + (*StringFieldOption)(nil), // 9: c1.config.v1.StringFieldOption + (*StringField)(nil), // 10: c1.config.v1.StringField + nil, // 11: c1.config.v1.StringMapField.DefaultValueEntry + (*Int64Rules)(nil), // 12: c1.config.v1.Int64Rules + (*BoolRules)(nil), // 13: c1.config.v1.BoolRules + (*RepeatedStringRules)(nil), // 14: c1.config.v1.RepeatedStringRules + (*StringMapRules)(nil), // 15: c1.config.v1.StringMapRules + (*StringRules)(nil), // 16: c1.config.v1.StringRules + (*anypb.Any)(nil), // 17: google.protobuf.Any +} +var file_c1_config_v1_config_proto_depIdxs = []int32{ + 4, // 0: c1.config.v1.Configuration.fields:type_name -> c1.config.v1.Field + 3, // 1: c1.config.v1.Configuration.constraints:type_name -> c1.config.v1.Constraint + 0, // 2: c1.config.v1.Constraint.kind:type_name -> c1.config.v1.ConstraintKind + 10, // 3: c1.config.v1.Field.string_field:type_name -> c1.config.v1.StringField + 5, // 4: c1.config.v1.Field.int_field:type_name -> c1.config.v1.IntField + 6, // 5: c1.config.v1.Field.bool_field:type_name -> c1.config.v1.BoolField + 7, // 6: c1.config.v1.Field.string_slice_field:type_name -> c1.config.v1.StringSliceField + 8, // 7: c1.config.v1.Field.string_map_field:type_name -> c1.config.v1.StringMapField + 12, // 8: c1.config.v1.IntField.rules:type_name -> c1.config.v1.Int64Rules + 13, // 9: c1.config.v1.BoolField.rules:type_name -> c1.config.v1.BoolRules + 14, // 10: c1.config.v1.StringSliceField.rules:type_name -> c1.config.v1.RepeatedStringRules + 11, // 11: c1.config.v1.StringMapField.default_value:type_name -> c1.config.v1.StringMapField.DefaultValueEntry + 15, // 12: c1.config.v1.StringMapField.rules:type_name -> c1.config.v1.StringMapRules + 16, // 13: c1.config.v1.StringField.rules:type_name -> c1.config.v1.StringRules + 1, // 14: c1.config.v1.StringField.type:type_name -> c1.config.v1.StringFieldType + 9, // 15: c1.config.v1.StringField.options:type_name -> c1.config.v1.StringFieldOption + 17, // 16: c1.config.v1.StringMapField.DefaultValueEntry.value:type_name -> google.protobuf.Any + 17, // [17:17] is the sub-list for method output_type + 17, // [17:17] is the sub-list for method input_type + 17, // [17:17] is the sub-list for extension type_name + 17, // [17:17] is the sub-list for extension extendee + 0, // [0:17] is the sub-list for field type_name +} + +func init() { file_c1_config_v1_config_proto_init() } +func file_c1_config_v1_config_proto_init() { + if File_c1_config_v1_config_proto != nil { + return + } + file_c1_config_v1_rules_proto_init() + file_c1_config_v1_config_proto_msgTypes[2].OneofWrappers = []any{ + (*Field_StringField)(nil), + (*Field_IntField)(nil), + (*Field_BoolField)(nil), + (*Field_StringSliceField)(nil), + (*Field_StringMapField)(nil), + } + file_c1_config_v1_config_proto_msgTypes[3].OneofWrappers = []any{} + file_c1_config_v1_config_proto_msgTypes[4].OneofWrappers = []any{} + file_c1_config_v1_config_proto_msgTypes[5].OneofWrappers = []any{} + file_c1_config_v1_config_proto_msgTypes[6].OneofWrappers = []any{} + file_c1_config_v1_config_proto_msgTypes[8].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_config_v1_config_proto_rawDesc), len(file_c1_config_v1_config_proto_rawDesc)), + NumEnums: 2, + NumMessages: 10, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_c1_config_v1_config_proto_goTypes, + DependencyIndexes: file_c1_config_v1_config_proto_depIdxs, + EnumInfos: file_c1_config_v1_config_proto_enumTypes, + MessageInfos: file_c1_config_v1_config_proto_msgTypes, + }.Build() + File_c1_config_v1_config_proto = out.File + file_c1_config_v1_config_proto_goTypes = nil + file_c1_config_v1_config_proto_depIdxs = nil +} diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/config/v1/config.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/config/v1/config.pb.validate.go new file mode 100644 index 00000000..c97b1e8f --- /dev/null +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/config/v1/config.pb.validate.go @@ -0,0 +1,1501 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: c1/config/v1/config.proto + +package v1 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Configuration with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *Configuration) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Configuration with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ConfigurationMultiError, or +// nil if none found. +func (m *Configuration) ValidateAll() error { + return m.validate(true) +} + +func (m *Configuration) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetFields() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ConfigurationValidationError{ + field: fmt.Sprintf("Fields[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ConfigurationValidationError{ + field: fmt.Sprintf("Fields[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ConfigurationValidationError{ + field: fmt.Sprintf("Fields[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for idx, item := range m.GetConstraints() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ConfigurationValidationError{ + field: fmt.Sprintf("Constraints[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ConfigurationValidationError{ + field: fmt.Sprintf("Constraints[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ConfigurationValidationError{ + field: fmt.Sprintf("Constraints[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + // no validation rules for DisplayName + + // no validation rules for HelpUrl + + // no validation rules for IconUrl + + // no validation rules for IsDirectory + + // no validation rules for CatalogId + + if len(errors) > 0 { + return ConfigurationMultiError(errors) + } + + return nil +} + +// ConfigurationMultiError is an error wrapping multiple validation errors +// returned by Configuration.ValidateAll() if the designated constraints +// aren't met. +type ConfigurationMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ConfigurationMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ConfigurationMultiError) AllErrors() []error { return m } + +// ConfigurationValidationError is the validation error returned by +// Configuration.Validate if the designated constraints aren't met. +type ConfigurationValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ConfigurationValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ConfigurationValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ConfigurationValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ConfigurationValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ConfigurationValidationError) ErrorName() string { return "ConfigurationValidationError" } + +// Error satisfies the builtin error interface +func (e ConfigurationValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sConfiguration.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ConfigurationValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ConfigurationValidationError{} + +// Validate checks the field values on Constraint with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *Constraint) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Constraint with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ConstraintMultiError, or +// nil if none found. +func (m *Constraint) ValidateAll() error { + return m.validate(true) +} + +func (m *Constraint) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Kind + + // no validation rules for Name + + // no validation rules for HelpText + + // no validation rules for IsFieldGroup + + if len(errors) > 0 { + return ConstraintMultiError(errors) + } + + return nil +} + +// ConstraintMultiError is an error wrapping multiple validation errors +// returned by Constraint.ValidateAll() if the designated constraints aren't met. +type ConstraintMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ConstraintMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ConstraintMultiError) AllErrors() []error { return m } + +// ConstraintValidationError is the validation error returned by +// Constraint.Validate if the designated constraints aren't met. +type ConstraintValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ConstraintValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ConstraintValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ConstraintValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ConstraintValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ConstraintValidationError) ErrorName() string { return "ConstraintValidationError" } + +// Error satisfies the builtin error interface +func (e ConstraintValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sConstraint.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ConstraintValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ConstraintValidationError{} + +// Validate checks the field values on Field with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *Field) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Field with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in FieldMultiError, or nil if none found. +func (m *Field) ValidateAll() error { + return m.validate(true) +} + +func (m *Field) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Name + + // no validation rules for DisplayName + + // no validation rules for Description + + // no validation rules for Placeholder + + // no validation rules for IsRequired + + // no validation rules for IsOps + + // no validation rules for IsSecret + + switch v := m.Field.(type) { + case *Field_StringField: + if v == nil { + err := FieldValidationError{ + field: "Field", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetStringField()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FieldValidationError{ + field: "StringField", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FieldValidationError{ + field: "StringField", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStringField()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FieldValidationError{ + field: "StringField", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *Field_IntField: + if v == nil { + err := FieldValidationError{ + field: "Field", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetIntField()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FieldValidationError{ + field: "IntField", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FieldValidationError{ + field: "IntField", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetIntField()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FieldValidationError{ + field: "IntField", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *Field_BoolField: + if v == nil { + err := FieldValidationError{ + field: "Field", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetBoolField()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FieldValidationError{ + field: "BoolField", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FieldValidationError{ + field: "BoolField", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetBoolField()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FieldValidationError{ + field: "BoolField", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *Field_StringSliceField: + if v == nil { + err := FieldValidationError{ + field: "Field", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetStringSliceField()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FieldValidationError{ + field: "StringSliceField", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FieldValidationError{ + field: "StringSliceField", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStringSliceField()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FieldValidationError{ + field: "StringSliceField", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *Field_StringMapField: + if v == nil { + err := FieldValidationError{ + field: "Field", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetStringMapField()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FieldValidationError{ + field: "StringMapField", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FieldValidationError{ + field: "StringMapField", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStringMapField()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FieldValidationError{ + field: "StringMapField", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + _ = v // ensures v is used + } + + if len(errors) > 0 { + return FieldMultiError(errors) + } + + return nil +} + +// FieldMultiError is an error wrapping multiple validation errors returned by +// Field.ValidateAll() if the designated constraints aren't met. +type FieldMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FieldMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FieldMultiError) AllErrors() []error { return m } + +// FieldValidationError is the validation error returned by Field.Validate if +// the designated constraints aren't met. +type FieldValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e FieldValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e FieldValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e FieldValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e FieldValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e FieldValidationError) ErrorName() string { return "FieldValidationError" } + +// Error satisfies the builtin error interface +func (e FieldValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sField.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = FieldValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = FieldValidationError{} + +// Validate checks the field values on IntField with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *IntField) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on IntField with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in IntFieldMultiError, or nil +// if none found. +func (m *IntField) ValidateAll() error { + return m.validate(true) +} + +func (m *IntField) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for DefaultValue + + if m.Rules != nil { + + if all { + switch v := interface{}(m.GetRules()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, IntFieldValidationError{ + field: "Rules", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, IntFieldValidationError{ + field: "Rules", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRules()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return IntFieldValidationError{ + field: "Rules", + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return IntFieldMultiError(errors) + } + + return nil +} + +// IntFieldMultiError is an error wrapping multiple validation errors returned +// by IntField.ValidateAll() if the designated constraints aren't met. +type IntFieldMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m IntFieldMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m IntFieldMultiError) AllErrors() []error { return m } + +// IntFieldValidationError is the validation error returned by +// IntField.Validate if the designated constraints aren't met. +type IntFieldValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e IntFieldValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e IntFieldValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e IntFieldValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e IntFieldValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e IntFieldValidationError) ErrorName() string { return "IntFieldValidationError" } + +// Error satisfies the builtin error interface +func (e IntFieldValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sIntField.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = IntFieldValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = IntFieldValidationError{} + +// Validate checks the field values on BoolField with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *BoolField) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on BoolField with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in BoolFieldMultiError, or nil +// if none found. +func (m *BoolField) ValidateAll() error { + return m.validate(true) +} + +func (m *BoolField) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for DefaultValue + + if m.Rules != nil { + + if all { + switch v := interface{}(m.GetRules()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BoolFieldValidationError{ + field: "Rules", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BoolFieldValidationError{ + field: "Rules", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRules()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return BoolFieldValidationError{ + field: "Rules", + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return BoolFieldMultiError(errors) + } + + return nil +} + +// BoolFieldMultiError is an error wrapping multiple validation errors returned +// by BoolField.ValidateAll() if the designated constraints aren't met. +type BoolFieldMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m BoolFieldMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m BoolFieldMultiError) AllErrors() []error { return m } + +// BoolFieldValidationError is the validation error returned by +// BoolField.Validate if the designated constraints aren't met. +type BoolFieldValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e BoolFieldValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e BoolFieldValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e BoolFieldValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e BoolFieldValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e BoolFieldValidationError) ErrorName() string { return "BoolFieldValidationError" } + +// Error satisfies the builtin error interface +func (e BoolFieldValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sBoolField.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = BoolFieldValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = BoolFieldValidationError{} + +// Validate checks the field values on StringSliceField with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *StringSliceField) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StringSliceField with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// StringSliceFieldMultiError, or nil if none found. +func (m *StringSliceField) ValidateAll() error { + return m.validate(true) +} + +func (m *StringSliceField) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.Rules != nil { + + if all { + switch v := interface{}(m.GetRules()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StringSliceFieldValidationError{ + field: "Rules", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StringSliceFieldValidationError{ + field: "Rules", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRules()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return StringSliceFieldValidationError{ + field: "Rules", + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return StringSliceFieldMultiError(errors) + } + + return nil +} + +// StringSliceFieldMultiError is an error wrapping multiple validation errors +// returned by StringSliceField.ValidateAll() if the designated constraints +// aren't met. +type StringSliceFieldMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StringSliceFieldMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StringSliceFieldMultiError) AllErrors() []error { return m } + +// StringSliceFieldValidationError is the validation error returned by +// StringSliceField.Validate if the designated constraints aren't met. +type StringSliceFieldValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e StringSliceFieldValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e StringSliceFieldValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e StringSliceFieldValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e StringSliceFieldValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e StringSliceFieldValidationError) ErrorName() string { return "StringSliceFieldValidationError" } + +// Error satisfies the builtin error interface +func (e StringSliceFieldValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sStringSliceField.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = StringSliceFieldValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = StringSliceFieldValidationError{} + +// Validate checks the field values on StringMapField with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *StringMapField) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StringMapField with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in StringMapFieldMultiError, +// or nil if none found. +func (m *StringMapField) ValidateAll() error { + return m.validate(true) +} + +func (m *StringMapField) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + { + sorted_keys := make([]string, len(m.GetDefaultValue())) + i := 0 + for key := range m.GetDefaultValue() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetDefaultValue()[key] + _ = val + + // no validation rules for DefaultValue[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StringMapFieldValidationError{ + field: fmt.Sprintf("DefaultValue[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StringMapFieldValidationError{ + field: fmt.Sprintf("DefaultValue[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return StringMapFieldValidationError{ + field: fmt.Sprintf("DefaultValue[%v]", key), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + } + + if m.Rules != nil { + + if all { + switch v := interface{}(m.GetRules()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StringMapFieldValidationError{ + field: "Rules", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StringMapFieldValidationError{ + field: "Rules", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRules()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return StringMapFieldValidationError{ + field: "Rules", + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return StringMapFieldMultiError(errors) + } + + return nil +} + +// StringMapFieldMultiError is an error wrapping multiple validation errors +// returned by StringMapField.ValidateAll() if the designated constraints +// aren't met. +type StringMapFieldMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StringMapFieldMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StringMapFieldMultiError) AllErrors() []error { return m } + +// StringMapFieldValidationError is the validation error returned by +// StringMapField.Validate if the designated constraints aren't met. +type StringMapFieldValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e StringMapFieldValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e StringMapFieldValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e StringMapFieldValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e StringMapFieldValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e StringMapFieldValidationError) ErrorName() string { return "StringMapFieldValidationError" } + +// Error satisfies the builtin error interface +func (e StringMapFieldValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sStringMapField.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = StringMapFieldValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = StringMapFieldValidationError{} + +// Validate checks the field values on StringFieldOption with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *StringFieldOption) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StringFieldOption with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// StringFieldOptionMultiError, or nil if none found. +func (m *StringFieldOption) ValidateAll() error { + return m.validate(true) +} + +func (m *StringFieldOption) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Name + + // no validation rules for Value + + // no validation rules for DisplayName + + if len(errors) > 0 { + return StringFieldOptionMultiError(errors) + } + + return nil +} + +// StringFieldOptionMultiError is an error wrapping multiple validation errors +// returned by StringFieldOption.ValidateAll() if the designated constraints +// aren't met. +type StringFieldOptionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StringFieldOptionMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StringFieldOptionMultiError) AllErrors() []error { return m } + +// StringFieldOptionValidationError is the validation error returned by +// StringFieldOption.Validate if the designated constraints aren't met. +type StringFieldOptionValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e StringFieldOptionValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e StringFieldOptionValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e StringFieldOptionValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e StringFieldOptionValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e StringFieldOptionValidationError) ErrorName() string { + return "StringFieldOptionValidationError" +} + +// Error satisfies the builtin error interface +func (e StringFieldOptionValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sStringFieldOption.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = StringFieldOptionValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = StringFieldOptionValidationError{} + +// Validate checks the field values on StringField with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *StringField) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StringField with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in StringFieldMultiError, or +// nil if none found. +func (m *StringField) ValidateAll() error { + return m.validate(true) +} + +func (m *StringField) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for DefaultValue + + // no validation rules for Type + + for idx, item := range m.GetOptions() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StringFieldValidationError{ + field: fmt.Sprintf("Options[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StringFieldValidationError{ + field: fmt.Sprintf("Options[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return StringFieldValidationError{ + field: fmt.Sprintf("Options[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if m.Rules != nil { + + if all { + switch v := interface{}(m.GetRules()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, StringFieldValidationError{ + field: "Rules", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, StringFieldValidationError{ + field: "Rules", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRules()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return StringFieldValidationError{ + field: "Rules", + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return StringFieldMultiError(errors) + } + + return nil +} + +// StringFieldMultiError is an error wrapping multiple validation errors +// returned by StringField.ValidateAll() if the designated constraints aren't met. +type StringFieldMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StringFieldMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StringFieldMultiError) AllErrors() []error { return m } + +// StringFieldValidationError is the validation error returned by +// StringField.Validate if the designated constraints aren't met. +type StringFieldValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e StringFieldValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e StringFieldValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e StringFieldValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e StringFieldValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e StringFieldValidationError) ErrorName() string { return "StringFieldValidationError" } + +// Error satisfies the builtin error interface +func (e StringFieldValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sStringField.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = StringFieldValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = StringFieldValidationError{} diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/config/v1/rules.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/config/v1/rules.pb.go new file mode 100644 index 00000000..0958f39c --- /dev/null +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/config/v1/rules.pb.go @@ -0,0 +1,951 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.4 +// protoc (unknown) +// source: c1/config/v1/rules.proto + +package v1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type WellKnownString int32 + +const ( + WellKnownString_WELL_KNOWN_STRING_UNSPECIFIED WellKnownString = 0 + // Email specifies that the field must be a valid email address as + // defined by RFC 5322 + WellKnownString_WELL_KNOWN_STRING_EMAIL WellKnownString = 1 + // Hostname specifies that the field must be a valid hostname as + // defined by RFC 1034. This constraint does not support + // internationalized domain names (IDNs). + WellKnownString_WELL_KNOWN_STRING_HOSTNAME WellKnownString = 2 + // Ip specifies that the field must be a valid IP (v4 or v6) address. + // Valid IPv6 addresses should not include surrounding square brackets. + WellKnownString_WELL_KNOWN_STRING_IP WellKnownString = 3 + // Ipv4 specifies that the field must be a valid IPv4 address. + WellKnownString_WELL_KNOWN_STRING_IPV4 WellKnownString = 4 + // Ipv6 specifies that the field must be a valid IPv6 address. Valid + // IPv6 addresses should not include surrounding square brackets. + WellKnownString_WELL_KNOWN_STRING_IPV6 WellKnownString = 5 + WellKnownString_WELL_KNOWN_STRING_URI WellKnownString = 6 + // Address specifies that the field must be either a valid hostname as + // defined by RFC 1034 (which does not support internationalized domain + // names or IDNs), or it can be a valid IP (v4 or v6). + WellKnownString_WELL_KNOWN_STRING_ADDRESS WellKnownString = 7 + // Uuid specifies that the field must be a valid UUID as defined by + // RFC 4122 + WellKnownString_WELL_KNOWN_STRING_UUID WellKnownString = 8 +) + +// Enum value maps for WellKnownString. +var ( + WellKnownString_name = map[int32]string{ + 0: "WELL_KNOWN_STRING_UNSPECIFIED", + 1: "WELL_KNOWN_STRING_EMAIL", + 2: "WELL_KNOWN_STRING_HOSTNAME", + 3: "WELL_KNOWN_STRING_IP", + 4: "WELL_KNOWN_STRING_IPV4", + 5: "WELL_KNOWN_STRING_IPV6", + 6: "WELL_KNOWN_STRING_URI", + 7: "WELL_KNOWN_STRING_ADDRESS", + 8: "WELL_KNOWN_STRING_UUID", + } + WellKnownString_value = map[string]int32{ + "WELL_KNOWN_STRING_UNSPECIFIED": 0, + "WELL_KNOWN_STRING_EMAIL": 1, + "WELL_KNOWN_STRING_HOSTNAME": 2, + "WELL_KNOWN_STRING_IP": 3, + "WELL_KNOWN_STRING_IPV4": 4, + "WELL_KNOWN_STRING_IPV6": 5, + "WELL_KNOWN_STRING_URI": 6, + "WELL_KNOWN_STRING_ADDRESS": 7, + "WELL_KNOWN_STRING_UUID": 8, + } +) + +func (x WellKnownString) Enum() *WellKnownString { + p := new(WellKnownString) + *p = x + return p +} + +func (x WellKnownString) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (WellKnownString) Descriptor() protoreflect.EnumDescriptor { + return file_c1_config_v1_rules_proto_enumTypes[0].Descriptor() +} + +func (WellKnownString) Type() protoreflect.EnumType { + return &file_c1_config_v1_rules_proto_enumTypes[0] +} + +func (x WellKnownString) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use WellKnownString.Descriptor instead. +func (WellKnownString) EnumDescriptor() ([]byte, []int) { + return file_c1_config_v1_rules_proto_rawDescGZIP(), []int{0} +} + +// Int64Rules describes the constraints applied to `int64` values +type Int64Rules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Const specifies that this field must be exactly the specified value + Eq *int64 `protobuf:"varint,1,opt,name=eq,proto3,oneof" json:"eq,omitempty"` + // Lt specifies that this field must be less than the specified value, + // exclusive + Lt *int64 `protobuf:"varint,2,opt,name=lt,proto3,oneof" json:"lt,omitempty"` + // Lte specifies that this field must be less than or equal to the + // specified value, inclusive + Lte *int64 `protobuf:"varint,3,opt,name=lte,proto3,oneof" json:"lte,omitempty"` + // Gt specifies that this field must be greater than the specified value, + // exclusive. If the value of Gt is larger than a specified Lt or Lte, the + // range is reversed. + Gt *int64 `protobuf:"varint,4,opt,name=gt,proto3,oneof" json:"gt,omitempty"` + // Gte specifies that this field must be greater than or equal to the + // specified value, inclusive. If the value of Gte is larger than a + // specified Lt or Lte, the range is reversed. + Gte *int64 `protobuf:"varint,5,opt,name=gte,proto3,oneof" json:"gte,omitempty"` + // In specifies that this field must be equal to one of the specified + // values + In []int64 `protobuf:"varint,6,rep,packed,name=in,proto3" json:"in,omitempty"` + // NotIn specifies that this field cannot be equal to one of the specified + // values + NotIn []int64 `protobuf:"varint,7,rep,packed,name=not_in,json=notIn,proto3" json:"not_in,omitempty"` + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + ValidateEmpty bool `protobuf:"varint,8,opt,name=validate_empty,json=validateEmpty,proto3" json:"validate_empty,omitempty"` + IsRequired bool `protobuf:"varint,9,opt,name=is_required,json=isRequired,proto3" json:"is_required,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Int64Rules) Reset() { + *x = Int64Rules{} + mi := &file_c1_config_v1_rules_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Int64Rules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Int64Rules) ProtoMessage() {} + +func (x *Int64Rules) ProtoReflect() protoreflect.Message { + mi := &file_c1_config_v1_rules_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Int64Rules.ProtoReflect.Descriptor instead. +func (*Int64Rules) Descriptor() ([]byte, []int) { + return file_c1_config_v1_rules_proto_rawDescGZIP(), []int{0} +} + +func (x *Int64Rules) GetEq() int64 { + if x != nil && x.Eq != nil { + return *x.Eq + } + return 0 +} + +func (x *Int64Rules) GetLt() int64 { + if x != nil && x.Lt != nil { + return *x.Lt + } + return 0 +} + +func (x *Int64Rules) GetLte() int64 { + if x != nil && x.Lte != nil { + return *x.Lte + } + return 0 +} + +func (x *Int64Rules) GetGt() int64 { + if x != nil && x.Gt != nil { + return *x.Gt + } + return 0 +} + +func (x *Int64Rules) GetGte() int64 { + if x != nil && x.Gte != nil { + return *x.Gte + } + return 0 +} + +func (x *Int64Rules) GetIn() []int64 { + if x != nil { + return x.In + } + return nil +} + +func (x *Int64Rules) GetNotIn() []int64 { + if x != nil { + return x.NotIn + } + return nil +} + +func (x *Int64Rules) GetValidateEmpty() bool { + if x != nil { + return x.ValidateEmpty + } + return false +} + +func (x *Int64Rules) GetIsRequired() bool { + if x != nil { + return x.IsRequired + } + return false +} + +// BoolRules describes the constraints applied to `bool` values +type BoolRules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Const specifies that this field must be exactly the specified value + Eq *bool `protobuf:"varint,1,opt,name=eq,proto3,oneof" json:"eq,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BoolRules) Reset() { + *x = BoolRules{} + mi := &file_c1_config_v1_rules_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BoolRules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BoolRules) ProtoMessage() {} + +func (x *BoolRules) ProtoReflect() protoreflect.Message { + mi := &file_c1_config_v1_rules_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BoolRules.ProtoReflect.Descriptor instead. +func (*BoolRules) Descriptor() ([]byte, []int) { + return file_c1_config_v1_rules_proto_rawDescGZIP(), []int{1} +} + +func (x *BoolRules) GetEq() bool { + if x != nil && x.Eq != nil { + return *x.Eq + } + return false +} + +// RepeatedRules describe the constraints applied to `repeated` values +type RepeatedRules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // MinItems specifies that this field must have the specified number of + // items at a minimum + MinItems *uint64 `protobuf:"varint,1,opt,name=min_items,json=minItems,proto3,oneof" json:"min_items,omitempty"` + // MaxItems specifies that this field must have the specified number of + // items at a maximum + MaxItems *uint64 `protobuf:"varint,2,opt,name=max_items,json=maxItems,proto3,oneof" json:"max_items,omitempty"` + // Unique specifies that all elements in this field must be unique. This + // constraint is only applicable to scalar and enum types (messages are not + // supported). + Unique bool `protobuf:"varint,3,opt,name=unique,proto3" json:"unique,omitempty"` + // Items specifies the constraints to be applied to each item in the field. + // Repeated message fields will still execute validation against each item + // unless skip is specified here. + // + // Types that are valid to be assigned to ItemRules: + // + // *RepeatedRules_Int64 + // *RepeatedRules_Bool + // *RepeatedRules_String_ + ItemRules isRepeatedRules_ItemRules `protobuf_oneof:"item_rules"` + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + ValidateEmpty bool `protobuf:"varint,4,opt,name=validate_empty,json=validateEmpty,proto3" json:"validate_empty,omitempty"` + IsRequired bool `protobuf:"varint,5,opt,name=is_required,json=isRequired,proto3" json:"is_required,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RepeatedRules) Reset() { + *x = RepeatedRules{} + mi := &file_c1_config_v1_rules_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RepeatedRules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RepeatedRules) ProtoMessage() {} + +func (x *RepeatedRules) ProtoReflect() protoreflect.Message { + mi := &file_c1_config_v1_rules_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RepeatedRules.ProtoReflect.Descriptor instead. +func (*RepeatedRules) Descriptor() ([]byte, []int) { + return file_c1_config_v1_rules_proto_rawDescGZIP(), []int{2} +} + +func (x *RepeatedRules) GetMinItems() uint64 { + if x != nil && x.MinItems != nil { + return *x.MinItems + } + return 0 +} + +func (x *RepeatedRules) GetMaxItems() uint64 { + if x != nil && x.MaxItems != nil { + return *x.MaxItems + } + return 0 +} + +func (x *RepeatedRules) GetUnique() bool { + if x != nil { + return x.Unique + } + return false +} + +func (x *RepeatedRules) GetItemRules() isRepeatedRules_ItemRules { + if x != nil { + return x.ItemRules + } + return nil +} + +func (x *RepeatedRules) GetInt64() *Int64Rules { + if x != nil { + if x, ok := x.ItemRules.(*RepeatedRules_Int64); ok { + return x.Int64 + } + } + return nil +} + +func (x *RepeatedRules) GetBool() *BoolRules { + if x != nil { + if x, ok := x.ItemRules.(*RepeatedRules_Bool); ok { + return x.Bool + } + } + return nil +} + +func (x *RepeatedRules) GetString_() *StringRules { + if x != nil { + if x, ok := x.ItemRules.(*RepeatedRules_String_); ok { + return x.String_ + } + } + return nil +} + +func (x *RepeatedRules) GetValidateEmpty() bool { + if x != nil { + return x.ValidateEmpty + } + return false +} + +func (x *RepeatedRules) GetIsRequired() bool { + if x != nil { + return x.IsRequired + } + return false +} + +type isRepeatedRules_ItemRules interface { + isRepeatedRules_ItemRules() +} + +type RepeatedRules_Int64 struct { + // Scalar Field Types + Int64 *Int64Rules `protobuf:"bytes,100,opt,name=int64,proto3,oneof"` +} + +type RepeatedRules_Bool struct { + Bool *BoolRules `protobuf:"bytes,101,opt,name=bool,proto3,oneof"` +} + +type RepeatedRules_String_ struct { + String_ *StringRules `protobuf:"bytes,102,opt,name=string,proto3,oneof"` // RepeatedRules repeated = 103; +} + +func (*RepeatedRules_Int64) isRepeatedRules_ItemRules() {} + +func (*RepeatedRules_Bool) isRepeatedRules_ItemRules() {} + +func (*RepeatedRules_String_) isRepeatedRules_ItemRules() {} + +type RepeatedStringRules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // MinItems specifies that this field must have the specified number of + // items at a minimum + MinItems *uint64 `protobuf:"varint,1,opt,name=min_items,json=minItems,proto3,oneof" json:"min_items,omitempty"` + // MaxItems specifies that this field must have the specified number of + // items at a maximum + MaxItems *uint64 `protobuf:"varint,2,opt,name=max_items,json=maxItems,proto3,oneof" json:"max_items,omitempty"` + // Unique specifies that all elements in this field must be unique. This + // constraint is only applicable to scalar and enum types (messages are not + // supported). + Unique bool `protobuf:"varint,3,opt,name=unique,proto3" json:"unique,omitempty"` + ItemRules *StringRules `protobuf:"bytes,4,opt,name=item_rules,json=itemRules,proto3" json:"item_rules,omitempty"` + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + ValidateEmpty bool `protobuf:"varint,5,opt,name=validate_empty,json=validateEmpty,proto3" json:"validate_empty,omitempty"` + IsRequired bool `protobuf:"varint,6,opt,name=is_required,json=isRequired,proto3" json:"is_required,omitempty"` // repeated string eq = 7; + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RepeatedStringRules) Reset() { + *x = RepeatedStringRules{} + mi := &file_c1_config_v1_rules_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RepeatedStringRules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RepeatedStringRules) ProtoMessage() {} + +func (x *RepeatedStringRules) ProtoReflect() protoreflect.Message { + mi := &file_c1_config_v1_rules_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RepeatedStringRules.ProtoReflect.Descriptor instead. +func (*RepeatedStringRules) Descriptor() ([]byte, []int) { + return file_c1_config_v1_rules_proto_rawDescGZIP(), []int{3} +} + +func (x *RepeatedStringRules) GetMinItems() uint64 { + if x != nil && x.MinItems != nil { + return *x.MinItems + } + return 0 +} + +func (x *RepeatedStringRules) GetMaxItems() uint64 { + if x != nil && x.MaxItems != nil { + return *x.MaxItems + } + return 0 +} + +func (x *RepeatedStringRules) GetUnique() bool { + if x != nil { + return x.Unique + } + return false +} + +func (x *RepeatedStringRules) GetItemRules() *StringRules { + if x != nil { + return x.ItemRules + } + return nil +} + +func (x *RepeatedStringRules) GetValidateEmpty() bool { + if x != nil { + return x.ValidateEmpty + } + return false +} + +func (x *RepeatedStringRules) GetIsRequired() bool { + if x != nil { + return x.IsRequired + } + return false +} + +type StringRules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Const specifies that this field must be exactly the specified value + Eq *string `protobuf:"bytes,1,opt,name=eq,proto3,oneof" json:"eq,omitempty"` + // Len specifies that this field must be the specified number of + // characters (Unicode code points). Note that the number of + // characters may differ from the number of bytes in the string. + Len *uint64 `protobuf:"varint,19,opt,name=len,proto3,oneof" json:"len,omitempty"` + // MinLen specifies that this field must be the specified number of + // characters (Unicode code points) at a minimum. Note that the number of + // characters may differ from the number of bytes in the string. + MinLen *uint64 `protobuf:"varint,2,opt,name=min_len,json=minLen,proto3,oneof" json:"min_len,omitempty"` + // MaxLen specifies that this field must be the specified number of + // characters (Unicode code points) at a maximum. Note that the number of + // characters may differ from the number of bytes in the string. + MaxLen *uint64 `protobuf:"varint,3,opt,name=max_len,json=maxLen,proto3,oneof" json:"max_len,omitempty"` + // Pattern specifies that this field must match against the specified + // regular expression (RE2 syntax). The included expression should elide + // any delimiters. + Pattern *string `protobuf:"bytes,6,opt,name=pattern,proto3,oneof" json:"pattern,omitempty"` + // Prefix specifies that this field must have the specified substring at + // the beginning of the string. + Prefix *string `protobuf:"bytes,7,opt,name=prefix,proto3,oneof" json:"prefix,omitempty"` + // Suffix specifies that this field must have the specified substring at + // the end of the string. + Suffix *string `protobuf:"bytes,8,opt,name=suffix,proto3,oneof" json:"suffix,omitempty"` + // Contains specifies that this field must have the specified substring + // anywhere in the string. + Contains *string `protobuf:"bytes,9,opt,name=contains,proto3,oneof" json:"contains,omitempty"` + // NotContains specifies that this field cannot have the specified substring + // anywhere in the string. + NotContains *string `protobuf:"bytes,23,opt,name=not_contains,json=notContains,proto3,oneof" json:"not_contains,omitempty"` + // In specifies that this field must be equal to one of the specified + // values + In []string `protobuf:"bytes,10,rep,name=in,proto3" json:"in,omitempty"` + // NotIn specifies that this field cannot be equal to one of the specified + // values + NotIn []string `protobuf:"bytes,11,rep,name=not_in,json=notIn,proto3" json:"not_in,omitempty"` + WellKnown WellKnownString `protobuf:"varint,12,opt,name=well_known,json=wellKnown,proto3,enum=c1.config.v1.WellKnownString" json:"well_known,omitempty"` + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + ValidateEmpty bool `protobuf:"varint,26,opt,name=validate_empty,json=validateEmpty,proto3" json:"validate_empty,omitempty"` + IsRequired bool `protobuf:"varint,27,opt,name=is_required,json=isRequired,proto3" json:"is_required,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StringRules) Reset() { + *x = StringRules{} + mi := &file_c1_config_v1_rules_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StringRules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StringRules) ProtoMessage() {} + +func (x *StringRules) ProtoReflect() protoreflect.Message { + mi := &file_c1_config_v1_rules_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StringRules.ProtoReflect.Descriptor instead. +func (*StringRules) Descriptor() ([]byte, []int) { + return file_c1_config_v1_rules_proto_rawDescGZIP(), []int{4} +} + +func (x *StringRules) GetEq() string { + if x != nil && x.Eq != nil { + return *x.Eq + } + return "" +} + +func (x *StringRules) GetLen() uint64 { + if x != nil && x.Len != nil { + return *x.Len + } + return 0 +} + +func (x *StringRules) GetMinLen() uint64 { + if x != nil && x.MinLen != nil { + return *x.MinLen + } + return 0 +} + +func (x *StringRules) GetMaxLen() uint64 { + if x != nil && x.MaxLen != nil { + return *x.MaxLen + } + return 0 +} + +func (x *StringRules) GetPattern() string { + if x != nil && x.Pattern != nil { + return *x.Pattern + } + return "" +} + +func (x *StringRules) GetPrefix() string { + if x != nil && x.Prefix != nil { + return *x.Prefix + } + return "" +} + +func (x *StringRules) GetSuffix() string { + if x != nil && x.Suffix != nil { + return *x.Suffix + } + return "" +} + +func (x *StringRules) GetContains() string { + if x != nil && x.Contains != nil { + return *x.Contains + } + return "" +} + +func (x *StringRules) GetNotContains() string { + if x != nil && x.NotContains != nil { + return *x.NotContains + } + return "" +} + +func (x *StringRules) GetIn() []string { + if x != nil { + return x.In + } + return nil +} + +func (x *StringRules) GetNotIn() []string { + if x != nil { + return x.NotIn + } + return nil +} + +func (x *StringRules) GetWellKnown() WellKnownString { + if x != nil { + return x.WellKnown + } + return WellKnownString_WELL_KNOWN_STRING_UNSPECIFIED +} + +func (x *StringRules) GetValidateEmpty() bool { + if x != nil { + return x.ValidateEmpty + } + return false +} + +func (x *StringRules) GetIsRequired() bool { + if x != nil { + return x.IsRequired + } + return false +} + +type StringMapRules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + ValidateEmpty bool `protobuf:"varint,1,opt,name=validate_empty,json=validateEmpty,proto3" json:"validate_empty,omitempty"` + IsRequired bool `protobuf:"varint,2,opt,name=is_required,json=isRequired,proto3" json:"is_required,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StringMapRules) Reset() { + *x = StringMapRules{} + mi := &file_c1_config_v1_rules_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StringMapRules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StringMapRules) ProtoMessage() {} + +func (x *StringMapRules) ProtoReflect() protoreflect.Message { + mi := &file_c1_config_v1_rules_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StringMapRules.ProtoReflect.Descriptor instead. +func (*StringMapRules) Descriptor() ([]byte, []int) { + return file_c1_config_v1_rules_proto_rawDescGZIP(), []int{5} +} + +func (x *StringMapRules) GetValidateEmpty() bool { + if x != nil { + return x.ValidateEmpty + } + return false +} + +func (x *StringMapRules) GetIsRequired() bool { + if x != nil { + return x.IsRequired + } + return false +} + +var File_c1_config_v1_rules_proto protoreflect.FileDescriptor + +var file_c1_config_v1_rules_proto_rawDesc = string([]byte{ + 0x0a, 0x18, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x63, 0x31, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x22, 0x8d, 0x02, 0x0a, 0x0a, 0x49, 0x6e, 0x74, + 0x36, 0x34, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x13, 0x0a, 0x02, 0x65, 0x71, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x02, 0x65, 0x71, 0x88, 0x01, 0x01, 0x12, 0x13, 0x0a, 0x02, + 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, 0x52, 0x02, 0x6c, 0x74, 0x88, 0x01, + 0x01, 0x12, 0x15, 0x0a, 0x03, 0x6c, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x48, 0x02, + 0x52, 0x03, 0x6c, 0x74, 0x65, 0x88, 0x01, 0x01, 0x12, 0x13, 0x0a, 0x02, 0x67, 0x74, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x03, 0x48, 0x03, 0x52, 0x02, 0x67, 0x74, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, + 0x03, 0x67, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x48, 0x04, 0x52, 0x03, 0x67, 0x74, + 0x65, 0x88, 0x01, 0x01, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x03, + 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x07, + 0x20, 0x03, 0x28, 0x03, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, + 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x52, 0x65, 0x71, 0x75, 0x69, + 0x72, 0x65, 0x64, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x65, 0x71, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x6c, + 0x74, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x6c, 0x74, 0x65, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x67, 0x74, + 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x67, 0x74, 0x65, 0x22, 0x27, 0x0a, 0x09, 0x42, 0x6f, 0x6f, 0x6c, + 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x13, 0x0a, 0x02, 0x65, 0x71, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x08, 0x48, 0x00, 0x52, 0x02, 0x65, 0x71, 0x88, 0x01, 0x01, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x65, + 0x71, 0x22, 0xf3, 0x02, 0x0a, 0x0d, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x52, 0x75, + 0x6c, 0x65, 0x73, 0x12, 0x20, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x49, 0x74, 0x65, + 0x6d, 0x73, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x74, 0x65, + 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, 0x02, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x49, + 0x74, 0x65, 0x6d, 0x73, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x6e, 0x69, 0x71, 0x75, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x12, + 0x30, 0x0a, 0x05, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, + 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, + 0x74, 0x36, 0x34, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x05, 0x69, 0x6e, 0x74, 0x36, + 0x34, 0x12, 0x2d, 0x0a, 0x04, 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x17, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x42, + 0x6f, 0x6f, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x04, 0x62, 0x6f, 0x6f, 0x6c, + 0x12, 0x33, 0x0a, 0x06, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x66, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x06, 0x73, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x25, 0x0a, 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x1f, 0x0a, 0x0b, + 0x69, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0a, 0x69, 0x73, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x42, 0x0c, 0x0a, + 0x0a, 0x69, 0x74, 0x65, 0x6d, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, + 0x6d, 0x69, 0x6e, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6d, 0x61, + 0x78, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x8f, 0x02, 0x0a, 0x13, 0x52, 0x65, 0x70, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, + 0x20, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x04, 0x48, 0x00, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x88, 0x01, + 0x01, 0x12, 0x20, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x49, 0x74, 0x65, 0x6d, 0x73, + 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x06, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x12, 0x38, 0x0a, 0x0a, 0x69, + 0x74, 0x65, 0x6d, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x09, 0x69, 0x74, 0x65, 0x6d, + 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x1f, 0x0a, 0x0b, + 0x69, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0a, 0x69, 0x73, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x42, 0x0c, 0x0a, + 0x0a, 0x5f, 0x6d, 0x69, 0x6e, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, + 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0xab, 0x04, 0x0a, 0x0b, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x13, 0x0a, 0x02, 0x65, 0x71, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x65, 0x71, 0x88, 0x01, 0x01, 0x12, 0x15, + 0x0a, 0x03, 0x6c, 0x65, 0x6e, 0x18, 0x13, 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, 0x03, 0x6c, + 0x65, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x1c, 0x0a, 0x07, 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, 0x02, 0x52, 0x06, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, + 0x88, 0x01, 0x01, 0x12, 0x1c, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x04, 0x48, 0x03, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x4c, 0x65, 0x6e, 0x88, 0x01, + 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x04, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x88, 0x01, 0x01, + 0x12, 0x1b, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x05, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, + 0x06, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x48, 0x06, 0x52, + 0x06, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x63, 0x6f, + 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x48, 0x07, 0x52, 0x08, + 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x6e, + 0x6f, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x17, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x08, 0x52, 0x0b, 0x6e, 0x6f, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, + 0x88, 0x01, 0x01, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x0b, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x3c, 0x0a, 0x0a, 0x77, 0x65, + 0x6c, 0x6c, 0x5f, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, + 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x65, + 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x77, + 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, + 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x1b, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, + 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x65, 0x71, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x6c, 0x65, 0x6e, 0x42, + 0x0a, 0x0a, 0x08, 0x5f, 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x6e, 0x42, 0x0a, 0x0a, 0x08, 0x5f, + 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x70, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x42, 0x09, + 0x0a, 0x07, 0x5f, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x63, 0x6f, + 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x63, + 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x22, 0x58, 0x0a, 0x0e, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x4d, 0x61, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, + 0x64, 0x2a, 0x99, 0x02, 0x0a, 0x0f, 0x57, 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x53, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x21, 0x0a, 0x1d, 0x57, 0x45, 0x4c, 0x4c, 0x5f, 0x4b, 0x4e, + 0x4f, 0x57, 0x4e, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x57, 0x45, 0x4c, 0x4c, + 0x5f, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x45, 0x4d, + 0x41, 0x49, 0x4c, 0x10, 0x01, 0x12, 0x1e, 0x0a, 0x1a, 0x57, 0x45, 0x4c, 0x4c, 0x5f, 0x4b, 0x4e, + 0x4f, 0x57, 0x4e, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x48, 0x4f, 0x53, 0x54, 0x4e, + 0x41, 0x4d, 0x45, 0x10, 0x02, 0x12, 0x18, 0x0a, 0x14, 0x57, 0x45, 0x4c, 0x4c, 0x5f, 0x4b, 0x4e, + 0x4f, 0x57, 0x4e, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x49, 0x50, 0x10, 0x03, 0x12, + 0x1a, 0x0a, 0x16, 0x57, 0x45, 0x4c, 0x4c, 0x5f, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x53, 0x54, + 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x49, 0x50, 0x56, 0x34, 0x10, 0x04, 0x12, 0x1a, 0x0a, 0x16, 0x57, + 0x45, 0x4c, 0x4c, 0x5f, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, + 0x5f, 0x49, 0x50, 0x56, 0x36, 0x10, 0x05, 0x12, 0x19, 0x0a, 0x15, 0x57, 0x45, 0x4c, 0x4c, 0x5f, + 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x55, 0x52, 0x49, + 0x10, 0x06, 0x12, 0x1d, 0x0a, 0x19, 0x57, 0x45, 0x4c, 0x4c, 0x5f, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, + 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, 0x53, 0x10, + 0x07, 0x12, 0x1a, 0x0a, 0x16, 0x57, 0x45, 0x4c, 0x4c, 0x5f, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, + 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x55, 0x55, 0x49, 0x44, 0x10, 0x08, 0x42, 0x33, 0x5a, + 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x64, + 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, + 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, + 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +}) + +var ( + file_c1_config_v1_rules_proto_rawDescOnce sync.Once + file_c1_config_v1_rules_proto_rawDescData []byte +) + +func file_c1_config_v1_rules_proto_rawDescGZIP() []byte { + file_c1_config_v1_rules_proto_rawDescOnce.Do(func() { + file_c1_config_v1_rules_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_c1_config_v1_rules_proto_rawDesc), len(file_c1_config_v1_rules_proto_rawDesc))) + }) + return file_c1_config_v1_rules_proto_rawDescData +} + +var file_c1_config_v1_rules_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_c1_config_v1_rules_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_c1_config_v1_rules_proto_goTypes = []any{ + (WellKnownString)(0), // 0: c1.config.v1.WellKnownString + (*Int64Rules)(nil), // 1: c1.config.v1.Int64Rules + (*BoolRules)(nil), // 2: c1.config.v1.BoolRules + (*RepeatedRules)(nil), // 3: c1.config.v1.RepeatedRules + (*RepeatedStringRules)(nil), // 4: c1.config.v1.RepeatedStringRules + (*StringRules)(nil), // 5: c1.config.v1.StringRules + (*StringMapRules)(nil), // 6: c1.config.v1.StringMapRules +} +var file_c1_config_v1_rules_proto_depIdxs = []int32{ + 1, // 0: c1.config.v1.RepeatedRules.int64:type_name -> c1.config.v1.Int64Rules + 2, // 1: c1.config.v1.RepeatedRules.bool:type_name -> c1.config.v1.BoolRules + 5, // 2: c1.config.v1.RepeatedRules.string:type_name -> c1.config.v1.StringRules + 5, // 3: c1.config.v1.RepeatedStringRules.item_rules:type_name -> c1.config.v1.StringRules + 0, // 4: c1.config.v1.StringRules.well_known:type_name -> c1.config.v1.WellKnownString + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_c1_config_v1_rules_proto_init() } +func file_c1_config_v1_rules_proto_init() { + if File_c1_config_v1_rules_proto != nil { + return + } + file_c1_config_v1_rules_proto_msgTypes[0].OneofWrappers = []any{} + file_c1_config_v1_rules_proto_msgTypes[1].OneofWrappers = []any{} + file_c1_config_v1_rules_proto_msgTypes[2].OneofWrappers = []any{ + (*RepeatedRules_Int64)(nil), + (*RepeatedRules_Bool)(nil), + (*RepeatedRules_String_)(nil), + } + file_c1_config_v1_rules_proto_msgTypes[3].OneofWrappers = []any{} + file_c1_config_v1_rules_proto_msgTypes[4].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_config_v1_rules_proto_rawDesc), len(file_c1_config_v1_rules_proto_rawDesc)), + NumEnums: 1, + NumMessages: 6, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_c1_config_v1_rules_proto_goTypes, + DependencyIndexes: file_c1_config_v1_rules_proto_depIdxs, + EnumInfos: file_c1_config_v1_rules_proto_enumTypes, + MessageInfos: file_c1_config_v1_rules_proto_msgTypes, + }.Build() + File_c1_config_v1_rules_proto = out.File + file_c1_config_v1_rules_proto_goTypes = nil + file_c1_config_v1_rules_proto_depIdxs = nil +} diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/config/v1/rules.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/config/v1/rules.pb.validate.go new file mode 100644 index 00000000..a2c8ff0d --- /dev/null +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/config/v1/rules.pb.validate.go @@ -0,0 +1,894 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: c1/config/v1/rules.proto + +package v1 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Int64Rules with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *Int64Rules) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Int64Rules with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in Int64RulesMultiError, or +// nil if none found. +func (m *Int64Rules) ValidateAll() error { + return m.validate(true) +} + +func (m *Int64Rules) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for ValidateEmpty + + // no validation rules for IsRequired + + if m.Eq != nil { + // no validation rules for Eq + } + + if m.Lt != nil { + // no validation rules for Lt + } + + if m.Lte != nil { + // no validation rules for Lte + } + + if m.Gt != nil { + // no validation rules for Gt + } + + if m.Gte != nil { + // no validation rules for Gte + } + + if len(errors) > 0 { + return Int64RulesMultiError(errors) + } + + return nil +} + +// Int64RulesMultiError is an error wrapping multiple validation errors +// returned by Int64Rules.ValidateAll() if the designated constraints aren't met. +type Int64RulesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Int64RulesMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Int64RulesMultiError) AllErrors() []error { return m } + +// Int64RulesValidationError is the validation error returned by +// Int64Rules.Validate if the designated constraints aren't met. +type Int64RulesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Int64RulesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Int64RulesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Int64RulesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Int64RulesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Int64RulesValidationError) ErrorName() string { return "Int64RulesValidationError" } + +// Error satisfies the builtin error interface +func (e Int64RulesValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sInt64Rules.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Int64RulesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Int64RulesValidationError{} + +// Validate checks the field values on BoolRules with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *BoolRules) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on BoolRules with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in BoolRulesMultiError, or nil +// if none found. +func (m *BoolRules) ValidateAll() error { + return m.validate(true) +} + +func (m *BoolRules) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.Eq != nil { + // no validation rules for Eq + } + + if len(errors) > 0 { + return BoolRulesMultiError(errors) + } + + return nil +} + +// BoolRulesMultiError is an error wrapping multiple validation errors returned +// by BoolRules.ValidateAll() if the designated constraints aren't met. +type BoolRulesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m BoolRulesMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m BoolRulesMultiError) AllErrors() []error { return m } + +// BoolRulesValidationError is the validation error returned by +// BoolRules.Validate if the designated constraints aren't met. +type BoolRulesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e BoolRulesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e BoolRulesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e BoolRulesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e BoolRulesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e BoolRulesValidationError) ErrorName() string { return "BoolRulesValidationError" } + +// Error satisfies the builtin error interface +func (e BoolRulesValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sBoolRules.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = BoolRulesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = BoolRulesValidationError{} + +// Validate checks the field values on RepeatedRules with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *RepeatedRules) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RepeatedRules with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RepeatedRulesMultiError, or +// nil if none found. +func (m *RepeatedRules) ValidateAll() error { + return m.validate(true) +} + +func (m *RepeatedRules) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Unique + + // no validation rules for ValidateEmpty + + // no validation rules for IsRequired + + switch v := m.ItemRules.(type) { + case *RepeatedRules_Int64: + if v == nil { + err := RepeatedRulesValidationError{ + field: "ItemRules", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetInt64()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RepeatedRulesValidationError{ + field: "Int64", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RepeatedRulesValidationError{ + field: "Int64", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetInt64()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RepeatedRulesValidationError{ + field: "Int64", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *RepeatedRules_Bool: + if v == nil { + err := RepeatedRulesValidationError{ + field: "ItemRules", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetBool()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RepeatedRulesValidationError{ + field: "Bool", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RepeatedRulesValidationError{ + field: "Bool", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetBool()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RepeatedRulesValidationError{ + field: "Bool", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *RepeatedRules_String_: + if v == nil { + err := RepeatedRulesValidationError{ + field: "ItemRules", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetString_()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RepeatedRulesValidationError{ + field: "String_", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RepeatedRulesValidationError{ + field: "String_", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetString_()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RepeatedRulesValidationError{ + field: "String_", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + _ = v // ensures v is used + } + + if m.MinItems != nil { + // no validation rules for MinItems + } + + if m.MaxItems != nil { + // no validation rules for MaxItems + } + + if len(errors) > 0 { + return RepeatedRulesMultiError(errors) + } + + return nil +} + +// RepeatedRulesMultiError is an error wrapping multiple validation errors +// returned by RepeatedRules.ValidateAll() if the designated constraints +// aren't met. +type RepeatedRulesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RepeatedRulesMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RepeatedRulesMultiError) AllErrors() []error { return m } + +// RepeatedRulesValidationError is the validation error returned by +// RepeatedRules.Validate if the designated constraints aren't met. +type RepeatedRulesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RepeatedRulesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RepeatedRulesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RepeatedRulesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RepeatedRulesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RepeatedRulesValidationError) ErrorName() string { return "RepeatedRulesValidationError" } + +// Error satisfies the builtin error interface +func (e RepeatedRulesValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sRepeatedRules.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RepeatedRulesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RepeatedRulesValidationError{} + +// Validate checks the field values on RepeatedStringRules with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *RepeatedStringRules) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RepeatedStringRules with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RepeatedStringRulesMultiError, or nil if none found. +func (m *RepeatedStringRules) ValidateAll() error { + return m.validate(true) +} + +func (m *RepeatedStringRules) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Unique + + if all { + switch v := interface{}(m.GetItemRules()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RepeatedStringRulesValidationError{ + field: "ItemRules", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RepeatedStringRulesValidationError{ + field: "ItemRules", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetItemRules()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RepeatedStringRulesValidationError{ + field: "ItemRules", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for ValidateEmpty + + // no validation rules for IsRequired + + if m.MinItems != nil { + // no validation rules for MinItems + } + + if m.MaxItems != nil { + // no validation rules for MaxItems + } + + if len(errors) > 0 { + return RepeatedStringRulesMultiError(errors) + } + + return nil +} + +// RepeatedStringRulesMultiError is an error wrapping multiple validation +// errors returned by RepeatedStringRules.ValidateAll() if the designated +// constraints aren't met. +type RepeatedStringRulesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RepeatedStringRulesMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RepeatedStringRulesMultiError) AllErrors() []error { return m } + +// RepeatedStringRulesValidationError is the validation error returned by +// RepeatedStringRules.Validate if the designated constraints aren't met. +type RepeatedStringRulesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RepeatedStringRulesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RepeatedStringRulesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RepeatedStringRulesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RepeatedStringRulesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RepeatedStringRulesValidationError) ErrorName() string { + return "RepeatedStringRulesValidationError" +} + +// Error satisfies the builtin error interface +func (e RepeatedStringRulesValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sRepeatedStringRules.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RepeatedStringRulesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RepeatedStringRulesValidationError{} + +// Validate checks the field values on StringRules with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *StringRules) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StringRules with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in StringRulesMultiError, or +// nil if none found. +func (m *StringRules) ValidateAll() error { + return m.validate(true) +} + +func (m *StringRules) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for WellKnown + + // no validation rules for ValidateEmpty + + // no validation rules for IsRequired + + if m.Eq != nil { + // no validation rules for Eq + } + + if m.Len != nil { + // no validation rules for Len + } + + if m.MinLen != nil { + // no validation rules for MinLen + } + + if m.MaxLen != nil { + // no validation rules for MaxLen + } + + if m.Pattern != nil { + // no validation rules for Pattern + } + + if m.Prefix != nil { + // no validation rules for Prefix + } + + if m.Suffix != nil { + // no validation rules for Suffix + } + + if m.Contains != nil { + // no validation rules for Contains + } + + if m.NotContains != nil { + // no validation rules for NotContains + } + + if len(errors) > 0 { + return StringRulesMultiError(errors) + } + + return nil +} + +// StringRulesMultiError is an error wrapping multiple validation errors +// returned by StringRules.ValidateAll() if the designated constraints aren't met. +type StringRulesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StringRulesMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StringRulesMultiError) AllErrors() []error { return m } + +// StringRulesValidationError is the validation error returned by +// StringRules.Validate if the designated constraints aren't met. +type StringRulesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e StringRulesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e StringRulesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e StringRulesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e StringRulesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e StringRulesValidationError) ErrorName() string { return "StringRulesValidationError" } + +// Error satisfies the builtin error interface +func (e StringRulesValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sStringRules.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = StringRulesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = StringRulesValidationError{} + +// Validate checks the field values on StringMapRules with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *StringMapRules) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StringMapRules with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in StringMapRulesMultiError, +// or nil if none found. +func (m *StringMapRules) ValidateAll() error { + return m.validate(true) +} + +func (m *StringMapRules) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for ValidateEmpty + + // no validation rules for IsRequired + + if len(errors) > 0 { + return StringMapRulesMultiError(errors) + } + + return nil +} + +// StringMapRulesMultiError is an error wrapping multiple validation errors +// returned by StringMapRules.ValidateAll() if the designated constraints +// aren't met. +type StringMapRulesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StringMapRulesMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StringMapRulesMultiError) AllErrors() []error { return m } + +// StringMapRulesValidationError is the validation error returned by +// StringMapRules.Validate if the designated constraints aren't met. +type StringMapRulesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e StringMapRulesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e StringMapRulesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e StringMapRulesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e StringMapRulesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e StringMapRulesValidationError) ErrorName() string { return "StringMapRulesValidationError" } + +// Error satisfies the builtin error interface +func (e StringMapRulesValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sStringMapRules.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = StringMapRulesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = StringMapRulesValidationError{} diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/action.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/action.pb.go new file mode 100644 index 00000000..569a555f --- /dev/null +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/action.pb.go @@ -0,0 +1,881 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.4 +// protoc (unknown) +// source: c1/connector/v2/action.proto + +package v2 + +import ( + v1 "github.com/conductorone/baton-sdk/pb/c1/config/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + anypb "google.golang.org/protobuf/types/known/anypb" + structpb "google.golang.org/protobuf/types/known/structpb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type BatonActionStatus int32 + +const ( + BatonActionStatus_BATON_ACTION_STATUS_UNSPECIFIED BatonActionStatus = 0 + BatonActionStatus_BATON_ACTION_STATUS_UNKNOWN BatonActionStatus = 1 + BatonActionStatus_BATON_ACTION_STATUS_PENDING BatonActionStatus = 2 + BatonActionStatus_BATON_ACTION_STATUS_RUNNING BatonActionStatus = 3 + BatonActionStatus_BATON_ACTION_STATUS_COMPLETE BatonActionStatus = 4 + BatonActionStatus_BATON_ACTION_STATUS_FAILED BatonActionStatus = 5 +) + +// Enum value maps for BatonActionStatus. +var ( + BatonActionStatus_name = map[int32]string{ + 0: "BATON_ACTION_STATUS_UNSPECIFIED", + 1: "BATON_ACTION_STATUS_UNKNOWN", + 2: "BATON_ACTION_STATUS_PENDING", + 3: "BATON_ACTION_STATUS_RUNNING", + 4: "BATON_ACTION_STATUS_COMPLETE", + 5: "BATON_ACTION_STATUS_FAILED", + } + BatonActionStatus_value = map[string]int32{ + "BATON_ACTION_STATUS_UNSPECIFIED": 0, + "BATON_ACTION_STATUS_UNKNOWN": 1, + "BATON_ACTION_STATUS_PENDING": 2, + "BATON_ACTION_STATUS_RUNNING": 3, + "BATON_ACTION_STATUS_COMPLETE": 4, + "BATON_ACTION_STATUS_FAILED": 5, + } +) + +func (x BatonActionStatus) Enum() *BatonActionStatus { + p := new(BatonActionStatus) + *p = x + return p +} + +func (x BatonActionStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (BatonActionStatus) Descriptor() protoreflect.EnumDescriptor { + return file_c1_connector_v2_action_proto_enumTypes[0].Descriptor() +} + +func (BatonActionStatus) Type() protoreflect.EnumType { + return &file_c1_connector_v2_action_proto_enumTypes[0] +} + +func (x BatonActionStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use BatonActionStatus.Descriptor instead. +func (BatonActionStatus) EnumDescriptor() ([]byte, []int) { + return file_c1_connector_v2_action_proto_rawDescGZIP(), []int{0} +} + +type BatonActionSchema struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Arguments []*v1.Field `protobuf:"bytes,2,rep,name=arguments,proto3" json:"arguments,omitempty"` + Constraints []*v1.Constraint `protobuf:"bytes,3,rep,name=constraints,proto3" json:"constraints,omitempty"` + ReturnTypes []*v1.Field `protobuf:"bytes,4,rep,name=return_types,json=returnTypes,proto3" json:"return_types,omitempty"` + DisplayName string `protobuf:"bytes,5,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BatonActionSchema) Reset() { + *x = BatonActionSchema{} + mi := &file_c1_connector_v2_action_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BatonActionSchema) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatonActionSchema) ProtoMessage() {} + +func (x *BatonActionSchema) ProtoReflect() protoreflect.Message { + mi := &file_c1_connector_v2_action_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BatonActionSchema.ProtoReflect.Descriptor instead. +func (*BatonActionSchema) Descriptor() ([]byte, []int) { + return file_c1_connector_v2_action_proto_rawDescGZIP(), []int{0} +} + +func (x *BatonActionSchema) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *BatonActionSchema) GetArguments() []*v1.Field { + if x != nil { + return x.Arguments + } + return nil +} + +func (x *BatonActionSchema) GetConstraints() []*v1.Constraint { + if x != nil { + return x.Constraints + } + return nil +} + +func (x *BatonActionSchema) GetReturnTypes() []*v1.Field { + if x != nil { + return x.ReturnTypes + } + return nil +} + +func (x *BatonActionSchema) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *BatonActionSchema) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +type InvokeActionRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Args *structpb.Struct `protobuf:"bytes,2,opt,name=args,proto3" json:"args,omitempty"` + Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InvokeActionRequest) Reset() { + *x = InvokeActionRequest{} + mi := &file_c1_connector_v2_action_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InvokeActionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InvokeActionRequest) ProtoMessage() {} + +func (x *InvokeActionRequest) ProtoReflect() protoreflect.Message { + mi := &file_c1_connector_v2_action_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InvokeActionRequest.ProtoReflect.Descriptor instead. +func (*InvokeActionRequest) Descriptor() ([]byte, []int) { + return file_c1_connector_v2_action_proto_rawDescGZIP(), []int{1} +} + +func (x *InvokeActionRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *InvokeActionRequest) GetArgs() *structpb.Struct { + if x != nil { + return x.Args + } + return nil +} + +func (x *InvokeActionRequest) GetAnnotations() []*anypb.Any { + if x != nil { + return x.Annotations + } + return nil +} + +type InvokeActionResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Status BatonActionStatus `protobuf:"varint,2,opt,name=status,proto3,enum=c1.connector.v2.BatonActionStatus" json:"status,omitempty"` + Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"` + Response *structpb.Struct `protobuf:"bytes,4,opt,name=response,proto3" json:"response,omitempty"` + Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InvokeActionResponse) Reset() { + *x = InvokeActionResponse{} + mi := &file_c1_connector_v2_action_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InvokeActionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InvokeActionResponse) ProtoMessage() {} + +func (x *InvokeActionResponse) ProtoReflect() protoreflect.Message { + mi := &file_c1_connector_v2_action_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InvokeActionResponse.ProtoReflect.Descriptor instead. +func (*InvokeActionResponse) Descriptor() ([]byte, []int) { + return file_c1_connector_v2_action_proto_rawDescGZIP(), []int{2} +} + +func (x *InvokeActionResponse) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *InvokeActionResponse) GetStatus() BatonActionStatus { + if x != nil { + return x.Status + } + return BatonActionStatus_BATON_ACTION_STATUS_UNSPECIFIED +} + +func (x *InvokeActionResponse) GetAnnotations() []*anypb.Any { + if x != nil { + return x.Annotations + } + return nil +} + +func (x *InvokeActionResponse) GetResponse() *structpb.Struct { + if x != nil { + return x.Response + } + return nil +} + +func (x *InvokeActionResponse) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type GetActionStatusRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Deprecated: Marked as deprecated in c1/connector/v2/action.proto. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetActionStatusRequest) Reset() { + *x = GetActionStatusRequest{} + mi := &file_c1_connector_v2_action_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetActionStatusRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetActionStatusRequest) ProtoMessage() {} + +func (x *GetActionStatusRequest) ProtoReflect() protoreflect.Message { + mi := &file_c1_connector_v2_action_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetActionStatusRequest.ProtoReflect.Descriptor instead. +func (*GetActionStatusRequest) Descriptor() ([]byte, []int) { + return file_c1_connector_v2_action_proto_rawDescGZIP(), []int{3} +} + +// Deprecated: Marked as deprecated in c1/connector/v2/action.proto. +func (x *GetActionStatusRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GetActionStatusRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *GetActionStatusRequest) GetAnnotations() []*anypb.Any { + if x != nil { + return x.Annotations + } + return nil +} + +type GetActionStatusResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + Status BatonActionStatus `protobuf:"varint,3,opt,name=status,proto3,enum=c1.connector.v2.BatonActionStatus" json:"status,omitempty"` + Annotations []*anypb.Any `protobuf:"bytes,4,rep,name=annotations,proto3" json:"annotations,omitempty"` + Response *structpb.Struct `protobuf:"bytes,5,opt,name=response,proto3" json:"response,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetActionStatusResponse) Reset() { + *x = GetActionStatusResponse{} + mi := &file_c1_connector_v2_action_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetActionStatusResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetActionStatusResponse) ProtoMessage() {} + +func (x *GetActionStatusResponse) ProtoReflect() protoreflect.Message { + mi := &file_c1_connector_v2_action_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetActionStatusResponse.ProtoReflect.Descriptor instead. +func (*GetActionStatusResponse) Descriptor() ([]byte, []int) { + return file_c1_connector_v2_action_proto_rawDescGZIP(), []int{4} +} + +func (x *GetActionStatusResponse) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GetActionStatusResponse) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *GetActionStatusResponse) GetStatus() BatonActionStatus { + if x != nil { + return x.Status + } + return BatonActionStatus_BATON_ACTION_STATUS_UNSPECIFIED +} + +func (x *GetActionStatusResponse) GetAnnotations() []*anypb.Any { + if x != nil { + return x.Annotations + } + return nil +} + +func (x *GetActionStatusResponse) GetResponse() *structpb.Struct { + if x != nil { + return x.Response + } + return nil +} + +type GetActionSchemaRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetActionSchemaRequest) Reset() { + *x = GetActionSchemaRequest{} + mi := &file_c1_connector_v2_action_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetActionSchemaRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetActionSchemaRequest) ProtoMessage() {} + +func (x *GetActionSchemaRequest) ProtoReflect() protoreflect.Message { + mi := &file_c1_connector_v2_action_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetActionSchemaRequest.ProtoReflect.Descriptor instead. +func (*GetActionSchemaRequest) Descriptor() ([]byte, []int) { + return file_c1_connector_v2_action_proto_rawDescGZIP(), []int{5} +} + +func (x *GetActionSchemaRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GetActionSchemaRequest) GetAnnotations() []*anypb.Any { + if x != nil { + return x.Annotations + } + return nil +} + +type GetActionSchemaResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Schema *BatonActionSchema `protobuf:"bytes,1,opt,name=schema,proto3" json:"schema,omitempty"` + Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetActionSchemaResponse) Reset() { + *x = GetActionSchemaResponse{} + mi := &file_c1_connector_v2_action_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetActionSchemaResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetActionSchemaResponse) ProtoMessage() {} + +func (x *GetActionSchemaResponse) ProtoReflect() protoreflect.Message { + mi := &file_c1_connector_v2_action_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetActionSchemaResponse.ProtoReflect.Descriptor instead. +func (*GetActionSchemaResponse) Descriptor() ([]byte, []int) { + return file_c1_connector_v2_action_proto_rawDescGZIP(), []int{6} +} + +func (x *GetActionSchemaResponse) GetSchema() *BatonActionSchema { + if x != nil { + return x.Schema + } + return nil +} + +func (x *GetActionSchemaResponse) GetAnnotations() []*anypb.Any { + if x != nil { + return x.Annotations + } + return nil +} + +type ListActionSchemasRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Annotations []*anypb.Any `protobuf:"bytes,1,rep,name=annotations,proto3" json:"annotations,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListActionSchemasRequest) Reset() { + *x = ListActionSchemasRequest{} + mi := &file_c1_connector_v2_action_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListActionSchemasRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListActionSchemasRequest) ProtoMessage() {} + +func (x *ListActionSchemasRequest) ProtoReflect() protoreflect.Message { + mi := &file_c1_connector_v2_action_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListActionSchemasRequest.ProtoReflect.Descriptor instead. +func (*ListActionSchemasRequest) Descriptor() ([]byte, []int) { + return file_c1_connector_v2_action_proto_rawDescGZIP(), []int{7} +} + +func (x *ListActionSchemasRequest) GetAnnotations() []*anypb.Any { + if x != nil { + return x.Annotations + } + return nil +} + +type ListActionSchemasResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Schemas []*BatonActionSchema `protobuf:"bytes,1,rep,name=schemas,proto3" json:"schemas,omitempty"` + Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListActionSchemasResponse) Reset() { + *x = ListActionSchemasResponse{} + mi := &file_c1_connector_v2_action_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListActionSchemasResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListActionSchemasResponse) ProtoMessage() {} + +func (x *ListActionSchemasResponse) ProtoReflect() protoreflect.Message { + mi := &file_c1_connector_v2_action_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListActionSchemasResponse.ProtoReflect.Descriptor instead. +func (*ListActionSchemasResponse) Descriptor() ([]byte, []int) { + return file_c1_connector_v2_action_proto_rawDescGZIP(), []int{8} +} + +func (x *ListActionSchemasResponse) GetSchemas() []*BatonActionSchema { + if x != nil { + return x.Schemas + } + return nil +} + +func (x *ListActionSchemasResponse) GetAnnotations() []*anypb.Any { + if x != nil { + return x.Annotations + } + return nil +} + +var File_c1_connector_v2_action_proto protoreflect.FileDescriptor + +var file_c1_connector_v2_action_proto_rawDesc = string([]byte{ + 0x0a, 0x1c, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, + 0x32, 0x2f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, + 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x1a, + 0x19, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0x93, 0x02, 0x0a, 0x11, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x41, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x31, 0x0a, + 0x09, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x13, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, 0x31, 0x2e, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x09, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x12, 0x3a, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x52, + 0x0b, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x36, 0x0a, 0x0c, + 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x76, + 0x31, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x0b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x54, + 0x79, 0x70, 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, + 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x8e, 0x01, 0x0a, 0x13, 0x49, 0x6e, + 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x04, 0x61, 0x72, + 0x67, 0x73, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xe3, 0x01, 0x0a, 0x14, 0x49, + 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x3a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x33, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, + 0x63, 0x74, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x22, 0x78, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xe6, 0x01, 0x0a, 0x17, 0x47, + 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3a, 0x0a, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x63, 0x31, 0x2e, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x61, 0x74, + 0x6f, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, + 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x33, + 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x64, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x8d, 0x01, 0x0a, 0x17, 0x47, 0x65, + 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x41, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x52, 0x0a, 0x18, 0x4c, 0x69, 0x73, + 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, + 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x91, 0x01, + 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x73, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, + 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x42, + 0x61, 0x74, 0x6f, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x52, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2a, 0xdd, 0x01, 0x0a, 0x11, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x23, 0x0a, 0x1f, 0x42, 0x41, 0x54, 0x4f, 0x4e, + 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, + 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1f, 0x0a, 0x1b, + 0x42, 0x41, 0x54, 0x4f, 0x4e, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, + 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x01, 0x12, 0x1f, 0x0a, + 0x1b, 0x42, 0x41, 0x54, 0x4f, 0x4e, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, + 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x1f, + 0x0a, 0x1b, 0x42, 0x41, 0x54, 0x4f, 0x4e, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, + 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, + 0x20, 0x0a, 0x1c, 0x42, 0x41, 0x54, 0x4f, 0x4e, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, + 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x54, 0x45, 0x10, + 0x04, 0x12, 0x1e, 0x0a, 0x1a, 0x42, 0x41, 0x54, 0x4f, 0x4e, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, + 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, + 0x05, 0x32, 0xa4, 0x03, 0x0a, 0x0d, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x12, 0x5b, 0x0a, 0x0c, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x41, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x63, 0x31, 0x2e, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x76, 0x6f, + 0x6b, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x64, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x27, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x63, + 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, + 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x27, 0x2e, 0x63, 0x31, 0x2e, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x41, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6a, 0x0a, 0x11, + 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x73, 0x12, 0x29, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x63, + 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, + 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, + 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +}) + +var ( + file_c1_connector_v2_action_proto_rawDescOnce sync.Once + file_c1_connector_v2_action_proto_rawDescData []byte +) + +func file_c1_connector_v2_action_proto_rawDescGZIP() []byte { + file_c1_connector_v2_action_proto_rawDescOnce.Do(func() { + file_c1_connector_v2_action_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_c1_connector_v2_action_proto_rawDesc), len(file_c1_connector_v2_action_proto_rawDesc))) + }) + return file_c1_connector_v2_action_proto_rawDescData +} + +var file_c1_connector_v2_action_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_c1_connector_v2_action_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_c1_connector_v2_action_proto_goTypes = []any{ + (BatonActionStatus)(0), // 0: c1.connector.v2.BatonActionStatus + (*BatonActionSchema)(nil), // 1: c1.connector.v2.BatonActionSchema + (*InvokeActionRequest)(nil), // 2: c1.connector.v2.InvokeActionRequest + (*InvokeActionResponse)(nil), // 3: c1.connector.v2.InvokeActionResponse + (*GetActionStatusRequest)(nil), // 4: c1.connector.v2.GetActionStatusRequest + (*GetActionStatusResponse)(nil), // 5: c1.connector.v2.GetActionStatusResponse + (*GetActionSchemaRequest)(nil), // 6: c1.connector.v2.GetActionSchemaRequest + (*GetActionSchemaResponse)(nil), // 7: c1.connector.v2.GetActionSchemaResponse + (*ListActionSchemasRequest)(nil), // 8: c1.connector.v2.ListActionSchemasRequest + (*ListActionSchemasResponse)(nil), // 9: c1.connector.v2.ListActionSchemasResponse + (*v1.Field)(nil), // 10: c1.config.v1.Field + (*v1.Constraint)(nil), // 11: c1.config.v1.Constraint + (*structpb.Struct)(nil), // 12: google.protobuf.Struct + (*anypb.Any)(nil), // 13: google.protobuf.Any +} +var file_c1_connector_v2_action_proto_depIdxs = []int32{ + 10, // 0: c1.connector.v2.BatonActionSchema.arguments:type_name -> c1.config.v1.Field + 11, // 1: c1.connector.v2.BatonActionSchema.constraints:type_name -> c1.config.v1.Constraint + 10, // 2: c1.connector.v2.BatonActionSchema.return_types:type_name -> c1.config.v1.Field + 12, // 3: c1.connector.v2.InvokeActionRequest.args:type_name -> google.protobuf.Struct + 13, // 4: c1.connector.v2.InvokeActionRequest.annotations:type_name -> google.protobuf.Any + 0, // 5: c1.connector.v2.InvokeActionResponse.status:type_name -> c1.connector.v2.BatonActionStatus + 13, // 6: c1.connector.v2.InvokeActionResponse.annotations:type_name -> google.protobuf.Any + 12, // 7: c1.connector.v2.InvokeActionResponse.response:type_name -> google.protobuf.Struct + 13, // 8: c1.connector.v2.GetActionStatusRequest.annotations:type_name -> google.protobuf.Any + 0, // 9: c1.connector.v2.GetActionStatusResponse.status:type_name -> c1.connector.v2.BatonActionStatus + 13, // 10: c1.connector.v2.GetActionStatusResponse.annotations:type_name -> google.protobuf.Any + 12, // 11: c1.connector.v2.GetActionStatusResponse.response:type_name -> google.protobuf.Struct + 13, // 12: c1.connector.v2.GetActionSchemaRequest.annotations:type_name -> google.protobuf.Any + 1, // 13: c1.connector.v2.GetActionSchemaResponse.schema:type_name -> c1.connector.v2.BatonActionSchema + 13, // 14: c1.connector.v2.GetActionSchemaResponse.annotations:type_name -> google.protobuf.Any + 13, // 15: c1.connector.v2.ListActionSchemasRequest.annotations:type_name -> google.protobuf.Any + 1, // 16: c1.connector.v2.ListActionSchemasResponse.schemas:type_name -> c1.connector.v2.BatonActionSchema + 13, // 17: c1.connector.v2.ListActionSchemasResponse.annotations:type_name -> google.protobuf.Any + 2, // 18: c1.connector.v2.ActionService.InvokeAction:input_type -> c1.connector.v2.InvokeActionRequest + 4, // 19: c1.connector.v2.ActionService.GetActionStatus:input_type -> c1.connector.v2.GetActionStatusRequest + 6, // 20: c1.connector.v2.ActionService.GetActionSchema:input_type -> c1.connector.v2.GetActionSchemaRequest + 8, // 21: c1.connector.v2.ActionService.ListActionSchemas:input_type -> c1.connector.v2.ListActionSchemasRequest + 3, // 22: c1.connector.v2.ActionService.InvokeAction:output_type -> c1.connector.v2.InvokeActionResponse + 5, // 23: c1.connector.v2.ActionService.GetActionStatus:output_type -> c1.connector.v2.GetActionStatusResponse + 7, // 24: c1.connector.v2.ActionService.GetActionSchema:output_type -> c1.connector.v2.GetActionSchemaResponse + 9, // 25: c1.connector.v2.ActionService.ListActionSchemas:output_type -> c1.connector.v2.ListActionSchemasResponse + 22, // [22:26] is the sub-list for method output_type + 18, // [18:22] is the sub-list for method input_type + 18, // [18:18] is the sub-list for extension type_name + 18, // [18:18] is the sub-list for extension extendee + 0, // [0:18] is the sub-list for field type_name +} + +func init() { file_c1_connector_v2_action_proto_init() } +func file_c1_connector_v2_action_proto_init() { + if File_c1_connector_v2_action_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_connector_v2_action_proto_rawDesc), len(file_c1_connector_v2_action_proto_rawDesc)), + NumEnums: 1, + NumMessages: 9, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_c1_connector_v2_action_proto_goTypes, + DependencyIndexes: file_c1_connector_v2_action_proto_depIdxs, + EnumInfos: file_c1_connector_v2_action_proto_enumTypes, + MessageInfos: file_c1_connector_v2_action_proto_msgTypes, + }.Build() + File_c1_connector_v2_action_proto = out.File + file_c1_connector_v2_action_proto_goTypes = nil + file_c1_connector_v2_action_proto_depIdxs = nil +} diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/action.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/action.pb.validate.go new file mode 100644 index 00000000..590b0616 --- /dev/null +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/action.pb.validate.go @@ -0,0 +1,1504 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: c1/connector/v2/action.proto + +package v2 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on BatonActionSchema with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *BatonActionSchema) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on BatonActionSchema with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// BatonActionSchemaMultiError, or nil if none found. +func (m *BatonActionSchema) ValidateAll() error { + return m.validate(true) +} + +func (m *BatonActionSchema) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Name + + for idx, item := range m.GetArguments() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BatonActionSchemaValidationError{ + field: fmt.Sprintf("Arguments[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BatonActionSchemaValidationError{ + field: fmt.Sprintf("Arguments[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return BatonActionSchemaValidationError{ + field: fmt.Sprintf("Arguments[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for idx, item := range m.GetConstraints() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BatonActionSchemaValidationError{ + field: fmt.Sprintf("Constraints[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BatonActionSchemaValidationError{ + field: fmt.Sprintf("Constraints[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return BatonActionSchemaValidationError{ + field: fmt.Sprintf("Constraints[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for idx, item := range m.GetReturnTypes() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, BatonActionSchemaValidationError{ + field: fmt.Sprintf("ReturnTypes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, BatonActionSchemaValidationError{ + field: fmt.Sprintf("ReturnTypes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return BatonActionSchemaValidationError{ + field: fmt.Sprintf("ReturnTypes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + // no validation rules for DisplayName + + // no validation rules for Description + + if len(errors) > 0 { + return BatonActionSchemaMultiError(errors) + } + + return nil +} + +// BatonActionSchemaMultiError is an error wrapping multiple validation errors +// returned by BatonActionSchema.ValidateAll() if the designated constraints +// aren't met. +type BatonActionSchemaMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m BatonActionSchemaMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m BatonActionSchemaMultiError) AllErrors() []error { return m } + +// BatonActionSchemaValidationError is the validation error returned by +// BatonActionSchema.Validate if the designated constraints aren't met. +type BatonActionSchemaValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e BatonActionSchemaValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e BatonActionSchemaValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e BatonActionSchemaValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e BatonActionSchemaValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e BatonActionSchemaValidationError) ErrorName() string { + return "BatonActionSchemaValidationError" +} + +// Error satisfies the builtin error interface +func (e BatonActionSchemaValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sBatonActionSchema.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = BatonActionSchemaValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = BatonActionSchemaValidationError{} + +// Validate checks the field values on InvokeActionRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *InvokeActionRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on InvokeActionRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// InvokeActionRequestMultiError, or nil if none found. +func (m *InvokeActionRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *InvokeActionRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Name + + if all { + switch v := interface{}(m.GetArgs()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, InvokeActionRequestValidationError{ + field: "Args", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, InvokeActionRequestValidationError{ + field: "Args", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetArgs()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return InvokeActionRequestValidationError{ + field: "Args", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for idx, item := range m.GetAnnotations() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, InvokeActionRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, InvokeActionRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return InvokeActionRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return InvokeActionRequestMultiError(errors) + } + + return nil +} + +// InvokeActionRequestMultiError is an error wrapping multiple validation +// errors returned by InvokeActionRequest.ValidateAll() if the designated +// constraints aren't met. +type InvokeActionRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m InvokeActionRequestMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m InvokeActionRequestMultiError) AllErrors() []error { return m } + +// InvokeActionRequestValidationError is the validation error returned by +// InvokeActionRequest.Validate if the designated constraints aren't met. +type InvokeActionRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e InvokeActionRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e InvokeActionRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e InvokeActionRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e InvokeActionRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e InvokeActionRequestValidationError) ErrorName() string { + return "InvokeActionRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e InvokeActionRequestValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sInvokeActionRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = InvokeActionRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = InvokeActionRequestValidationError{} + +// Validate checks the field values on InvokeActionResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *InvokeActionResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on InvokeActionResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// InvokeActionResponseMultiError, or nil if none found. +func (m *InvokeActionResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *InvokeActionResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Id + + // no validation rules for Status + + for idx, item := range m.GetAnnotations() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, InvokeActionResponseValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, InvokeActionResponseValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return InvokeActionResponseValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if all { + switch v := interface{}(m.GetResponse()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, InvokeActionResponseValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, InvokeActionResponseValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return InvokeActionResponseValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for Name + + if len(errors) > 0 { + return InvokeActionResponseMultiError(errors) + } + + return nil +} + +// InvokeActionResponseMultiError is an error wrapping multiple validation +// errors returned by InvokeActionResponse.ValidateAll() if the designated +// constraints aren't met. +type InvokeActionResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m InvokeActionResponseMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m InvokeActionResponseMultiError) AllErrors() []error { return m } + +// InvokeActionResponseValidationError is the validation error returned by +// InvokeActionResponse.Validate if the designated constraints aren't met. +type InvokeActionResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e InvokeActionResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e InvokeActionResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e InvokeActionResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e InvokeActionResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e InvokeActionResponseValidationError) ErrorName() string { + return "InvokeActionResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e InvokeActionResponseValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sInvokeActionResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = InvokeActionResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = InvokeActionResponseValidationError{} + +// Validate checks the field values on GetActionStatusRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *GetActionStatusRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GetActionStatusRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// GetActionStatusRequestMultiError, or nil if none found. +func (m *GetActionStatusRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *GetActionStatusRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Name + + // no validation rules for Id + + for idx, item := range m.GetAnnotations() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GetActionStatusRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GetActionStatusRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return GetActionStatusRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return GetActionStatusRequestMultiError(errors) + } + + return nil +} + +// GetActionStatusRequestMultiError is an error wrapping multiple validation +// errors returned by GetActionStatusRequest.ValidateAll() if the designated +// constraints aren't met. +type GetActionStatusRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GetActionStatusRequestMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GetActionStatusRequestMultiError) AllErrors() []error { return m } + +// GetActionStatusRequestValidationError is the validation error returned by +// GetActionStatusRequest.Validate if the designated constraints aren't met. +type GetActionStatusRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e GetActionStatusRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e GetActionStatusRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e GetActionStatusRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e GetActionStatusRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e GetActionStatusRequestValidationError) ErrorName() string { + return "GetActionStatusRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e GetActionStatusRequestValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sGetActionStatusRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = GetActionStatusRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = GetActionStatusRequestValidationError{} + +// Validate checks the field values on GetActionStatusResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *GetActionStatusResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GetActionStatusResponse with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// GetActionStatusResponseMultiError, or nil if none found. +func (m *GetActionStatusResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *GetActionStatusResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Name + + // no validation rules for Id + + // no validation rules for Status + + for idx, item := range m.GetAnnotations() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GetActionStatusResponseValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GetActionStatusResponseValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return GetActionStatusResponseValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if all { + switch v := interface{}(m.GetResponse()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GetActionStatusResponseValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GetActionStatusResponseValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return GetActionStatusResponseValidationError{ + field: "Response", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return GetActionStatusResponseMultiError(errors) + } + + return nil +} + +// GetActionStatusResponseMultiError is an error wrapping multiple validation +// errors returned by GetActionStatusResponse.ValidateAll() if the designated +// constraints aren't met. +type GetActionStatusResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GetActionStatusResponseMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GetActionStatusResponseMultiError) AllErrors() []error { return m } + +// GetActionStatusResponseValidationError is the validation error returned by +// GetActionStatusResponse.Validate if the designated constraints aren't met. +type GetActionStatusResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e GetActionStatusResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e GetActionStatusResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e GetActionStatusResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e GetActionStatusResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e GetActionStatusResponseValidationError) ErrorName() string { + return "GetActionStatusResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e GetActionStatusResponseValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sGetActionStatusResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = GetActionStatusResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = GetActionStatusResponseValidationError{} + +// Validate checks the field values on GetActionSchemaRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *GetActionSchemaRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GetActionSchemaRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// GetActionSchemaRequestMultiError, or nil if none found. +func (m *GetActionSchemaRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *GetActionSchemaRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Name + + for idx, item := range m.GetAnnotations() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GetActionSchemaRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GetActionSchemaRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return GetActionSchemaRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return GetActionSchemaRequestMultiError(errors) + } + + return nil +} + +// GetActionSchemaRequestMultiError is an error wrapping multiple validation +// errors returned by GetActionSchemaRequest.ValidateAll() if the designated +// constraints aren't met. +type GetActionSchemaRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GetActionSchemaRequestMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GetActionSchemaRequestMultiError) AllErrors() []error { return m } + +// GetActionSchemaRequestValidationError is the validation error returned by +// GetActionSchemaRequest.Validate if the designated constraints aren't met. +type GetActionSchemaRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e GetActionSchemaRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e GetActionSchemaRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e GetActionSchemaRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e GetActionSchemaRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e GetActionSchemaRequestValidationError) ErrorName() string { + return "GetActionSchemaRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e GetActionSchemaRequestValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sGetActionSchemaRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = GetActionSchemaRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = GetActionSchemaRequestValidationError{} + +// Validate checks the field values on GetActionSchemaResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *GetActionSchemaResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GetActionSchemaResponse with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// GetActionSchemaResponseMultiError, or nil if none found. +func (m *GetActionSchemaResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *GetActionSchemaResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetSchema()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GetActionSchemaResponseValidationError{ + field: "Schema", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GetActionSchemaResponseValidationError{ + field: "Schema", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSchema()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return GetActionSchemaResponseValidationError{ + field: "Schema", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for idx, item := range m.GetAnnotations() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GetActionSchemaResponseValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GetActionSchemaResponseValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return GetActionSchemaResponseValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return GetActionSchemaResponseMultiError(errors) + } + + return nil +} + +// GetActionSchemaResponseMultiError is an error wrapping multiple validation +// errors returned by GetActionSchemaResponse.ValidateAll() if the designated +// constraints aren't met. +type GetActionSchemaResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GetActionSchemaResponseMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GetActionSchemaResponseMultiError) AllErrors() []error { return m } + +// GetActionSchemaResponseValidationError is the validation error returned by +// GetActionSchemaResponse.Validate if the designated constraints aren't met. +type GetActionSchemaResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e GetActionSchemaResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e GetActionSchemaResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e GetActionSchemaResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e GetActionSchemaResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e GetActionSchemaResponseValidationError) ErrorName() string { + return "GetActionSchemaResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e GetActionSchemaResponseValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sGetActionSchemaResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = GetActionSchemaResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = GetActionSchemaResponseValidationError{} + +// Validate checks the field values on ListActionSchemasRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *ListActionSchemasRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ListActionSchemasRequest with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ListActionSchemasRequestMultiError, or nil if none found. +func (m *ListActionSchemasRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *ListActionSchemasRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetAnnotations() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListActionSchemasRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListActionSchemasRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListActionSchemasRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return ListActionSchemasRequestMultiError(errors) + } + + return nil +} + +// ListActionSchemasRequestMultiError is an error wrapping multiple validation +// errors returned by ListActionSchemasRequest.ValidateAll() if the designated +// constraints aren't met. +type ListActionSchemasRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ListActionSchemasRequestMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ListActionSchemasRequestMultiError) AllErrors() []error { return m } + +// ListActionSchemasRequestValidationError is the validation error returned by +// ListActionSchemasRequest.Validate if the designated constraints aren't met. +type ListActionSchemasRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ListActionSchemasRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ListActionSchemasRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ListActionSchemasRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ListActionSchemasRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ListActionSchemasRequestValidationError) ErrorName() string { + return "ListActionSchemasRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e ListActionSchemasRequestValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sListActionSchemasRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ListActionSchemasRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ListActionSchemasRequestValidationError{} + +// Validate checks the field values on ListActionSchemasResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *ListActionSchemasResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ListActionSchemasResponse with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ListActionSchemasResponseMultiError, or nil if none found. +func (m *ListActionSchemasResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *ListActionSchemasResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetSchemas() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListActionSchemasResponseValidationError{ + field: fmt.Sprintf("Schemas[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListActionSchemasResponseValidationError{ + field: fmt.Sprintf("Schemas[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListActionSchemasResponseValidationError{ + field: fmt.Sprintf("Schemas[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for idx, item := range m.GetAnnotations() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListActionSchemasResponseValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListActionSchemasResponseValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListActionSchemasResponseValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return ListActionSchemasResponseMultiError(errors) + } + + return nil +} + +// ListActionSchemasResponseMultiError is an error wrapping multiple validation +// errors returned by ListActionSchemasResponse.ValidateAll() if the +// designated constraints aren't met. +type ListActionSchemasResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ListActionSchemasResponseMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ListActionSchemasResponseMultiError) AllErrors() []error { return m } + +// ListActionSchemasResponseValidationError is the validation error returned by +// ListActionSchemasResponse.Validate if the designated constraints aren't met. +type ListActionSchemasResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ListActionSchemasResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ListActionSchemasResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ListActionSchemasResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ListActionSchemasResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ListActionSchemasResponseValidationError) ErrorName() string { + return "ListActionSchemasResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e ListActionSchemasResponseValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sListActionSchemasResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ListActionSchemasResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ListActionSchemasResponseValidationError{} diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/action_grpc.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/action_grpc.pb.go new file mode 100644 index 00000000..3600a529 --- /dev/null +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/action_grpc.pb.go @@ -0,0 +1,233 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc (unknown) +// source: c1/connector/v2/action.proto + +package v2 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + ActionService_InvokeAction_FullMethodName = "/c1.connector.v2.ActionService/InvokeAction" + ActionService_GetActionStatus_FullMethodName = "/c1.connector.v2.ActionService/GetActionStatus" + ActionService_GetActionSchema_FullMethodName = "/c1.connector.v2.ActionService/GetActionSchema" + ActionService_ListActionSchemas_FullMethodName = "/c1.connector.v2.ActionService/ListActionSchemas" +) + +// ActionServiceClient is the client API for ActionService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type ActionServiceClient interface { + InvokeAction(ctx context.Context, in *InvokeActionRequest, opts ...grpc.CallOption) (*InvokeActionResponse, error) + GetActionStatus(ctx context.Context, in *GetActionStatusRequest, opts ...grpc.CallOption) (*GetActionStatusResponse, error) + GetActionSchema(ctx context.Context, in *GetActionSchemaRequest, opts ...grpc.CallOption) (*GetActionSchemaResponse, error) + ListActionSchemas(ctx context.Context, in *ListActionSchemasRequest, opts ...grpc.CallOption) (*ListActionSchemasResponse, error) +} + +type actionServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewActionServiceClient(cc grpc.ClientConnInterface) ActionServiceClient { + return &actionServiceClient{cc} +} + +func (c *actionServiceClient) InvokeAction(ctx context.Context, in *InvokeActionRequest, opts ...grpc.CallOption) (*InvokeActionResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(InvokeActionResponse) + err := c.cc.Invoke(ctx, ActionService_InvokeAction_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *actionServiceClient) GetActionStatus(ctx context.Context, in *GetActionStatusRequest, opts ...grpc.CallOption) (*GetActionStatusResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetActionStatusResponse) + err := c.cc.Invoke(ctx, ActionService_GetActionStatus_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *actionServiceClient) GetActionSchema(ctx context.Context, in *GetActionSchemaRequest, opts ...grpc.CallOption) (*GetActionSchemaResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetActionSchemaResponse) + err := c.cc.Invoke(ctx, ActionService_GetActionSchema_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *actionServiceClient) ListActionSchemas(ctx context.Context, in *ListActionSchemasRequest, opts ...grpc.CallOption) (*ListActionSchemasResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListActionSchemasResponse) + err := c.cc.Invoke(ctx, ActionService_ListActionSchemas_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ActionServiceServer is the server API for ActionService service. +// All implementations should embed UnimplementedActionServiceServer +// for forward compatibility. +type ActionServiceServer interface { + InvokeAction(context.Context, *InvokeActionRequest) (*InvokeActionResponse, error) + GetActionStatus(context.Context, *GetActionStatusRequest) (*GetActionStatusResponse, error) + GetActionSchema(context.Context, *GetActionSchemaRequest) (*GetActionSchemaResponse, error) + ListActionSchemas(context.Context, *ListActionSchemasRequest) (*ListActionSchemasResponse, error) +} + +// UnimplementedActionServiceServer should be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedActionServiceServer struct{} + +func (UnimplementedActionServiceServer) InvokeAction(context.Context, *InvokeActionRequest) (*InvokeActionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method InvokeAction not implemented") +} +func (UnimplementedActionServiceServer) GetActionStatus(context.Context, *GetActionStatusRequest) (*GetActionStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetActionStatus not implemented") +} +func (UnimplementedActionServiceServer) GetActionSchema(context.Context, *GetActionSchemaRequest) (*GetActionSchemaResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetActionSchema not implemented") +} +func (UnimplementedActionServiceServer) ListActionSchemas(context.Context, *ListActionSchemasRequest) (*ListActionSchemasResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListActionSchemas not implemented") +} +func (UnimplementedActionServiceServer) testEmbeddedByValue() {} + +// UnsafeActionServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ActionServiceServer will +// result in compilation errors. +type UnsafeActionServiceServer interface { + mustEmbedUnimplementedActionServiceServer() +} + +func RegisterActionServiceServer(s grpc.ServiceRegistrar, srv ActionServiceServer) { + // If the following call pancis, it indicates UnimplementedActionServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&ActionService_ServiceDesc, srv) +} + +func _ActionService_InvokeAction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(InvokeActionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ActionServiceServer).InvokeAction(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ActionService_InvokeAction_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ActionServiceServer).InvokeAction(ctx, req.(*InvokeActionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ActionService_GetActionStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetActionStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ActionServiceServer).GetActionStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ActionService_GetActionStatus_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ActionServiceServer).GetActionStatus(ctx, req.(*GetActionStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ActionService_GetActionSchema_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetActionSchemaRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ActionServiceServer).GetActionSchema(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ActionService_GetActionSchema_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ActionServiceServer).GetActionSchema(ctx, req.(*GetActionSchemaRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ActionService_ListActionSchemas_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListActionSchemasRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ActionServiceServer).ListActionSchemas(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ActionService_ListActionSchemas_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ActionServiceServer).ListActionSchemas(ctx, req.(*ListActionSchemasRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ActionService_ServiceDesc is the grpc.ServiceDesc for ActionService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ActionService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "c1.connector.v2.ActionService", + HandlerType: (*ActionServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "InvokeAction", + Handler: _ActionService_InvokeAction_Handler, + }, + { + MethodName: "GetActionStatus", + Handler: _ActionService_GetActionStatus_Handler, + }, + { + MethodName: "GetActionSchema", + Handler: _ActionService_GetActionSchema_Handler, + }, + { + MethodName: "ListActionSchemas", + Handler: _ActionService_ListActionSchemas_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "c1/connector/v2/action.proto", +} diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_baton_id.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_baton_id.pb.go new file mode 100644 index 00000000..88f6033b --- /dev/null +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_baton_id.pb.go @@ -0,0 +1,295 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.4 +// protoc (unknown) +// source: c1/connector/v2/annotation_baton_id.proto + +package v2 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ExternalResourceMatch struct { + state protoimpl.MessageState `protogen:"open.v1"` + ResourceType ResourceType_Trait `protobuf:"varint,1,opt,name=resource_type,json=resourceType,proto3,enum=c1.connector.v2.ResourceType_Trait" json:"resource_type,omitempty"` + Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` + Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ExternalResourceMatch) Reset() { + *x = ExternalResourceMatch{} + mi := &file_c1_connector_v2_annotation_baton_id_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ExternalResourceMatch) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExternalResourceMatch) ProtoMessage() {} + +func (x *ExternalResourceMatch) ProtoReflect() protoreflect.Message { + mi := &file_c1_connector_v2_annotation_baton_id_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExternalResourceMatch.ProtoReflect.Descriptor instead. +func (*ExternalResourceMatch) Descriptor() ([]byte, []int) { + return file_c1_connector_v2_annotation_baton_id_proto_rawDescGZIP(), []int{0} +} + +func (x *ExternalResourceMatch) GetResourceType() ResourceType_Trait { + if x != nil { + return x.ResourceType + } + return ResourceType_TRAIT_UNSPECIFIED +} + +func (x *ExternalResourceMatch) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *ExternalResourceMatch) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +type ExternalResourceMatchAll struct { + state protoimpl.MessageState `protogen:"open.v1"` + ResourceType ResourceType_Trait `protobuf:"varint,1,opt,name=resource_type,json=resourceType,proto3,enum=c1.connector.v2.ResourceType_Trait" json:"resource_type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ExternalResourceMatchAll) Reset() { + *x = ExternalResourceMatchAll{} + mi := &file_c1_connector_v2_annotation_baton_id_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ExternalResourceMatchAll) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExternalResourceMatchAll) ProtoMessage() {} + +func (x *ExternalResourceMatchAll) ProtoReflect() protoreflect.Message { + mi := &file_c1_connector_v2_annotation_baton_id_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExternalResourceMatchAll.ProtoReflect.Descriptor instead. +func (*ExternalResourceMatchAll) Descriptor() ([]byte, []int) { + return file_c1_connector_v2_annotation_baton_id_proto_rawDescGZIP(), []int{1} +} + +func (x *ExternalResourceMatchAll) GetResourceType() ResourceType_Trait { + if x != nil { + return x.ResourceType + } + return ResourceType_TRAIT_UNSPECIFIED +} + +type ExternalResourceMatchID struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ExternalResourceMatchID) Reset() { + *x = ExternalResourceMatchID{} + mi := &file_c1_connector_v2_annotation_baton_id_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ExternalResourceMatchID) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExternalResourceMatchID) ProtoMessage() {} + +func (x *ExternalResourceMatchID) ProtoReflect() protoreflect.Message { + mi := &file_c1_connector_v2_annotation_baton_id_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExternalResourceMatchID.ProtoReflect.Descriptor instead. +func (*ExternalResourceMatchID) Descriptor() ([]byte, []int) { + return file_c1_connector_v2_annotation_baton_id_proto_rawDescGZIP(), []int{2} +} + +func (x *ExternalResourceMatchID) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type BatonID struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BatonID) Reset() { + *x = BatonID{} + mi := &file_c1_connector_v2_annotation_baton_id_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BatonID) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatonID) ProtoMessage() {} + +func (x *BatonID) ProtoReflect() protoreflect.Message { + mi := &file_c1_connector_v2_annotation_baton_id_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BatonID.ProtoReflect.Descriptor instead. +func (*BatonID) Descriptor() ([]byte, []int) { + return file_c1_connector_v2_annotation_baton_id_proto_rawDescGZIP(), []int{3} +} + +var File_c1_connector_v2_annotation_baton_id_proto protoreflect.FileDescriptor + +var file_c1_connector_v2_annotation_baton_id_proto_rawDesc = string([]byte{ + 0x0a, 0x29, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, + 0x32, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x61, 0x74, + 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x63, 0x31, 0x2e, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x1a, 0x1e, 0x63, 0x31, + 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x2f, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x89, 0x01, 0x0a, + 0x15, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x48, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, + 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x54, 0x72, 0x61, + 0x69, 0x74, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x64, 0x0a, 0x18, 0x45, 0x78, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x41, 0x6c, 0x6c, 0x12, 0x48, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x63, 0x31, + 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x69, 0x74, + 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x29, + 0x0a, 0x17, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x49, 0x44, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x09, 0x0a, 0x07, 0x42, 0x61, 0x74, + 0x6f, 0x6e, 0x49, 0x44, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f, + 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +}) + +var ( + file_c1_connector_v2_annotation_baton_id_proto_rawDescOnce sync.Once + file_c1_connector_v2_annotation_baton_id_proto_rawDescData []byte +) + +func file_c1_connector_v2_annotation_baton_id_proto_rawDescGZIP() []byte { + file_c1_connector_v2_annotation_baton_id_proto_rawDescOnce.Do(func() { + file_c1_connector_v2_annotation_baton_id_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_c1_connector_v2_annotation_baton_id_proto_rawDesc), len(file_c1_connector_v2_annotation_baton_id_proto_rawDesc))) + }) + return file_c1_connector_v2_annotation_baton_id_proto_rawDescData +} + +var file_c1_connector_v2_annotation_baton_id_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_c1_connector_v2_annotation_baton_id_proto_goTypes = []any{ + (*ExternalResourceMatch)(nil), // 0: c1.connector.v2.ExternalResourceMatch + (*ExternalResourceMatchAll)(nil), // 1: c1.connector.v2.ExternalResourceMatchAll + (*ExternalResourceMatchID)(nil), // 2: c1.connector.v2.ExternalResourceMatchID + (*BatonID)(nil), // 3: c1.connector.v2.BatonID + (ResourceType_Trait)(0), // 4: c1.connector.v2.ResourceType.Trait +} +var file_c1_connector_v2_annotation_baton_id_proto_depIdxs = []int32{ + 4, // 0: c1.connector.v2.ExternalResourceMatch.resource_type:type_name -> c1.connector.v2.ResourceType.Trait + 4, // 1: c1.connector.v2.ExternalResourceMatchAll.resource_type:type_name -> c1.connector.v2.ResourceType.Trait + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_c1_connector_v2_annotation_baton_id_proto_init() } +func file_c1_connector_v2_annotation_baton_id_proto_init() { + if File_c1_connector_v2_annotation_baton_id_proto != nil { + return + } + file_c1_connector_v2_resource_proto_init() + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_connector_v2_annotation_baton_id_proto_rawDesc), len(file_c1_connector_v2_annotation_baton_id_proto_rawDesc)), + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_c1_connector_v2_annotation_baton_id_proto_goTypes, + DependencyIndexes: file_c1_connector_v2_annotation_baton_id_proto_depIdxs, + MessageInfos: file_c1_connector_v2_annotation_baton_id_proto_msgTypes, + }.Build() + File_c1_connector_v2_annotation_baton_id_proto = out.File + file_c1_connector_v2_annotation_baton_id_proto_goTypes = nil + file_c1_connector_v2_annotation_baton_id_proto_depIdxs = nil +} diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_baton_id.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_baton_id.pb.validate.go new file mode 100644 index 00000000..7c452bdd --- /dev/null +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_baton_id.pb.validate.go @@ -0,0 +1,450 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: c1/connector/v2/annotation_baton_id.proto + +package v2 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on ExternalResourceMatch with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *ExternalResourceMatch) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ExternalResourceMatch with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ExternalResourceMatchMultiError, or nil if none found. +func (m *ExternalResourceMatch) ValidateAll() error { + return m.validate(true) +} + +func (m *ExternalResourceMatch) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for ResourceType + + // no validation rules for Key + + // no validation rules for Value + + if len(errors) > 0 { + return ExternalResourceMatchMultiError(errors) + } + + return nil +} + +// ExternalResourceMatchMultiError is an error wrapping multiple validation +// errors returned by ExternalResourceMatch.ValidateAll() if the designated +// constraints aren't met. +type ExternalResourceMatchMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ExternalResourceMatchMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ExternalResourceMatchMultiError) AllErrors() []error { return m } + +// ExternalResourceMatchValidationError is the validation error returned by +// ExternalResourceMatch.Validate if the designated constraints aren't met. +type ExternalResourceMatchValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ExternalResourceMatchValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ExternalResourceMatchValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ExternalResourceMatchValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ExternalResourceMatchValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ExternalResourceMatchValidationError) ErrorName() string { + return "ExternalResourceMatchValidationError" +} + +// Error satisfies the builtin error interface +func (e ExternalResourceMatchValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sExternalResourceMatch.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ExternalResourceMatchValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ExternalResourceMatchValidationError{} + +// Validate checks the field values on ExternalResourceMatchAll with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *ExternalResourceMatchAll) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ExternalResourceMatchAll with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ExternalResourceMatchAllMultiError, or nil if none found. +func (m *ExternalResourceMatchAll) ValidateAll() error { + return m.validate(true) +} + +func (m *ExternalResourceMatchAll) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for ResourceType + + if len(errors) > 0 { + return ExternalResourceMatchAllMultiError(errors) + } + + return nil +} + +// ExternalResourceMatchAllMultiError is an error wrapping multiple validation +// errors returned by ExternalResourceMatchAll.ValidateAll() if the designated +// constraints aren't met. +type ExternalResourceMatchAllMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ExternalResourceMatchAllMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ExternalResourceMatchAllMultiError) AllErrors() []error { return m } + +// ExternalResourceMatchAllValidationError is the validation error returned by +// ExternalResourceMatchAll.Validate if the designated constraints aren't met. +type ExternalResourceMatchAllValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ExternalResourceMatchAllValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ExternalResourceMatchAllValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ExternalResourceMatchAllValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ExternalResourceMatchAllValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ExternalResourceMatchAllValidationError) ErrorName() string { + return "ExternalResourceMatchAllValidationError" +} + +// Error satisfies the builtin error interface +func (e ExternalResourceMatchAllValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sExternalResourceMatchAll.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ExternalResourceMatchAllValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ExternalResourceMatchAllValidationError{} + +// Validate checks the field values on ExternalResourceMatchID with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *ExternalResourceMatchID) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ExternalResourceMatchID with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ExternalResourceMatchIDMultiError, or nil if none found. +func (m *ExternalResourceMatchID) ValidateAll() error { + return m.validate(true) +} + +func (m *ExternalResourceMatchID) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Id + + if len(errors) > 0 { + return ExternalResourceMatchIDMultiError(errors) + } + + return nil +} + +// ExternalResourceMatchIDMultiError is an error wrapping multiple validation +// errors returned by ExternalResourceMatchID.ValidateAll() if the designated +// constraints aren't met. +type ExternalResourceMatchIDMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ExternalResourceMatchIDMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ExternalResourceMatchIDMultiError) AllErrors() []error { return m } + +// ExternalResourceMatchIDValidationError is the validation error returned by +// ExternalResourceMatchID.Validate if the designated constraints aren't met. +type ExternalResourceMatchIDValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ExternalResourceMatchIDValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ExternalResourceMatchIDValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ExternalResourceMatchIDValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ExternalResourceMatchIDValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ExternalResourceMatchIDValidationError) ErrorName() string { + return "ExternalResourceMatchIDValidationError" +} + +// Error satisfies the builtin error interface +func (e ExternalResourceMatchIDValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sExternalResourceMatchID.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ExternalResourceMatchIDValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ExternalResourceMatchIDValidationError{} + +// Validate checks the field values on BatonID with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *BatonID) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on BatonID with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in BatonIDMultiError, or nil if none found. +func (m *BatonID) ValidateAll() error { + return m.validate(true) +} + +func (m *BatonID) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return BatonIDMultiError(errors) + } + + return nil +} + +// BatonIDMultiError is an error wrapping multiple validation errors returned +// by BatonID.ValidateAll() if the designated constraints aren't met. +type BatonIDMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m BatonIDMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m BatonIDMultiError) AllErrors() []error { return m } + +// BatonIDValidationError is the validation error returned by BatonID.Validate +// if the designated constraints aren't met. +type BatonIDValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e BatonIDValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e BatonIDValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e BatonIDValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e BatonIDValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e BatonIDValidationError) ErrorName() string { return "BatonIDValidationError" } + +// Error satisfies the builtin error interface +func (e BatonIDValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sBatonID.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = BatonIDValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = BatonIDValidationError{} diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_raw_id.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_raw_id.pb.go new file mode 100644 index 00000000..72063239 --- /dev/null +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_raw_id.pb.go @@ -0,0 +1,130 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.4 +// protoc (unknown) +// source: c1/connector/v2/annotation_raw_id.proto + +package v2 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Raw ID from whatever API the resource/entitlement/grant came from. +type RawId struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RawId) Reset() { + *x = RawId{} + mi := &file_c1_connector_v2_annotation_raw_id_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RawId) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RawId) ProtoMessage() {} + +func (x *RawId) ProtoReflect() protoreflect.Message { + mi := &file_c1_connector_v2_annotation_raw_id_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RawId.ProtoReflect.Descriptor instead. +func (*RawId) Descriptor() ([]byte, []int) { + return file_c1_connector_v2_annotation_raw_id_proto_rawDescGZIP(), []int{0} +} + +func (x *RawId) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +var File_c1_connector_v2_annotation_raw_id_proto protoreflect.FileDescriptor + +var file_c1_connector_v2_annotation_raw_id_proto_rawDesc = string([]byte{ + 0x0a, 0x27, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, + 0x32, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x77, + 0x5f, 0x69, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x63, 0x31, 0x2e, 0x63, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x22, 0x17, 0x0a, 0x05, 0x52, 0x61, + 0x77, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62, + 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +}) + +var ( + file_c1_connector_v2_annotation_raw_id_proto_rawDescOnce sync.Once + file_c1_connector_v2_annotation_raw_id_proto_rawDescData []byte +) + +func file_c1_connector_v2_annotation_raw_id_proto_rawDescGZIP() []byte { + file_c1_connector_v2_annotation_raw_id_proto_rawDescOnce.Do(func() { + file_c1_connector_v2_annotation_raw_id_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_c1_connector_v2_annotation_raw_id_proto_rawDesc), len(file_c1_connector_v2_annotation_raw_id_proto_rawDesc))) + }) + return file_c1_connector_v2_annotation_raw_id_proto_rawDescData +} + +var file_c1_connector_v2_annotation_raw_id_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_c1_connector_v2_annotation_raw_id_proto_goTypes = []any{ + (*RawId)(nil), // 0: c1.connector.v2.RawId +} +var file_c1_connector_v2_annotation_raw_id_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_c1_connector_v2_annotation_raw_id_proto_init() } +func file_c1_connector_v2_annotation_raw_id_proto_init() { + if File_c1_connector_v2_annotation_raw_id_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_connector_v2_annotation_raw_id_proto_rawDesc), len(file_c1_connector_v2_annotation_raw_id_proto_rawDesc)), + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_c1_connector_v2_annotation_raw_id_proto_goTypes, + DependencyIndexes: file_c1_connector_v2_annotation_raw_id_proto_depIdxs, + MessageInfos: file_c1_connector_v2_annotation_raw_id_proto_msgTypes, + }.Build() + File_c1_connector_v2_annotation_raw_id_proto = out.File + file_c1_connector_v2_annotation_raw_id_proto_goTypes = nil + file_c1_connector_v2_annotation_raw_id_proto_depIdxs = nil +} diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_raw_id.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_raw_id.pb.validate.go new file mode 100644 index 00000000..f2bb5688 --- /dev/null +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_raw_id.pb.validate.go @@ -0,0 +1,136 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: c1/connector/v2/annotation_raw_id.proto + +package v2 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on RawId with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *RawId) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RawId with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in RawIdMultiError, or nil if none found. +func (m *RawId) ValidateAll() error { + return m.validate(true) +} + +func (m *RawId) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Id + + if len(errors) > 0 { + return RawIdMultiError(errors) + } + + return nil +} + +// RawIdMultiError is an error wrapping multiple validation errors returned by +// RawId.ValidateAll() if the designated constraints aren't met. +type RawIdMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RawIdMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RawIdMultiError) AllErrors() []error { return m } + +// RawIdValidationError is the validation error returned by RawId.Validate if +// the designated constraints aren't met. +type RawIdValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RawIdValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RawIdValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RawIdValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RawIdValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RawIdValidationError) ErrorName() string { return "RawIdValidationError" } + +// Error satisfies the builtin error interface +func (e RawIdValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sRawId.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RawIdValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RawIdValidationError{} diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_trait.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_trait.pb.go index 67256fe5..628193c9 100644 --- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_trait.pb.go +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_trait.pb.go @@ -197,6 +197,7 @@ type UserTrait struct { Login string `protobuf:"bytes,6,opt,name=login,proto3" json:"login,omitempty"` // Any additional login aliases for the user LoginAliases []string `protobuf:"bytes,7,rep,name=login_aliases,json=loginAliases,proto3" json:"login_aliases,omitempty"` + EmployeeIds []string `protobuf:"bytes,13,rep,name=employee_ids,json=employeeIds,proto3" json:"employee_ids,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` LastLogin *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=last_login,json=lastLogin,proto3" json:"last_login,omitempty"` MfaStatus *UserTrait_MFAStatus `protobuf:"bytes,10,opt,name=mfa_status,json=mfaStatus,proto3" json:"mfa_status,omitempty"` @@ -285,6 +286,13 @@ func (x *UserTrait) GetLoginAliases() []string { return nil } +func (x *UserTrait) GetEmployeeIds() []string { + if x != nil { + return x.EmployeeIds + } + return nil +} + func (x *UserTrait) GetCreatedAt() *timestamppb.Timestamp { if x != nil { return x.CreatedAt @@ -860,8 +868,8 @@ var file_c1_connector_v2_annotation_trait_proto_rawDesc = string([]byte{ 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf4, - 0x0a, 0x0a, 0x09, 0x55, 0x73, 0x65, 0x72, 0x54, 0x72, 0x61, 0x69, 0x74, 0x12, 0x38, 0x0a, 0x06, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x97, + 0x0b, 0x0a, 0x09, 0x55, 0x73, 0x65, 0x72, 0x54, 0x72, 0x61, 0x69, 0x74, 0x12, 0x38, 0x0a, 0x06, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x54, 0x72, 0x61, 0x69, 0x74, 0x2e, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x52, 0x06, @@ -884,135 +892,137 @@ var file_c1_connector_v2_annotation_trait_proto_rawDesc = string([]byte{ 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x0c, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x12, 0x39, 0x0a, - 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x6c, 0x61, 0x73, 0x74, - 0x5f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x0c, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x12, 0x21, 0x0a, + 0x0c, 0x65, 0x6d, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x0d, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x0b, 0x65, 0x6d, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x65, 0x49, 0x64, 0x73, + 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x6c, + 0x61, 0x73, 0x74, 0x5f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x6c, 0x61, 0x73, + 0x74, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x43, 0x0a, 0x0a, 0x6d, 0x66, 0x61, 0x5f, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x31, 0x2e, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x73, 0x65, + 0x72, 0x54, 0x72, 0x61, 0x69, 0x74, 0x2e, 0x4d, 0x46, 0x41, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x52, 0x09, 0x6d, 0x66, 0x61, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x43, 0x0a, 0x0a, 0x73, + 0x73, 0x6f, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x24, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, + 0x32, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x54, 0x72, 0x61, 0x69, 0x74, 0x2e, 0x53, 0x53, 0x4f, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x09, 0x73, 0x73, 0x6f, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x52, 0x0a, 0x0f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, 0x31, 0x2e, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x73, 0x65, 0x72, + 0x54, 0x72, 0x61, 0x69, 0x74, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, + 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x0e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, + 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0x49, 0x0a, 0x05, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x21, 0x0a, + 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, + 0xfa, 0x42, 0x04, 0x72, 0x02, 0x60, 0x01, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x1a, + 0xdc, 0x01, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x4a, 0x0a, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x63, 0x31, 0x2e, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x73, 0x65, + 0x72, 0x54, 0x72, 0x61, 0x69, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x27, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, + 0x28, 0x80, 0x08, 0xd0, 0x01, 0x01, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, + 0x5d, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, + 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x4e, 0x41, 0x42, + 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, + 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, + 0x41, 0x54, 0x55, 0x53, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x03, 0x1a, 0x2c, + 0x0a, 0x09, 0x4d, 0x46, 0x41, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, + 0x66, 0x61, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0a, 0x6d, 0x66, 0x61, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x1a, 0x2c, 0x0a, 0x09, + 0x53, 0x53, 0x4f, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x73, 0x6f, + 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, + 0x73, 0x73, 0x6f, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x1a, 0xa3, 0x01, 0x0a, 0x0e, 0x53, + 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, + 0x0a, 0x67, 0x69, 0x76, 0x65, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x67, 0x69, 0x76, 0x65, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, + 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, + 0x0c, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, + 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x75, 0x66, 0x66, + 0x69, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, + 0x22, 0x76, 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x1c, 0x0a, 0x18, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, + 0x12, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x48, 0x55, + 0x4d, 0x41, 0x4e, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x10, 0x02, 0x12, + 0x17, 0x0a, 0x13, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, 0x10, 0x03, 0x22, 0x6e, 0x0a, 0x0a, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x54, 0x72, 0x61, 0x69, 0x74, 0x12, 0x2d, 0x0a, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x66, 0x52, + 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x12, 0x31, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, + 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x22, 0x3e, 0x0a, 0x09, 0x52, 0x6f, 0x6c, 0x65, + 0x54, 0x72, 0x61, 0x69, 0x74, 0x12, 0x31, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, + 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x22, 0x9a, 0x03, 0x0a, 0x08, 0x41, 0x70, 0x70, + 0x54, 0x72, 0x61, 0x69, 0x74, 0x12, 0x35, 0x0a, 0x08, 0x68, 0x65, 0x6c, 0x70, 0x5f, 0x75, 0x72, + 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1a, 0xfa, 0x42, 0x17, 0x72, 0x15, 0x20, 0x01, + 0x28, 0x80, 0x08, 0x3a, 0x08, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0xd0, 0x01, 0x01, + 0x88, 0x01, 0x01, 0x52, 0x07, 0x68, 0x65, 0x6c, 0x70, 0x55, 0x72, 0x6c, 0x12, 0x2d, 0x0a, 0x04, + 0x69, 0x63, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x73, 0x73, + 0x65, 0x74, 0x52, 0x65, 0x66, 0x52, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x04, 0x6c, + 0x6f, 0x67, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x73, 0x73, 0x65, + 0x74, 0x52, 0x65, 0x66, 0x52, 0x04, 0x6c, 0x6f, 0x67, 0x6f, 0x12, 0x31, 0x0a, 0x07, 0x70, 0x72, + 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, + 0x72, 0x75, 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x37, 0x0a, + 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x63, + 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, + 0x70, 0x70, 0x54, 0x72, 0x61, 0x69, 0x74, 0x2e, 0x41, 0x70, 0x70, 0x46, 0x6c, 0x61, 0x67, 0x52, + 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x22, 0x8c, 0x01, 0x0a, 0x07, 0x41, 0x70, 0x70, 0x46, 0x6c, + 0x61, 0x67, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x50, 0x50, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x55, + 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, + 0x41, 0x50, 0x50, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x48, 0x49, 0x44, 0x44, 0x45, 0x4e, 0x10, + 0x01, 0x12, 0x15, 0x0a, 0x11, 0x41, 0x50, 0x50, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x49, 0x4e, + 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x50, 0x50, 0x5f, + 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x53, 0x41, 0x4d, 0x4c, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x41, + 0x50, 0x50, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x4f, 0x49, 0x44, 0x43, 0x10, 0x04, 0x12, 0x15, + 0x0a, 0x11, 0x41, 0x50, 0x50, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x42, 0x4f, 0x4f, 0x4b, 0x4d, + 0x41, 0x52, 0x4b, 0x10, 0x05, 0x22, 0xf3, 0x02, 0x0a, 0x0b, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, + 0x54, 0x72, 0x61, 0x69, 0x74, 0x12, 0x31, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, + 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x6c, 0x61, 0x73, 0x74, 0x4c, 0x6f, - 0x67, 0x69, 0x6e, 0x12, 0x43, 0x0a, 0x0a, 0x6d, 0x66, 0x61, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x54, 0x72, - 0x61, 0x69, 0x74, 0x2e, 0x4d, 0x46, 0x41, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x09, 0x6d, - 0x66, 0x61, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x43, 0x0a, 0x0a, 0x73, 0x73, 0x6f, 0x5f, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, - 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x55, - 0x73, 0x65, 0x72, 0x54, 0x72, 0x61, 0x69, 0x74, 0x2e, 0x53, 0x53, 0x4f, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x52, 0x09, 0x73, 0x73, 0x6f, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x52, 0x0a, - 0x0f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x54, 0x72, 0x61, - 0x69, 0x74, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x4e, 0x61, 0x6d, - 0x65, 0x52, 0x0e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x4e, 0x61, 0x6d, - 0x65, 0x1a, 0x49, 0x0a, 0x05, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x21, 0x0a, 0x07, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, - 0x72, 0x02, 0x60, 0x01, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, - 0x0a, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x09, 0x69, 0x73, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x1a, 0xdc, 0x01, 0x0a, - 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x4a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x54, 0x72, - 0x61, 0x69, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x12, 0x27, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0x28, 0x80, 0x08, - 0xd0, 0x01, 0x01, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0x5d, 0x0a, 0x06, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, - 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, - 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x4e, 0x41, 0x42, 0x4c, 0x45, 0x44, - 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x44, 0x49, 0x53, - 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, - 0x53, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x03, 0x1a, 0x2c, 0x0a, 0x09, 0x4d, - 0x46, 0x41, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x66, 0x61, 0x5f, - 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x6d, - 0x66, 0x61, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x1a, 0x2c, 0x0a, 0x09, 0x53, 0x53, 0x4f, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x73, 0x6f, 0x5f, 0x65, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x73, 0x73, 0x6f, - 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x1a, 0xa3, 0x01, 0x0a, 0x0e, 0x53, 0x74, 0x72, 0x75, - 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x69, - 0x76, 0x65, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x67, 0x69, 0x76, 0x65, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x61, 0x6d, - 0x69, 0x6c, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, - 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x69, - 0x64, 0x64, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x0b, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x16, 0x0a, - 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, - 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x22, 0x76, 0x0a, - 0x0b, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x18, - 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, - 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x43, - 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x48, 0x55, 0x4d, 0x41, 0x4e, - 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, - 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x59, 0x53, - 0x54, 0x45, 0x4d, 0x10, 0x03, 0x22, 0x6e, 0x0a, 0x0a, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x54, 0x72, - 0x61, 0x69, 0x74, 0x12, 0x2d, 0x0a, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x66, 0x52, 0x04, 0x69, 0x63, - 0x6f, 0x6e, 0x12, 0x31, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, - 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x22, 0x3e, 0x0a, 0x09, 0x52, 0x6f, 0x6c, 0x65, 0x54, 0x72, 0x61, - 0x69, 0x74, 0x12, 0x31, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, - 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x22, 0x9a, 0x03, 0x0a, 0x08, 0x41, 0x70, 0x70, 0x54, 0x72, 0x61, - 0x69, 0x74, 0x12, 0x35, 0x0a, 0x08, 0x68, 0x65, 0x6c, 0x70, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x1a, 0xfa, 0x42, 0x17, 0x72, 0x15, 0x20, 0x01, 0x28, 0x80, 0x08, - 0x3a, 0x08, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0xd0, 0x01, 0x01, 0x88, 0x01, 0x01, - 0x52, 0x07, 0x68, 0x65, 0x6c, 0x70, 0x55, 0x72, 0x6c, 0x12, 0x2d, 0x0a, 0x04, 0x69, 0x63, 0x6f, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, - 0x65, 0x66, 0x52, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x04, 0x6c, 0x6f, 0x67, 0x6f, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, - 0x66, 0x52, 0x04, 0x6c, 0x6f, 0x67, 0x6f, 0x12, 0x31, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, - 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, - 0x74, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x37, 0x0a, 0x05, 0x66, 0x6c, - 0x61, 0x67, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x63, 0x31, 0x2e, 0x63, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x70, 0x70, 0x54, - 0x72, 0x61, 0x69, 0x74, 0x2e, 0x41, 0x70, 0x70, 0x46, 0x6c, 0x61, 0x67, 0x52, 0x05, 0x66, 0x6c, - 0x61, 0x67, 0x73, 0x22, 0x8c, 0x01, 0x0a, 0x07, 0x41, 0x70, 0x70, 0x46, 0x6c, 0x61, 0x67, 0x12, - 0x18, 0x0a, 0x14, 0x41, 0x50, 0x50, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x55, 0x4e, 0x53, 0x50, - 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x41, 0x50, 0x50, - 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x48, 0x49, 0x44, 0x44, 0x45, 0x4e, 0x10, 0x01, 0x12, 0x15, - 0x0a, 0x11, 0x41, 0x50, 0x50, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x49, 0x4e, 0x41, 0x43, 0x54, - 0x49, 0x56, 0x45, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x50, 0x50, 0x5f, 0x46, 0x4c, 0x41, - 0x47, 0x5f, 0x53, 0x41, 0x4d, 0x4c, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x50, 0x50, 0x5f, - 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x4f, 0x49, 0x44, 0x43, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x41, - 0x50, 0x50, 0x5f, 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x42, 0x4f, 0x4f, 0x4b, 0x4d, 0x41, 0x52, 0x4b, - 0x10, 0x05, 0x22, 0xf3, 0x02, 0x0a, 0x0b, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x54, 0x72, 0x61, - 0x69, 0x74, 0x12, 0x31, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, - 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, - 0x12, 0x39, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x18, 0x03, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x12, 0x3c, + 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x12, 0x3c, 0x0a, 0x0c, 0x6c, - 0x61, 0x73, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x6c, - 0x61, 0x73, 0x74, 0x55, 0x73, 0x65, 0x64, 0x41, 0x74, 0x12, 0x3f, 0x0a, 0x0d, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, - 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x52, 0x0b, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, 0x49, 0x64, 0x12, 0x3c, 0x0a, 0x0b, 0x69, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, - 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x52, 0x0a, 0x69, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x64, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, - 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, - 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x0a, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x73, 0x65, 0x64, 0x41, 0x74, 0x12, 0x3f, 0x0a, 0x0d, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, + 0x52, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, 0x49, 0x64, 0x12, 0x3c, 0x0a, + 0x0b, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x52, + 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x64, 0x42, 0x36, 0x5a, 0x34, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x75, 0x63, + 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, + 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, }) var ( diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/connector.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/connector.pb.go index bedb497c..3027d370 100644 --- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/connector.pb.go +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/connector.pb.go @@ -37,21 +37,27 @@ const ( Capability_CAPABILITY_RESOURCE_CREATE Capability = 7 Capability_CAPABILITY_RESOURCE_DELETE Capability = 8 Capability_CAPABILITY_SYNC_SECRETS Capability = 9 + Capability_CAPABILITY_ACTIONS Capability = 10 + Capability_CAPABILITY_TARGETED_SYNC Capability = 11 + Capability_CAPABILITY_EVENT_FEED_V2 Capability = 12 ) // Enum value maps for Capability. var ( Capability_name = map[int32]string{ - 0: "CAPABILITY_UNSPECIFIED", - 1: "CAPABILITY_PROVISION", - 2: "CAPABILITY_SYNC", - 3: "CAPABILITY_EVENT_FEED", - 4: "CAPABILITY_TICKETING", - 5: "CAPABILITY_ACCOUNT_PROVISIONING", - 6: "CAPABILITY_CREDENTIAL_ROTATION", - 7: "CAPABILITY_RESOURCE_CREATE", - 8: "CAPABILITY_RESOURCE_DELETE", - 9: "CAPABILITY_SYNC_SECRETS", + 0: "CAPABILITY_UNSPECIFIED", + 1: "CAPABILITY_PROVISION", + 2: "CAPABILITY_SYNC", + 3: "CAPABILITY_EVENT_FEED", + 4: "CAPABILITY_TICKETING", + 5: "CAPABILITY_ACCOUNT_PROVISIONING", + 6: "CAPABILITY_CREDENTIAL_ROTATION", + 7: "CAPABILITY_RESOURCE_CREATE", + 8: "CAPABILITY_RESOURCE_DELETE", + 9: "CAPABILITY_SYNC_SECRETS", + 10: "CAPABILITY_ACTIONS", + 11: "CAPABILITY_TARGETED_SYNC", + 12: "CAPABILITY_EVENT_FEED_V2", } Capability_value = map[string]int32{ "CAPABILITY_UNSPECIFIED": 0, @@ -64,6 +70,9 @@ var ( "CAPABILITY_RESOURCE_CREATE": 7, "CAPABILITY_RESOURCE_DELETE": 8, "CAPABILITY_SYNC_SECRETS": 9, + "CAPABILITY_ACTIONS": 10, + "CAPABILITY_TARGETED_SYNC": 11, + "CAPABILITY_EVENT_FEED_V2": 12, } ) @@ -1467,7 +1476,7 @@ var file_c1_connector_v2_connector_proto_rawDesc = string([]byte{ 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x2a, - 0xb2, 0x02, 0x0a, 0x0a, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1a, + 0x86, 0x03, 0x0a, 0x0a, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x16, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x53, 0x49, @@ -1486,49 +1495,54 @@ var file_c1_connector_v2_connector_proto_rawDesc = string([]byte{ 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x08, 0x12, 0x1b, 0x0a, 0x17, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x53, 0x45, 0x43, 0x52, 0x45, - 0x54, 0x53, 0x10, 0x09, 0x2a, 0xf2, 0x01, 0x0a, 0x20, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, - 0x69, 0x74, 0x79, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x2f, 0x43, 0x41, 0x50, - 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x44, 0x45, 0x54, 0x41, 0x49, 0x4c, 0x5f, 0x43, - 0x52, 0x45, 0x44, 0x45, 0x4e, 0x54, 0x49, 0x41, 0x4c, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, - 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x33, - 0x0a, 0x2f, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x44, 0x45, 0x54, - 0x41, 0x49, 0x4c, 0x5f, 0x43, 0x52, 0x45, 0x44, 0x45, 0x4e, 0x54, 0x49, 0x41, 0x4c, 0x5f, 0x4f, - 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x5f, 0x50, 0x41, 0x53, 0x53, 0x57, 0x4f, 0x52, - 0x44, 0x10, 0x01, 0x12, 0x37, 0x0a, 0x33, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, - 0x59, 0x5f, 0x44, 0x45, 0x54, 0x41, 0x49, 0x4c, 0x5f, 0x43, 0x52, 0x45, 0x44, 0x45, 0x4e, 0x54, - 0x49, 0x41, 0x4c, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x41, 0x4e, 0x44, 0x4f, - 0x4d, 0x5f, 0x50, 0x41, 0x53, 0x53, 0x57, 0x4f, 0x52, 0x44, 0x10, 0x02, 0x12, 0x2b, 0x0a, 0x27, - 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x44, 0x45, 0x54, 0x41, 0x49, - 0x4c, 0x5f, 0x43, 0x52, 0x45, 0x44, 0x45, 0x4e, 0x54, 0x49, 0x41, 0x4c, 0x5f, 0x4f, 0x50, 0x54, - 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x53, 0x4f, 0x10, 0x03, 0x32, 0xeb, 0x02, 0x0a, 0x10, 0x43, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x78, - 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x33, 0x2e, - 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, - 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6f, 0x0a, 0x08, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x12, 0x30, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, + 0x54, 0x53, 0x10, 0x09, 0x12, 0x16, 0x0a, 0x12, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, + 0x54, 0x59, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x10, 0x0a, 0x12, 0x1c, 0x0a, 0x18, + 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, + 0x54, 0x45, 0x44, 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x10, 0x0b, 0x12, 0x1c, 0x0a, 0x18, 0x43, 0x41, + 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x46, + 0x45, 0x45, 0x44, 0x5f, 0x56, 0x32, 0x10, 0x0c, 0x2a, 0xf2, 0x01, 0x0a, 0x20, 0x43, 0x61, 0x70, + 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x43, 0x72, 0x65, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, + 0x2f, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x44, 0x45, 0x54, 0x41, + 0x49, 0x4c, 0x5f, 0x43, 0x52, 0x45, 0x44, 0x45, 0x4e, 0x54, 0x49, 0x41, 0x4c, 0x5f, 0x4f, 0x50, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x33, 0x0a, 0x2f, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, + 0x5f, 0x44, 0x45, 0x54, 0x41, 0x49, 0x4c, 0x5f, 0x43, 0x52, 0x45, 0x44, 0x45, 0x4e, 0x54, 0x49, + 0x41, 0x4c, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x5f, 0x50, 0x41, 0x53, + 0x53, 0x57, 0x4f, 0x52, 0x44, 0x10, 0x01, 0x12, 0x37, 0x0a, 0x33, 0x43, 0x41, 0x50, 0x41, 0x42, + 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x44, 0x45, 0x54, 0x41, 0x49, 0x4c, 0x5f, 0x43, 0x52, 0x45, + 0x44, 0x45, 0x4e, 0x54, 0x49, 0x41, 0x4c, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, + 0x41, 0x4e, 0x44, 0x4f, 0x4d, 0x5f, 0x50, 0x41, 0x53, 0x53, 0x57, 0x4f, 0x52, 0x44, 0x10, 0x02, + 0x12, 0x2b, 0x0a, 0x27, 0x43, 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x44, + 0x45, 0x54, 0x41, 0x49, 0x4c, 0x5f, 0x43, 0x52, 0x45, 0x44, 0x45, 0x4e, 0x54, 0x49, 0x41, 0x4c, + 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x53, 0x4f, 0x10, 0x03, 0x32, 0xeb, 0x02, + 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x12, 0x78, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x12, 0x33, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6c, 0x0a, 0x07, 0x43, 0x6c, 0x65, - 0x61, 0x6e, 0x75, 0x70, 0x12, 0x2f, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, - 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, - 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, - 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6f, 0x0a, 0x08, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x12, 0x30, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x31, 0x2e, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6c, 0x0a, + 0x07, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x12, 0x2f, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6c, 0x65, 0x61, 0x6e, + 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x63, 0x31, 0x2e, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6c, 0x65, 0x61, + 0x6e, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x36, 0x5a, 0x34, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x75, 0x63, + 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, + 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, }) var ( diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/event_feed.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/event_feed.pb.go index aa8b9b60..0da9efb1 100644 --- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/event_feed.pb.go +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/event_feed.pb.go @@ -24,13 +24,65 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type EventType int32 + +const ( + EventType_EVENT_TYPE_UNSPECIFIED EventType = 0 + EventType_EVENT_TYPE_USAGE EventType = 1 + EventType_EVENT_TYPE_RESOURCE_CHANGE EventType = 4 +) + +// Enum value maps for EventType. +var ( + EventType_name = map[int32]string{ + 0: "EVENT_TYPE_UNSPECIFIED", + 1: "EVENT_TYPE_USAGE", + 4: "EVENT_TYPE_RESOURCE_CHANGE", + } + EventType_value = map[string]int32{ + "EVENT_TYPE_UNSPECIFIED": 0, + "EVENT_TYPE_USAGE": 1, + "EVENT_TYPE_RESOURCE_CHANGE": 4, + } +) + +func (x EventType) Enum() *EventType { + p := new(EventType) + *p = x + return p +} + +func (x EventType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (EventType) Descriptor() protoreflect.EnumDescriptor { + return file_c1_connector_v2_event_feed_proto_enumTypes[0].Descriptor() +} + +func (EventType) Type() protoreflect.EnumType { + return &file_c1_connector_v2_event_feed_proto_enumTypes[0] +} + +func (x EventType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use EventType.Descriptor instead. +func (EventType) EnumDescriptor() ([]byte, []int) { + return file_c1_connector_v2_event_feed_proto_rawDescGZIP(), []int{0} +} + type ListEventsRequest struct { state protoimpl.MessageState `protogen:"open.v1"` // Can function like a page token but also can be arbitrary to resume a feed at any point - Cursor string `protobuf:"bytes,1,opt,name=cursor,proto3" json:"cursor,omitempty"` - StartAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=start_at,json=startAt,proto3" json:"start_at,omitempty"` - PageSize uint32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` - Annotations []*anypb.Any `protobuf:"bytes,4,rep,name=annotations,proto3" json:"annotations,omitempty"` + Cursor string `protobuf:"bytes,1,opt,name=cursor,proto3" json:"cursor,omitempty"` + StartAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=start_at,json=startAt,proto3" json:"start_at,omitempty"` + PageSize uint32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + Annotations []*anypb.Any `protobuf:"bytes,4,rep,name=annotations,proto3" json:"annotations,omitempty"` + // Used to specify a specific event feed to list events from. + // If not provided, the connector will use the old event feed. + EventFeedId string `protobuf:"bytes,5,opt,name=event_feed_id,json=eventFeedId,proto3" json:"event_feed_id,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -93,6 +145,13 @@ func (x *ListEventsRequest) GetAnnotations() []*anypb.Any { return nil } +func (x *ListEventsRequest) GetEventFeedId() string { + if x != nil { + return x.EventFeedId + } + return "" +} + type ListEventsResponse struct { state protoimpl.MessageState `protogen:"open.v1"` Events []*Event `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"` @@ -161,6 +220,102 @@ func (x *ListEventsResponse) GetAnnotations() []*anypb.Any { return nil } +type ListEventFeedsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Annotations []*anypb.Any `protobuf:"bytes,1,rep,name=annotations,proto3" json:"annotations,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListEventFeedsRequest) Reset() { + *x = ListEventFeedsRequest{} + mi := &file_c1_connector_v2_event_feed_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListEventFeedsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListEventFeedsRequest) ProtoMessage() {} + +func (x *ListEventFeedsRequest) ProtoReflect() protoreflect.Message { + mi := &file_c1_connector_v2_event_feed_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListEventFeedsRequest.ProtoReflect.Descriptor instead. +func (*ListEventFeedsRequest) Descriptor() ([]byte, []int) { + return file_c1_connector_v2_event_feed_proto_rawDescGZIP(), []int{2} +} + +func (x *ListEventFeedsRequest) GetAnnotations() []*anypb.Any { + if x != nil { + return x.Annotations + } + return nil +} + +type ListEventFeedsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + List []*EventFeedMetadata `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"` + Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListEventFeedsResponse) Reset() { + *x = ListEventFeedsResponse{} + mi := &file_c1_connector_v2_event_feed_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListEventFeedsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListEventFeedsResponse) ProtoMessage() {} + +func (x *ListEventFeedsResponse) ProtoReflect() protoreflect.Message { + mi := &file_c1_connector_v2_event_feed_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListEventFeedsResponse.ProtoReflect.Descriptor instead. +func (*ListEventFeedsResponse) Descriptor() ([]byte, []int) { + return file_c1_connector_v2_event_feed_proto_rawDescGZIP(), []int{3} +} + +func (x *ListEventFeedsResponse) GetList() []*EventFeedMetadata { + if x != nil { + return x.List + } + return nil +} + +func (x *ListEventFeedsResponse) GetAnnotations() []*anypb.Any { + if x != nil { + return x.Annotations + } + return nil +} + type Event struct { state protoimpl.MessageState `protogen:"open.v1"` Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` @@ -173,6 +328,7 @@ type Event struct { // *Event_UsageEvent // *Event_GrantEvent // *Event_RevokeEvent + // *Event_ResourceChangeEvent Event isEvent_Event `protobuf_oneof:"event"` // May contain resources for targets, actor, or items referenced in events Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"` @@ -182,7 +338,7 @@ type Event struct { func (x *Event) Reset() { *x = Event{} - mi := &file_c1_connector_v2_event_feed_proto_msgTypes[2] + mi := &file_c1_connector_v2_event_feed_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -194,7 +350,7 @@ func (x *Event) String() string { func (*Event) ProtoMessage() {} func (x *Event) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_event_feed_proto_msgTypes[2] + mi := &file_c1_connector_v2_event_feed_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -207,7 +363,7 @@ func (x *Event) ProtoReflect() protoreflect.Message { // Deprecated: Use Event.ProtoReflect.Descriptor instead. func (*Event) Descriptor() ([]byte, []int) { - return file_c1_connector_v2_event_feed_proto_rawDescGZIP(), []int{2} + return file_c1_connector_v2_event_feed_proto_rawDescGZIP(), []int{4} } func (x *Event) GetId() string { @@ -258,6 +414,15 @@ func (x *Event) GetRevokeEvent() *RevokeEvent { return nil } +func (x *Event) GetResourceChangeEvent() *ResourceChangeEvent { + if x != nil { + if x, ok := x.Event.(*Event_ResourceChangeEvent); ok { + return x.ResourceChangeEvent + } + } + return nil +} + func (x *Event) GetAnnotations() []*anypb.Any { if x != nil { return x.Annotations @@ -281,12 +446,18 @@ type Event_RevokeEvent struct { RevokeEvent *RevokeEvent `protobuf:"bytes,102,opt,name=revoke_event,json=revokeEvent,proto3,oneof"` } +type Event_ResourceChangeEvent struct { + ResourceChangeEvent *ResourceChangeEvent `protobuf:"bytes,103,opt,name=resource_change_event,json=resourceChangeEvent,proto3,oneof"` +} + func (*Event_UsageEvent) isEvent_Event() {} func (*Event_GrantEvent) isEvent_Event() {} func (*Event_RevokeEvent) isEvent_Event() {} +func (*Event_ResourceChangeEvent) isEvent_Event() {} + type UsageEvent struct { state protoimpl.MessageState `protogen:"open.v1"` TargetResource *Resource `protobuf:"bytes,1,opt,name=target_resource,json=targetResource,proto3" json:"target_resource,omitempty"` @@ -297,7 +468,7 @@ type UsageEvent struct { func (x *UsageEvent) Reset() { *x = UsageEvent{} - mi := &file_c1_connector_v2_event_feed_proto_msgTypes[3] + mi := &file_c1_connector_v2_event_feed_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -309,7 +480,7 @@ func (x *UsageEvent) String() string { func (*UsageEvent) ProtoMessage() {} func (x *UsageEvent) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_event_feed_proto_msgTypes[3] + mi := &file_c1_connector_v2_event_feed_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -322,7 +493,7 @@ func (x *UsageEvent) ProtoReflect() protoreflect.Message { // Deprecated: Use UsageEvent.ProtoReflect.Descriptor instead. func (*UsageEvent) Descriptor() ([]byte, []int) { - return file_c1_connector_v2_event_feed_proto_rawDescGZIP(), []int{3} + return file_c1_connector_v2_event_feed_proto_rawDescGZIP(), []int{5} } func (x *UsageEvent) GetTargetResource() *Resource { @@ -349,7 +520,7 @@ type GrantEvent struct { func (x *GrantEvent) Reset() { *x = GrantEvent{} - mi := &file_c1_connector_v2_event_feed_proto_msgTypes[4] + mi := &file_c1_connector_v2_event_feed_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -361,7 +532,7 @@ func (x *GrantEvent) String() string { func (*GrantEvent) ProtoMessage() {} func (x *GrantEvent) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_event_feed_proto_msgTypes[4] + mi := &file_c1_connector_v2_event_feed_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -374,7 +545,7 @@ func (x *GrantEvent) ProtoReflect() protoreflect.Message { // Deprecated: Use GrantEvent.ProtoReflect.Descriptor instead. func (*GrantEvent) Descriptor() ([]byte, []int) { - return file_c1_connector_v2_event_feed_proto_rawDescGZIP(), []int{4} + return file_c1_connector_v2_event_feed_proto_rawDescGZIP(), []int{6} } func (x *GrantEvent) GetGrant() *Grant { @@ -394,7 +565,7 @@ type RevokeEvent struct { func (x *RevokeEvent) Reset() { *x = RevokeEvent{} - mi := &file_c1_connector_v2_event_feed_proto_msgTypes[5] + mi := &file_c1_connector_v2_event_feed_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -406,7 +577,7 @@ func (x *RevokeEvent) String() string { func (*RevokeEvent) ProtoMessage() {} func (x *RevokeEvent) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_event_feed_proto_msgTypes[5] + mi := &file_c1_connector_v2_event_feed_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -419,7 +590,7 @@ func (x *RevokeEvent) ProtoReflect() protoreflect.Message { // Deprecated: Use RevokeEvent.ProtoReflect.Descriptor instead. func (*RevokeEvent) Descriptor() ([]byte, []int) { - return file_c1_connector_v2_event_feed_proto_rawDescGZIP(), []int{5} + return file_c1_connector_v2_event_feed_proto_rawDescGZIP(), []int{7} } func (x *RevokeEvent) GetEntitlement() *Entitlement { @@ -436,6 +607,112 @@ func (x *RevokeEvent) GetPrincipal() *Resource { return nil } +// generic light weight event indicating a resource was changed +type ResourceChangeEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + ResourceId *ResourceId `protobuf:"bytes,1,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` + ParentResourceId *ResourceId `protobuf:"bytes,2,opt,name=parent_resource_id,json=parentResourceId,proto3" json:"parent_resource_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ResourceChangeEvent) Reset() { + *x = ResourceChangeEvent{} + mi := &file_c1_connector_v2_event_feed_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ResourceChangeEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResourceChangeEvent) ProtoMessage() {} + +func (x *ResourceChangeEvent) ProtoReflect() protoreflect.Message { + mi := &file_c1_connector_v2_event_feed_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResourceChangeEvent.ProtoReflect.Descriptor instead. +func (*ResourceChangeEvent) Descriptor() ([]byte, []int) { + return file_c1_connector_v2_event_feed_proto_rawDescGZIP(), []int{8} +} + +func (x *ResourceChangeEvent) GetResourceId() *ResourceId { + if x != nil { + return x.ResourceId + } + return nil +} + +func (x *ResourceChangeEvent) GetParentResourceId() *ResourceId { + if x != nil { + return x.ParentResourceId + } + return nil +} + +type EventFeedMetadata struct { + state protoimpl.MessageState `protogen:"open.v1"` + // unique identifier for the event feed + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + SupportedEventTypes []EventType `protobuf:"varint,2,rep,packed,name=supported_event_types,json=supportedEventTypes,proto3,enum=c1.connector.v2.EventType" json:"supported_event_types,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EventFeedMetadata) Reset() { + *x = EventFeedMetadata{} + mi := &file_c1_connector_v2_event_feed_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EventFeedMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EventFeedMetadata) ProtoMessage() {} + +func (x *EventFeedMetadata) ProtoReflect() protoreflect.Message { + mi := &file_c1_connector_v2_event_feed_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EventFeedMetadata.ProtoReflect.Descriptor instead. +func (*EventFeedMetadata) Descriptor() ([]byte, []int) { + return file_c1_connector_v2_event_feed_proto_rawDescGZIP(), []int{9} +} + +func (x *EventFeedMetadata) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *EventFeedMetadata) GetSupportedEventTypes() []EventType { + if x != nil { + return x.SupportedEventTypes + } + return nil +} + var File_c1_connector_v2_event_feed_proto protoreflect.FileDescriptor var file_c1_connector_v2_event_feed_proto_rawDesc = string([]byte{ @@ -453,7 +730,7 @@ var file_c1_connector_v2_event_feed_proto_rawDesc = string([]byte{ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd2, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, + 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x85, 0x02, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0x28, 0x80, 0x20, 0xd0, 0x01, 0x01, 0x52, 0x06, 0x63, @@ -466,73 +743,129 @@ var file_c1_connector_v2_event_feed_proto_rawDesc = string([]byte{ 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, - 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xbe, 0x01, - 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, - 0x65, 0x6e, 0x74, 0x73, 0x12, 0x25, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0x28, 0x80, 0x20, - 0xd0, 0x01, 0x01, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x68, - 0x61, 0x73, 0x5f, 0x6d, 0x6f, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x68, - 0x61, 0x73, 0x4d, 0x6f, 0x72, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, - 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xd8, - 0x02, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3b, 0x0a, 0x0b, 0x6f, 0x63, 0x63, 0x75, - 0x72, 0x72, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x6f, 0x63, 0x63, 0x75, 0x72, - 0x72, 0x65, 0x64, 0x41, 0x74, 0x12, 0x3e, 0x0a, 0x0b, 0x75, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, - 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x73, 0x61, - 0x67, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x75, 0x73, 0x61, 0x67, 0x65, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x3e, 0x0a, 0x0b, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5f, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, - 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x72, 0x61, - 0x6e, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x67, 0x72, 0x61, 0x6e, 0x74, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x41, 0x0a, 0x0c, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x5f, - 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x66, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x31, + 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x31, 0x0a, + 0x0d, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x66, 0x65, 0x65, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0x28, 0x80, 0x08, + 0xd0, 0x01, 0x01, 0x52, 0x0b, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x46, 0x65, 0x65, 0x64, 0x49, 0x64, + 0x22, 0xbe, 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, + 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x25, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, + 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, + 0x28, 0x80, 0x20, 0xd0, 0x01, 0x01, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x12, 0x19, + 0x0a, 0x08, 0x68, 0x61, 0x73, 0x5f, 0x6d, 0x6f, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x07, 0x68, 0x61, 0x73, 0x4d, 0x6f, 0x72, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x22, 0x4f, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x46, 0x65, + 0x65, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x22, 0x88, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x46, 0x65, 0x65, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, + 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x31, + 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x46, 0x65, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, + 0x04, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, + 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xb4, 0x03, + 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3b, 0x0a, 0x0b, 0x6f, 0x63, 0x63, 0x75, 0x72, + 0x72, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x6f, 0x63, 0x63, 0x75, 0x72, 0x72, + 0x65, 0x64, 0x41, 0x74, 0x12, 0x3e, 0x0a, 0x0b, 0x75, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x73, 0x61, 0x67, + 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x75, 0x73, 0x61, 0x67, 0x65, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x12, 0x3e, 0x0a, 0x0b, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5f, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x72, 0x61, 0x6e, + 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x12, 0x41, 0x0a, 0x0c, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x5f, 0x65, + 0x76, 0x65, 0x6e, 0x74, 0x18, 0x66, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x31, 0x2e, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x76, + 0x6f, 0x6b, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x72, 0x65, 0x76, 0x6f, + 0x6b, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x5a, 0x0a, 0x15, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x18, 0x67, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x13, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x07, 0x0a, 0x05, 0x65, + 0x76, 0x65, 0x6e, 0x74, 0x22, 0x92, 0x01, 0x0a, 0x0a, 0x55, 0x73, 0x61, 0x67, 0x65, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x12, 0x42, 0x0a, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, + 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x40, 0x0a, 0x0e, 0x61, 0x63, 0x74, 0x6f, 0x72, + 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, + 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0d, 0x61, 0x63, 0x74, 0x6f, + 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x3a, 0x0a, 0x0a, 0x47, 0x72, 0x61, + 0x6e, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2c, 0x0a, 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x05, + 0x67, 0x72, 0x61, 0x6e, 0x74, 0x22, 0x86, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x3e, 0x0a, 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x31, 0x2e, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x74, + 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x6c, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x37, 0x0a, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, + 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x52, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x22, 0xa8, + 0x01, 0x0a, 0x13, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x46, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, - 0x76, 0x6f, 0x6b, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x72, 0x65, 0x76, - 0x6f, 0x6b, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x42, 0x07, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x92, 0x01, 0x0a, 0x0a, 0x55, 0x73, - 0x61, 0x67, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x42, 0x0a, 0x0f, 0x74, 0x61, 0x72, 0x67, - 0x65, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0e, 0x74, 0x61, - 0x72, 0x67, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x40, 0x0a, 0x0e, - 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, - 0x0d, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x3a, - 0x0a, 0x0a, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2c, 0x0a, 0x05, - 0x67, 0x72, 0x61, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x31, - 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x72, - 0x61, 0x6e, 0x74, 0x52, 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x22, 0x86, 0x01, 0x0a, 0x0b, 0x52, - 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x3e, 0x0a, 0x0b, 0x65, 0x6e, - 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, - 0x32, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x65, - 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x37, 0x0a, 0x09, 0x70, 0x72, - 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, - 0x70, 0x61, 0x6c, 0x32, 0x65, 0x0a, 0x0c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x55, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x73, 0x12, 0x22, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, - 0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, - 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, - 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, + 0x10, 0x01, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x49, + 0x0a, 0x12, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x52, 0x10, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x22, 0x90, 0x01, 0x0a, 0x11, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x46, 0x65, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, + 0x1a, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, + 0x72, 0x05, 0x20, 0x01, 0x28, 0x80, 0x08, 0x52, 0x02, 0x69, 0x64, 0x12, 0x5f, 0x0a, 0x15, 0x73, + 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x63, 0x31, 0x2e, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x42, 0x0f, 0xfa, 0x42, 0x0c, 0x92, 0x01, 0x09, 0x18, 0x01, + 0x22, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x13, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, + 0x65, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x2a, 0x69, 0x0a, 0x09, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x45, 0x56, 0x45, + 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x55, 0x53, 0x41, 0x47, 0x45, 0x10, 0x01, 0x12, 0x1e, 0x0a, 0x1a, 0x45, + 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, + 0x43, 0x45, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x10, 0x04, 0x22, 0x04, 0x08, 0x02, 0x10, + 0x02, 0x22, 0x04, 0x08, 0x03, 0x10, 0x03, 0x32, 0xc8, 0x01, 0x0a, 0x0c, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x55, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x22, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x63, 0x31, 0x2e, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x61, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x46, 0x65, 0x65, 0x64, + 0x73, 0x12, 0x26, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x46, 0x65, 0x65, + 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x31, 0x2e, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x46, 0x65, 0x65, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, + 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, }) var ( @@ -547,42 +880,58 @@ func file_c1_connector_v2_event_feed_proto_rawDescGZIP() []byte { return file_c1_connector_v2_event_feed_proto_rawDescData } -var file_c1_connector_v2_event_feed_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_c1_connector_v2_event_feed_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_c1_connector_v2_event_feed_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_c1_connector_v2_event_feed_proto_goTypes = []any{ - (*ListEventsRequest)(nil), // 0: c1.connector.v2.ListEventsRequest - (*ListEventsResponse)(nil), // 1: c1.connector.v2.ListEventsResponse - (*Event)(nil), // 2: c1.connector.v2.Event - (*UsageEvent)(nil), // 3: c1.connector.v2.UsageEvent - (*GrantEvent)(nil), // 4: c1.connector.v2.GrantEvent - (*RevokeEvent)(nil), // 5: c1.connector.v2.RevokeEvent - (*timestamppb.Timestamp)(nil), // 6: google.protobuf.Timestamp - (*anypb.Any)(nil), // 7: google.protobuf.Any - (*Resource)(nil), // 8: c1.connector.v2.Resource - (*Grant)(nil), // 9: c1.connector.v2.Grant - (*Entitlement)(nil), // 10: c1.connector.v2.Entitlement + (EventType)(0), // 0: c1.connector.v2.EventType + (*ListEventsRequest)(nil), // 1: c1.connector.v2.ListEventsRequest + (*ListEventsResponse)(nil), // 2: c1.connector.v2.ListEventsResponse + (*ListEventFeedsRequest)(nil), // 3: c1.connector.v2.ListEventFeedsRequest + (*ListEventFeedsResponse)(nil), // 4: c1.connector.v2.ListEventFeedsResponse + (*Event)(nil), // 5: c1.connector.v2.Event + (*UsageEvent)(nil), // 6: c1.connector.v2.UsageEvent + (*GrantEvent)(nil), // 7: c1.connector.v2.GrantEvent + (*RevokeEvent)(nil), // 8: c1.connector.v2.RevokeEvent + (*ResourceChangeEvent)(nil), // 9: c1.connector.v2.ResourceChangeEvent + (*EventFeedMetadata)(nil), // 10: c1.connector.v2.EventFeedMetadata + (*timestamppb.Timestamp)(nil), // 11: google.protobuf.Timestamp + (*anypb.Any)(nil), // 12: google.protobuf.Any + (*Resource)(nil), // 13: c1.connector.v2.Resource + (*Grant)(nil), // 14: c1.connector.v2.Grant + (*Entitlement)(nil), // 15: c1.connector.v2.Entitlement + (*ResourceId)(nil), // 16: c1.connector.v2.ResourceId } var file_c1_connector_v2_event_feed_proto_depIdxs = []int32{ - 6, // 0: c1.connector.v2.ListEventsRequest.start_at:type_name -> google.protobuf.Timestamp - 7, // 1: c1.connector.v2.ListEventsRequest.annotations:type_name -> google.protobuf.Any - 2, // 2: c1.connector.v2.ListEventsResponse.events:type_name -> c1.connector.v2.Event - 7, // 3: c1.connector.v2.ListEventsResponse.annotations:type_name -> google.protobuf.Any - 6, // 4: c1.connector.v2.Event.occurred_at:type_name -> google.protobuf.Timestamp - 3, // 5: c1.connector.v2.Event.usage_event:type_name -> c1.connector.v2.UsageEvent - 4, // 6: c1.connector.v2.Event.grant_event:type_name -> c1.connector.v2.GrantEvent - 5, // 7: c1.connector.v2.Event.revoke_event:type_name -> c1.connector.v2.RevokeEvent - 7, // 8: c1.connector.v2.Event.annotations:type_name -> google.protobuf.Any - 8, // 9: c1.connector.v2.UsageEvent.target_resource:type_name -> c1.connector.v2.Resource - 8, // 10: c1.connector.v2.UsageEvent.actor_resource:type_name -> c1.connector.v2.Resource - 9, // 11: c1.connector.v2.GrantEvent.grant:type_name -> c1.connector.v2.Grant - 10, // 12: c1.connector.v2.RevokeEvent.entitlement:type_name -> c1.connector.v2.Entitlement - 8, // 13: c1.connector.v2.RevokeEvent.principal:type_name -> c1.connector.v2.Resource - 0, // 14: c1.connector.v2.EventService.ListEvents:input_type -> c1.connector.v2.ListEventsRequest - 1, // 15: c1.connector.v2.EventService.ListEvents:output_type -> c1.connector.v2.ListEventsResponse - 15, // [15:16] is the sub-list for method output_type - 14, // [14:15] is the sub-list for method input_type - 14, // [14:14] is the sub-list for extension type_name - 14, // [14:14] is the sub-list for extension extendee - 0, // [0:14] is the sub-list for field type_name + 11, // 0: c1.connector.v2.ListEventsRequest.start_at:type_name -> google.protobuf.Timestamp + 12, // 1: c1.connector.v2.ListEventsRequest.annotations:type_name -> google.protobuf.Any + 5, // 2: c1.connector.v2.ListEventsResponse.events:type_name -> c1.connector.v2.Event + 12, // 3: c1.connector.v2.ListEventsResponse.annotations:type_name -> google.protobuf.Any + 12, // 4: c1.connector.v2.ListEventFeedsRequest.annotations:type_name -> google.protobuf.Any + 10, // 5: c1.connector.v2.ListEventFeedsResponse.list:type_name -> c1.connector.v2.EventFeedMetadata + 12, // 6: c1.connector.v2.ListEventFeedsResponse.annotations:type_name -> google.protobuf.Any + 11, // 7: c1.connector.v2.Event.occurred_at:type_name -> google.protobuf.Timestamp + 6, // 8: c1.connector.v2.Event.usage_event:type_name -> c1.connector.v2.UsageEvent + 7, // 9: c1.connector.v2.Event.grant_event:type_name -> c1.connector.v2.GrantEvent + 8, // 10: c1.connector.v2.Event.revoke_event:type_name -> c1.connector.v2.RevokeEvent + 9, // 11: c1.connector.v2.Event.resource_change_event:type_name -> c1.connector.v2.ResourceChangeEvent + 12, // 12: c1.connector.v2.Event.annotations:type_name -> google.protobuf.Any + 13, // 13: c1.connector.v2.UsageEvent.target_resource:type_name -> c1.connector.v2.Resource + 13, // 14: c1.connector.v2.UsageEvent.actor_resource:type_name -> c1.connector.v2.Resource + 14, // 15: c1.connector.v2.GrantEvent.grant:type_name -> c1.connector.v2.Grant + 15, // 16: c1.connector.v2.RevokeEvent.entitlement:type_name -> c1.connector.v2.Entitlement + 13, // 17: c1.connector.v2.RevokeEvent.principal:type_name -> c1.connector.v2.Resource + 16, // 18: c1.connector.v2.ResourceChangeEvent.resource_id:type_name -> c1.connector.v2.ResourceId + 16, // 19: c1.connector.v2.ResourceChangeEvent.parent_resource_id:type_name -> c1.connector.v2.ResourceId + 0, // 20: c1.connector.v2.EventFeedMetadata.supported_event_types:type_name -> c1.connector.v2.EventType + 1, // 21: c1.connector.v2.EventService.ListEvents:input_type -> c1.connector.v2.ListEventsRequest + 3, // 22: c1.connector.v2.EventService.ListEventFeeds:input_type -> c1.connector.v2.ListEventFeedsRequest + 2, // 23: c1.connector.v2.EventService.ListEvents:output_type -> c1.connector.v2.ListEventsResponse + 4, // 24: c1.connector.v2.EventService.ListEventFeeds:output_type -> c1.connector.v2.ListEventFeedsResponse + 23, // [23:25] is the sub-list for method output_type + 21, // [21:23] is the sub-list for method input_type + 21, // [21:21] is the sub-list for extension type_name + 21, // [21:21] is the sub-list for extension extendee + 0, // [0:21] is the sub-list for field type_name } func init() { file_c1_connector_v2_event_feed_proto_init() } @@ -593,23 +942,25 @@ func file_c1_connector_v2_event_feed_proto_init() { file_c1_connector_v2_entitlement_proto_init() file_c1_connector_v2_grant_proto_init() file_c1_connector_v2_resource_proto_init() - file_c1_connector_v2_event_feed_proto_msgTypes[2].OneofWrappers = []any{ + file_c1_connector_v2_event_feed_proto_msgTypes[4].OneofWrappers = []any{ (*Event_UsageEvent)(nil), (*Event_GrantEvent)(nil), (*Event_RevokeEvent)(nil), + (*Event_ResourceChangeEvent)(nil), } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_connector_v2_event_feed_proto_rawDesc), len(file_c1_connector_v2_event_feed_proto_rawDesc)), - NumEnums: 0, - NumMessages: 6, + NumEnums: 1, + NumMessages: 10, NumExtensions: 0, NumServices: 1, }, GoTypes: file_c1_connector_v2_event_feed_proto_goTypes, DependencyIndexes: file_c1_connector_v2_event_feed_proto_depIdxs, + EnumInfos: file_c1_connector_v2_event_feed_proto_enumTypes, MessageInfos: file_c1_connector_v2_event_feed_proto_msgTypes, }.Build() File_c1_connector_v2_event_feed_proto = out.File diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/event_feed.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/event_feed.pb.validate.go index 6bc19599..bc384bf6 100644 --- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/event_feed.pb.validate.go +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/event_feed.pb.validate.go @@ -150,6 +150,21 @@ func (m *ListEventsRequest) validate(all bool) error { } + if m.GetEventFeedId() != "" { + + if l := len(m.GetEventFeedId()); l < 1 || l > 1024 { + err := ListEventsRequestValidationError{ + field: "EventFeedId", + reason: "value length must be between 1 and 1024 bytes, inclusive", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + if len(errors) > 0 { return ListEventsRequestMultiError(errors) } @@ -417,6 +432,312 @@ var _ interface { ErrorName() string } = ListEventsResponseValidationError{} +// Validate checks the field values on ListEventFeedsRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *ListEventFeedsRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ListEventFeedsRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ListEventFeedsRequestMultiError, or nil if none found. +func (m *ListEventFeedsRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *ListEventFeedsRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetAnnotations() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListEventFeedsRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListEventFeedsRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListEventFeedsRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return ListEventFeedsRequestMultiError(errors) + } + + return nil +} + +// ListEventFeedsRequestMultiError is an error wrapping multiple validation +// errors returned by ListEventFeedsRequest.ValidateAll() if the designated +// constraints aren't met. +type ListEventFeedsRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ListEventFeedsRequestMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ListEventFeedsRequestMultiError) AllErrors() []error { return m } + +// ListEventFeedsRequestValidationError is the validation error returned by +// ListEventFeedsRequest.Validate if the designated constraints aren't met. +type ListEventFeedsRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ListEventFeedsRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ListEventFeedsRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ListEventFeedsRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ListEventFeedsRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ListEventFeedsRequestValidationError) ErrorName() string { + return "ListEventFeedsRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e ListEventFeedsRequestValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sListEventFeedsRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ListEventFeedsRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ListEventFeedsRequestValidationError{} + +// Validate checks the field values on ListEventFeedsResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *ListEventFeedsResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ListEventFeedsResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ListEventFeedsResponseMultiError, or nil if none found. +func (m *ListEventFeedsResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *ListEventFeedsResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetList() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListEventFeedsResponseValidationError{ + field: fmt.Sprintf("List[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListEventFeedsResponseValidationError{ + field: fmt.Sprintf("List[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListEventFeedsResponseValidationError{ + field: fmt.Sprintf("List[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for idx, item := range m.GetAnnotations() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListEventFeedsResponseValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListEventFeedsResponseValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListEventFeedsResponseValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return ListEventFeedsResponseMultiError(errors) + } + + return nil +} + +// ListEventFeedsResponseMultiError is an error wrapping multiple validation +// errors returned by ListEventFeedsResponse.ValidateAll() if the designated +// constraints aren't met. +type ListEventFeedsResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ListEventFeedsResponseMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ListEventFeedsResponseMultiError) AllErrors() []error { return m } + +// ListEventFeedsResponseValidationError is the validation error returned by +// ListEventFeedsResponse.Validate if the designated constraints aren't met. +type ListEventFeedsResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ListEventFeedsResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ListEventFeedsResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ListEventFeedsResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ListEventFeedsResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ListEventFeedsResponseValidationError) ErrorName() string { + return "ListEventFeedsResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e ListEventFeedsResponseValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sListEventFeedsResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ListEventFeedsResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ListEventFeedsResponseValidationError{} + // Validate checks the field values on Event with the rules defined in the // proto definition for this message. If any rules are violated, the first // error encountered is returned, or nil if there are no violations. @@ -627,6 +948,47 @@ func (m *Event) validate(all bool) error { } } + case *Event_ResourceChangeEvent: + if v == nil { + err := EventValidationError{ + field: "Event", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetResourceChangeEvent()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, EventValidationError{ + field: "ResourceChangeEvent", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, EventValidationError{ + field: "ResourceChangeEvent", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResourceChangeEvent()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return EventValidationError{ + field: "ResourceChangeEvent", + reason: "embedded message failed validation", + cause: err, + } + } + } + default: _ = v // ensures v is used } @@ -1149,3 +1511,318 @@ var _ interface { Cause() error ErrorName() string } = RevokeEventValidationError{} + +// Validate checks the field values on ResourceChangeEvent with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *ResourceChangeEvent) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ResourceChangeEvent with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ResourceChangeEventMultiError, or nil if none found. +func (m *ResourceChangeEvent) ValidateAll() error { + return m.validate(true) +} + +func (m *ResourceChangeEvent) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetResourceId() == nil { + err := ResourceChangeEventValidationError{ + field: "ResourceId", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetResourceId()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ResourceChangeEventValidationError{ + field: "ResourceId", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ResourceChangeEventValidationError{ + field: "ResourceId", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResourceId()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ResourceChangeEventValidationError{ + field: "ResourceId", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetParentResourceId()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ResourceChangeEventValidationError{ + field: "ParentResourceId", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ResourceChangeEventValidationError{ + field: "ParentResourceId", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetParentResourceId()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ResourceChangeEventValidationError{ + field: "ParentResourceId", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return ResourceChangeEventMultiError(errors) + } + + return nil +} + +// ResourceChangeEventMultiError is an error wrapping multiple validation +// errors returned by ResourceChangeEvent.ValidateAll() if the designated +// constraints aren't met. +type ResourceChangeEventMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ResourceChangeEventMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ResourceChangeEventMultiError) AllErrors() []error { return m } + +// ResourceChangeEventValidationError is the validation error returned by +// ResourceChangeEvent.Validate if the designated constraints aren't met. +type ResourceChangeEventValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ResourceChangeEventValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ResourceChangeEventValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ResourceChangeEventValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ResourceChangeEventValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ResourceChangeEventValidationError) ErrorName() string { + return "ResourceChangeEventValidationError" +} + +// Error satisfies the builtin error interface +func (e ResourceChangeEventValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sResourceChangeEvent.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ResourceChangeEventValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ResourceChangeEventValidationError{} + +// Validate checks the field values on EventFeedMetadata with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *EventFeedMetadata) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on EventFeedMetadata with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// EventFeedMetadataMultiError, or nil if none found. +func (m *EventFeedMetadata) ValidateAll() error { + return m.validate(true) +} + +func (m *EventFeedMetadata) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if l := len(m.GetId()); l < 1 || l > 1024 { + err := EventFeedMetadataValidationError{ + field: "Id", + reason: "value length must be between 1 and 1024 bytes, inclusive", + } + if !all { + return err + } + errors = append(errors, err) + } + + _EventFeedMetadata_SupportedEventTypes_Unique := make(map[EventType]struct{}, len(m.GetSupportedEventTypes())) + + for idx, item := range m.GetSupportedEventTypes() { + _, _ = idx, item + + if _, exists := _EventFeedMetadata_SupportedEventTypes_Unique[item]; exists { + err := EventFeedMetadataValidationError{ + field: fmt.Sprintf("SupportedEventTypes[%v]", idx), + reason: "repeated value must contain unique items", + } + if !all { + return err + } + errors = append(errors, err) + } else { + _EventFeedMetadata_SupportedEventTypes_Unique[item] = struct{}{} + } + + if _, ok := EventType_name[int32(item)]; !ok { + err := EventFeedMetadataValidationError{ + field: fmt.Sprintf("SupportedEventTypes[%v]", idx), + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if len(errors) > 0 { + return EventFeedMetadataMultiError(errors) + } + + return nil +} + +// EventFeedMetadataMultiError is an error wrapping multiple validation errors +// returned by EventFeedMetadata.ValidateAll() if the designated constraints +// aren't met. +type EventFeedMetadataMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m EventFeedMetadataMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m EventFeedMetadataMultiError) AllErrors() []error { return m } + +// EventFeedMetadataValidationError is the validation error returned by +// EventFeedMetadata.Validate if the designated constraints aren't met. +type EventFeedMetadataValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e EventFeedMetadataValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e EventFeedMetadataValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e EventFeedMetadataValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e EventFeedMetadataValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e EventFeedMetadataValidationError) ErrorName() string { + return "EventFeedMetadataValidationError" +} + +// Error satisfies the builtin error interface +func (e EventFeedMetadataValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sEventFeedMetadata.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = EventFeedMetadataValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = EventFeedMetadataValidationError{} diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/event_feed_grpc.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/event_feed_grpc.pb.go index e82c8c80..1d5b11f2 100644 --- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/event_feed_grpc.pb.go +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/event_feed_grpc.pb.go @@ -19,7 +19,8 @@ import ( const _ = grpc.SupportPackageIsVersion9 const ( - EventService_ListEvents_FullMethodName = "/c1.connector.v2.EventService/ListEvents" + EventService_ListEvents_FullMethodName = "/c1.connector.v2.EventService/ListEvents" + EventService_ListEventFeeds_FullMethodName = "/c1.connector.v2.EventService/ListEventFeeds" ) // EventServiceClient is the client API for EventService service. @@ -27,6 +28,7 @@ const ( // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type EventServiceClient interface { ListEvents(ctx context.Context, in *ListEventsRequest, opts ...grpc.CallOption) (*ListEventsResponse, error) + ListEventFeeds(ctx context.Context, in *ListEventFeedsRequest, opts ...grpc.CallOption) (*ListEventFeedsResponse, error) } type eventServiceClient struct { @@ -47,11 +49,22 @@ func (c *eventServiceClient) ListEvents(ctx context.Context, in *ListEventsReque return out, nil } +func (c *eventServiceClient) ListEventFeeds(ctx context.Context, in *ListEventFeedsRequest, opts ...grpc.CallOption) (*ListEventFeedsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListEventFeedsResponse) + err := c.cc.Invoke(ctx, EventService_ListEventFeeds_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + // EventServiceServer is the server API for EventService service. // All implementations should embed UnimplementedEventServiceServer // for forward compatibility. type EventServiceServer interface { ListEvents(context.Context, *ListEventsRequest) (*ListEventsResponse, error) + ListEventFeeds(context.Context, *ListEventFeedsRequest) (*ListEventFeedsResponse, error) } // UnimplementedEventServiceServer should be embedded to have @@ -64,6 +77,9 @@ type UnimplementedEventServiceServer struct{} func (UnimplementedEventServiceServer) ListEvents(context.Context, *ListEventsRequest) (*ListEventsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListEvents not implemented") } +func (UnimplementedEventServiceServer) ListEventFeeds(context.Context, *ListEventFeedsRequest) (*ListEventFeedsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListEventFeeds not implemented") +} func (UnimplementedEventServiceServer) testEmbeddedByValue() {} // UnsafeEventServiceServer may be embedded to opt out of forward compatibility for this service. @@ -102,6 +118,24 @@ func _EventService_ListEvents_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _EventService_ListEventFeeds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListEventFeedsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EventServiceServer).ListEventFeeds(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: EventService_ListEventFeeds_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EventServiceServer).ListEventFeeds(ctx, req.(*ListEventFeedsRequest)) + } + return interceptor(ctx, in, info, handler) +} + // EventService_ServiceDesc is the grpc.ServiceDesc for EventService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -113,6 +147,10 @@ var EventService_ServiceDesc = grpc.ServiceDesc{ MethodName: "ListEvents", Handler: _EventService_ListEvents_Handler, }, + { + MethodName: "ListEventFeeds", + Handler: _EventService_ListEventFeeds_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "c1/connector/v2/event_feed.proto", diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.go index 725be655..ad9f2313 100644 --- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.go +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.go @@ -129,7 +129,7 @@ func (x Resource_CreationSource) Number() protoreflect.EnumNumber { // Deprecated: Use Resource_CreationSource.Descriptor instead. func (Resource_CreationSource) EnumDescriptor() ([]byte, []int) { - return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{17, 0} + return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{19, 0} } type ResourceType struct { @@ -528,6 +528,94 @@ func (x *DeleteResourceResponse) GetAnnotations() []*anypb.Any { return nil } +type DeleteResourceV2Request struct { + state protoimpl.MessageState `protogen:"open.v1"` + ResourceId *ResourceId `protobuf:"bytes,1,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteResourceV2Request) Reset() { + *x = DeleteResourceV2Request{} + mi := &file_c1_connector_v2_resource_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteResourceV2Request) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteResourceV2Request) ProtoMessage() {} + +func (x *DeleteResourceV2Request) ProtoReflect() protoreflect.Message { + mi := &file_c1_connector_v2_resource_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteResourceV2Request.ProtoReflect.Descriptor instead. +func (*DeleteResourceV2Request) Descriptor() ([]byte, []int) { + return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{7} +} + +func (x *DeleteResourceV2Request) GetResourceId() *ResourceId { + if x != nil { + return x.ResourceId + } + return nil +} + +type DeleteResourceV2Response struct { + state protoimpl.MessageState `protogen:"open.v1"` + Annotations []*anypb.Any `protobuf:"bytes,1,rep,name=annotations,proto3" json:"annotations,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteResourceV2Response) Reset() { + *x = DeleteResourceV2Response{} + mi := &file_c1_connector_v2_resource_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteResourceV2Response) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteResourceV2Response) ProtoMessage() {} + +func (x *DeleteResourceV2Response) ProtoReflect() protoreflect.Message { + mi := &file_c1_connector_v2_resource_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteResourceV2Response.ProtoReflect.Descriptor instead. +func (*DeleteResourceV2Response) Descriptor() ([]byte, []int) { + return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{8} +} + +func (x *DeleteResourceV2Response) GetAnnotations() []*anypb.Any { + if x != nil { + return x.Annotations + } + return nil +} + type RotateCredentialRequest struct { state protoimpl.MessageState `protogen:"open.v1"` ResourceId *ResourceId `protobuf:"bytes,1,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` @@ -539,7 +627,7 @@ type RotateCredentialRequest struct { func (x *RotateCredentialRequest) Reset() { *x = RotateCredentialRequest{} - mi := &file_c1_connector_v2_resource_proto_msgTypes[7] + mi := &file_c1_connector_v2_resource_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -551,7 +639,7 @@ func (x *RotateCredentialRequest) String() string { func (*RotateCredentialRequest) ProtoMessage() {} func (x *RotateCredentialRequest) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_resource_proto_msgTypes[7] + mi := &file_c1_connector_v2_resource_proto_msgTypes[9] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -564,7 +652,7 @@ func (x *RotateCredentialRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RotateCredentialRequest.ProtoReflect.Descriptor instead. func (*RotateCredentialRequest) Descriptor() ([]byte, []int) { - return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{7} + return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{9} } func (x *RotateCredentialRequest) GetResourceId() *ResourceId { @@ -599,7 +687,7 @@ type RotateCredentialResponse struct { func (x *RotateCredentialResponse) Reset() { *x = RotateCredentialResponse{} - mi := &file_c1_connector_v2_resource_proto_msgTypes[8] + mi := &file_c1_connector_v2_resource_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -611,7 +699,7 @@ func (x *RotateCredentialResponse) String() string { func (*RotateCredentialResponse) ProtoMessage() {} func (x *RotateCredentialResponse) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_resource_proto_msgTypes[8] + mi := &file_c1_connector_v2_resource_proto_msgTypes[10] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -624,7 +712,7 @@ func (x *RotateCredentialResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use RotateCredentialResponse.ProtoReflect.Descriptor instead. func (*RotateCredentialResponse) Descriptor() ([]byte, []int) { - return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{8} + return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{10} } func (x *RotateCredentialResponse) GetEncryptedData() []*EncryptedData { @@ -662,7 +750,7 @@ type AccountInfo struct { func (x *AccountInfo) Reset() { *x = AccountInfo{} - mi := &file_c1_connector_v2_resource_proto_msgTypes[9] + mi := &file_c1_connector_v2_resource_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -674,7 +762,7 @@ func (x *AccountInfo) String() string { func (*AccountInfo) ProtoMessage() {} func (x *AccountInfo) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_resource_proto_msgTypes[9] + mi := &file_c1_connector_v2_resource_proto_msgTypes[11] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -687,7 +775,7 @@ func (x *AccountInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use AccountInfo.ProtoReflect.Descriptor instead. func (*AccountInfo) Descriptor() ([]byte, []int) { - return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{9} + return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{11} } func (x *AccountInfo) GetEmails() []*AccountInfo_Email { @@ -732,7 +820,7 @@ type CredentialOptions struct { func (x *CredentialOptions) Reset() { *x = CredentialOptions{} - mi := &file_c1_connector_v2_resource_proto_msgTypes[10] + mi := &file_c1_connector_v2_resource_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -744,7 +832,7 @@ func (x *CredentialOptions) String() string { func (*CredentialOptions) ProtoMessage() {} func (x *CredentialOptions) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_resource_proto_msgTypes[10] + mi := &file_c1_connector_v2_resource_proto_msgTypes[12] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -757,7 +845,7 @@ func (x *CredentialOptions) ProtoReflect() protoreflect.Message { // Deprecated: Use CredentialOptions.ProtoReflect.Descriptor instead. func (*CredentialOptions) Descriptor() ([]byte, []int) { - return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{10} + return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{12} } func (x *CredentialOptions) GetOptions() isCredentialOptions_Options { @@ -827,7 +915,7 @@ type CreateAccountRequest struct { func (x *CreateAccountRequest) Reset() { *x = CreateAccountRequest{} - mi := &file_c1_connector_v2_resource_proto_msgTypes[11] + mi := &file_c1_connector_v2_resource_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -839,7 +927,7 @@ func (x *CreateAccountRequest) String() string { func (*CreateAccountRequest) ProtoMessage() {} func (x *CreateAccountRequest) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_resource_proto_msgTypes[11] + mi := &file_c1_connector_v2_resource_proto_msgTypes[13] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -852,7 +940,7 @@ func (x *CreateAccountRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateAccountRequest.ProtoReflect.Descriptor instead. func (*CreateAccountRequest) Descriptor() ([]byte, []int) { - return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{11} + return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{13} } func (x *CreateAccountRequest) GetAccountInfo() *AccountInfo { @@ -891,7 +979,7 @@ type CreateAccountResponse struct { func (x *CreateAccountResponse) Reset() { *x = CreateAccountResponse{} - mi := &file_c1_connector_v2_resource_proto_msgTypes[12] + mi := &file_c1_connector_v2_resource_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -903,7 +991,7 @@ func (x *CreateAccountResponse) String() string { func (*CreateAccountResponse) ProtoMessage() {} func (x *CreateAccountResponse) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_resource_proto_msgTypes[12] + mi := &file_c1_connector_v2_resource_proto_msgTypes[14] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -916,7 +1004,7 @@ func (x *CreateAccountResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateAccountResponse.ProtoReflect.Descriptor instead. func (*CreateAccountResponse) Descriptor() ([]byte, []int) { - return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{12} + return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{14} } func (x *CreateAccountResponse) GetResult() isCreateAccountResponse_Result { @@ -990,7 +1078,7 @@ type EncryptedData struct { func (x *EncryptedData) Reset() { *x = EncryptedData{} - mi := &file_c1_connector_v2_resource_proto_msgTypes[13] + mi := &file_c1_connector_v2_resource_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1002,7 +1090,7 @@ func (x *EncryptedData) String() string { func (*EncryptedData) ProtoMessage() {} func (x *EncryptedData) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_resource_proto_msgTypes[13] + mi := &file_c1_connector_v2_resource_proto_msgTypes[15] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1015,7 +1103,7 @@ func (x *EncryptedData) ProtoReflect() protoreflect.Message { // Deprecated: Use EncryptedData.ProtoReflect.Descriptor instead. func (*EncryptedData) Descriptor() ([]byte, []int) { - return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{13} + return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{15} } func (x *EncryptedData) GetProvider() string { @@ -1080,7 +1168,7 @@ type PlaintextData struct { func (x *PlaintextData) Reset() { *x = PlaintextData{} - mi := &file_c1_connector_v2_resource_proto_msgTypes[14] + mi := &file_c1_connector_v2_resource_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1092,7 +1180,7 @@ func (x *PlaintextData) String() string { func (*PlaintextData) ProtoMessage() {} func (x *PlaintextData) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_resource_proto_msgTypes[14] + mi := &file_c1_connector_v2_resource_proto_msgTypes[16] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1105,7 +1193,7 @@ func (x *PlaintextData) ProtoReflect() protoreflect.Message { // Deprecated: Use PlaintextData.ProtoReflect.Descriptor instead. func (*PlaintextData) Descriptor() ([]byte, []int) { - return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{14} + return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{16} } func (x *PlaintextData) GetName() string { @@ -1151,7 +1239,7 @@ type EncryptionConfig struct { func (x *EncryptionConfig) Reset() { *x = EncryptionConfig{} - mi := &file_c1_connector_v2_resource_proto_msgTypes[15] + mi := &file_c1_connector_v2_resource_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1163,7 +1251,7 @@ func (x *EncryptionConfig) String() string { func (*EncryptionConfig) ProtoMessage() {} func (x *EncryptionConfig) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_resource_proto_msgTypes[15] + mi := &file_c1_connector_v2_resource_proto_msgTypes[17] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1176,7 +1264,7 @@ func (x *EncryptionConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use EncryptionConfig.ProtoReflect.Descriptor instead. func (*EncryptionConfig) Descriptor() ([]byte, []int) { - return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{15} + return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{17} } func (x *EncryptionConfig) GetPrincipal() *Resource { @@ -1237,7 +1325,7 @@ type ResourceId struct { func (x *ResourceId) Reset() { *x = ResourceId{} - mi := &file_c1_connector_v2_resource_proto_msgTypes[16] + mi := &file_c1_connector_v2_resource_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1249,7 +1337,7 @@ func (x *ResourceId) String() string { func (*ResourceId) ProtoMessage() {} func (x *ResourceId) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_resource_proto_msgTypes[16] + mi := &file_c1_connector_v2_resource_proto_msgTypes[18] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1262,7 +1350,7 @@ func (x *ResourceId) ProtoReflect() protoreflect.Message { // Deprecated: Use ResourceId.ProtoReflect.Descriptor instead. func (*ResourceId) Descriptor() ([]byte, []int) { - return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{16} + return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{18} } func (x *ResourceId) GetResourceType() string { @@ -1302,7 +1390,7 @@ type Resource struct { func (x *Resource) Reset() { *x = Resource{} - mi := &file_c1_connector_v2_resource_proto_msgTypes[17] + mi := &file_c1_connector_v2_resource_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1314,7 +1402,7 @@ func (x *Resource) String() string { func (*Resource) ProtoMessage() {} func (x *Resource) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_resource_proto_msgTypes[17] + mi := &file_c1_connector_v2_resource_proto_msgTypes[19] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1327,7 +1415,7 @@ func (x *Resource) ProtoReflect() protoreflect.Message { // Deprecated: Use Resource.ProtoReflect.Descriptor instead. func (*Resource) Descriptor() ([]byte, []int) { - return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{17} + return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{19} } func (x *Resource) GetId() *ResourceId { @@ -1399,7 +1487,7 @@ type ResourcesServiceListResourcesRequest struct { func (x *ResourcesServiceListResourcesRequest) Reset() { *x = ResourcesServiceListResourcesRequest{} - mi := &file_c1_connector_v2_resource_proto_msgTypes[18] + mi := &file_c1_connector_v2_resource_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1411,7 +1499,7 @@ func (x *ResourcesServiceListResourcesRequest) String() string { func (*ResourcesServiceListResourcesRequest) ProtoMessage() {} func (x *ResourcesServiceListResourcesRequest) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_resource_proto_msgTypes[18] + mi := &file_c1_connector_v2_resource_proto_msgTypes[20] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1424,7 +1512,7 @@ func (x *ResourcesServiceListResourcesRequest) ProtoReflect() protoreflect.Messa // Deprecated: Use ResourcesServiceListResourcesRequest.ProtoReflect.Descriptor instead. func (*ResourcesServiceListResourcesRequest) Descriptor() ([]byte, []int) { - return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{18} + return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{20} } func (x *ResourcesServiceListResourcesRequest) GetResourceTypeId() string { @@ -1473,7 +1561,7 @@ type ResourcesServiceListResourcesResponse struct { func (x *ResourcesServiceListResourcesResponse) Reset() { *x = ResourcesServiceListResourcesResponse{} - mi := &file_c1_connector_v2_resource_proto_msgTypes[19] + mi := &file_c1_connector_v2_resource_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1485,7 +1573,7 @@ func (x *ResourcesServiceListResourcesResponse) String() string { func (*ResourcesServiceListResourcesResponse) ProtoMessage() {} func (x *ResourcesServiceListResourcesResponse) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_resource_proto_msgTypes[19] + mi := &file_c1_connector_v2_resource_proto_msgTypes[21] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1498,7 +1586,7 @@ func (x *ResourcesServiceListResourcesResponse) ProtoReflect() protoreflect.Mess // Deprecated: Use ResourcesServiceListResourcesResponse.ProtoReflect.Descriptor instead. func (*ResourcesServiceListResourcesResponse) Descriptor() ([]byte, []int) { - return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{19} + return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{21} } func (x *ResourcesServiceListResourcesResponse) GetList() []*Resource { @@ -1522,6 +1610,118 @@ func (x *ResourcesServiceListResourcesResponse) GetAnnotations() []*anypb.Any { return nil } +type ResourceGetterServiceGetResourceRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ResourceId *ResourceId `protobuf:"bytes,1,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` + ParentResourceId *ResourceId `protobuf:"bytes,2,opt,name=parent_resource_id,json=parentResourceId,proto3" json:"parent_resource_id,omitempty"` + Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ResourceGetterServiceGetResourceRequest) Reset() { + *x = ResourceGetterServiceGetResourceRequest{} + mi := &file_c1_connector_v2_resource_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ResourceGetterServiceGetResourceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResourceGetterServiceGetResourceRequest) ProtoMessage() {} + +func (x *ResourceGetterServiceGetResourceRequest) ProtoReflect() protoreflect.Message { + mi := &file_c1_connector_v2_resource_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResourceGetterServiceGetResourceRequest.ProtoReflect.Descriptor instead. +func (*ResourceGetterServiceGetResourceRequest) Descriptor() ([]byte, []int) { + return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{22} +} + +func (x *ResourceGetterServiceGetResourceRequest) GetResourceId() *ResourceId { + if x != nil { + return x.ResourceId + } + return nil +} + +func (x *ResourceGetterServiceGetResourceRequest) GetParentResourceId() *ResourceId { + if x != nil { + return x.ParentResourceId + } + return nil +} + +func (x *ResourceGetterServiceGetResourceRequest) GetAnnotations() []*anypb.Any { + if x != nil { + return x.Annotations + } + return nil +} + +type ResourceGetterServiceGetResourceResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Resource *Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` + Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ResourceGetterServiceGetResourceResponse) Reset() { + *x = ResourceGetterServiceGetResourceResponse{} + mi := &file_c1_connector_v2_resource_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ResourceGetterServiceGetResourceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResourceGetterServiceGetResourceResponse) ProtoMessage() {} + +func (x *ResourceGetterServiceGetResourceResponse) ProtoReflect() protoreflect.Message { + mi := &file_c1_connector_v2_resource_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResourceGetterServiceGetResourceResponse.ProtoReflect.Descriptor instead. +func (*ResourceGetterServiceGetResourceResponse) Descriptor() ([]byte, []int) { + return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{23} +} + +func (x *ResourceGetterServiceGetResourceResponse) GetResource() *Resource { + if x != nil { + return x.Resource + } + return nil +} + +func (x *ResourceGetterServiceGetResourceResponse) GetAnnotations() []*anypb.Any { + if x != nil { + return x.Annotations + } + return nil +} + type ExternalId struct { state protoimpl.MessageState `protogen:"open.v1"` Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` @@ -1533,7 +1733,7 @@ type ExternalId struct { func (x *ExternalId) Reset() { *x = ExternalId{} - mi := &file_c1_connector_v2_resource_proto_msgTypes[20] + mi := &file_c1_connector_v2_resource_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1545,7 +1745,7 @@ func (x *ExternalId) String() string { func (*ExternalId) ProtoMessage() {} func (x *ExternalId) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_resource_proto_msgTypes[20] + mi := &file_c1_connector_v2_resource_proto_msgTypes[24] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1558,7 +1758,7 @@ func (x *ExternalId) ProtoReflect() protoreflect.Message { // Deprecated: Use ExternalId.ProtoReflect.Descriptor instead. func (*ExternalId) Descriptor() ([]byte, []int) { - return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{20} + return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{24} } func (x *ExternalId) GetId() string { @@ -1593,7 +1793,7 @@ type AccountInfo_Email struct { func (x *AccountInfo_Email) Reset() { *x = AccountInfo_Email{} - mi := &file_c1_connector_v2_resource_proto_msgTypes[21] + mi := &file_c1_connector_v2_resource_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1605,7 +1805,7 @@ func (x *AccountInfo_Email) String() string { func (*AccountInfo_Email) ProtoMessage() {} func (x *AccountInfo_Email) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_resource_proto_msgTypes[21] + mi := &file_c1_connector_v2_resource_proto_msgTypes[25] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1618,7 +1818,7 @@ func (x *AccountInfo_Email) ProtoReflect() protoreflect.Message { // Deprecated: Use AccountInfo_Email.ProtoReflect.Descriptor instead. func (*AccountInfo_Email) Descriptor() ([]byte, []int) { - return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{9, 0} + return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{11, 0} } func (x *AccountInfo_Email) GetAddress() string { @@ -1644,7 +1844,7 @@ type CredentialOptions_RandomPassword struct { func (x *CredentialOptions_RandomPassword) Reset() { *x = CredentialOptions_RandomPassword{} - mi := &file_c1_connector_v2_resource_proto_msgTypes[22] + mi := &file_c1_connector_v2_resource_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1656,7 +1856,7 @@ func (x *CredentialOptions_RandomPassword) String() string { func (*CredentialOptions_RandomPassword) ProtoMessage() {} func (x *CredentialOptions_RandomPassword) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_resource_proto_msgTypes[22] + mi := &file_c1_connector_v2_resource_proto_msgTypes[26] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1669,7 +1869,7 @@ func (x *CredentialOptions_RandomPassword) ProtoReflect() protoreflect.Message { // Deprecated: Use CredentialOptions_RandomPassword.ProtoReflect.Descriptor instead. func (*CredentialOptions_RandomPassword) Descriptor() ([]byte, []int) { - return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{10, 0} + return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{12, 0} } func (x *CredentialOptions_RandomPassword) GetLength() int64 { @@ -1687,7 +1887,7 @@ type CredentialOptions_NoPassword struct { func (x *CredentialOptions_NoPassword) Reset() { *x = CredentialOptions_NoPassword{} - mi := &file_c1_connector_v2_resource_proto_msgTypes[23] + mi := &file_c1_connector_v2_resource_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1699,7 +1899,7 @@ func (x *CredentialOptions_NoPassword) String() string { func (*CredentialOptions_NoPassword) ProtoMessage() {} func (x *CredentialOptions_NoPassword) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_resource_proto_msgTypes[23] + mi := &file_c1_connector_v2_resource_proto_msgTypes[27] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1712,7 +1912,7 @@ func (x *CredentialOptions_NoPassword) ProtoReflect() protoreflect.Message { // Deprecated: Use CredentialOptions_NoPassword.ProtoReflect.Descriptor instead. func (*CredentialOptions_NoPassword) Descriptor() ([]byte, []int) { - return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{10, 1} + return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{12, 1} } type CredentialOptions_SSO struct { @@ -1724,7 +1924,7 @@ type CredentialOptions_SSO struct { func (x *CredentialOptions_SSO) Reset() { *x = CredentialOptions_SSO{} - mi := &file_c1_connector_v2_resource_proto_msgTypes[24] + mi := &file_c1_connector_v2_resource_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1736,7 +1936,7 @@ func (x *CredentialOptions_SSO) String() string { func (*CredentialOptions_SSO) ProtoMessage() {} func (x *CredentialOptions_SSO) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_resource_proto_msgTypes[24] + mi := &file_c1_connector_v2_resource_proto_msgTypes[28] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1749,7 +1949,7 @@ func (x *CredentialOptions_SSO) ProtoReflect() protoreflect.Message { // Deprecated: Use CredentialOptions_SSO.ProtoReflect.Descriptor instead. func (*CredentialOptions_SSO) Descriptor() ([]byte, []int) { - return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{10, 2} + return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{12, 2} } func (x *CredentialOptions_SSO) GetSsoProvider() string { @@ -1769,7 +1969,7 @@ type CreateAccountResponse_SuccessResult struct { func (x *CreateAccountResponse_SuccessResult) Reset() { *x = CreateAccountResponse_SuccessResult{} - mi := &file_c1_connector_v2_resource_proto_msgTypes[25] + mi := &file_c1_connector_v2_resource_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1781,7 +1981,7 @@ func (x *CreateAccountResponse_SuccessResult) String() string { func (*CreateAccountResponse_SuccessResult) ProtoMessage() {} func (x *CreateAccountResponse_SuccessResult) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_resource_proto_msgTypes[25] + mi := &file_c1_connector_v2_resource_proto_msgTypes[29] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1794,7 +1994,7 @@ func (x *CreateAccountResponse_SuccessResult) ProtoReflect() protoreflect.Messag // Deprecated: Use CreateAccountResponse_SuccessResult.ProtoReflect.Descriptor instead. func (*CreateAccountResponse_SuccessResult) Descriptor() ([]byte, []int) { - return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{12, 0} + return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{14, 0} } func (x *CreateAccountResponse_SuccessResult) GetResource() *Resource { @@ -1822,7 +2022,7 @@ type CreateAccountResponse_ActionRequiredResult struct { func (x *CreateAccountResponse_ActionRequiredResult) Reset() { *x = CreateAccountResponse_ActionRequiredResult{} - mi := &file_c1_connector_v2_resource_proto_msgTypes[26] + mi := &file_c1_connector_v2_resource_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1834,7 +2034,7 @@ func (x *CreateAccountResponse_ActionRequiredResult) String() string { func (*CreateAccountResponse_ActionRequiredResult) ProtoMessage() {} func (x *CreateAccountResponse_ActionRequiredResult) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_resource_proto_msgTypes[26] + mi := &file_c1_connector_v2_resource_proto_msgTypes[30] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1847,7 +2047,7 @@ func (x *CreateAccountResponse_ActionRequiredResult) ProtoReflect() protoreflect // Deprecated: Use CreateAccountResponse_ActionRequiredResult.ProtoReflect.Descriptor instead. func (*CreateAccountResponse_ActionRequiredResult) Descriptor() ([]byte, []int) { - return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{12, 1} + return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{14, 1} } func (x *CreateAccountResponse_ActionRequiredResult) GetResource() *Resource { @@ -1880,7 +2080,7 @@ type EncryptionConfig_JWKPublicKeyConfig struct { func (x *EncryptionConfig_JWKPublicKeyConfig) Reset() { *x = EncryptionConfig_JWKPublicKeyConfig{} - mi := &file_c1_connector_v2_resource_proto_msgTypes[27] + mi := &file_c1_connector_v2_resource_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1892,7 +2092,7 @@ func (x *EncryptionConfig_JWKPublicKeyConfig) String() string { func (*EncryptionConfig_JWKPublicKeyConfig) ProtoMessage() {} func (x *EncryptionConfig_JWKPublicKeyConfig) ProtoReflect() protoreflect.Message { - mi := &file_c1_connector_v2_resource_proto_msgTypes[27] + mi := &file_c1_connector_v2_resource_proto_msgTypes[31] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1905,7 +2105,7 @@ func (x *EncryptionConfig_JWKPublicKeyConfig) ProtoReflect() protoreflect.Messag // Deprecated: Use EncryptionConfig_JWKPublicKeyConfig.ProtoReflect.Descriptor instead. func (*EncryptionConfig_JWKPublicKeyConfig) Descriptor() ([]byte, []int) { - return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{15, 0} + return file_c1_connector_v2_resource_proto_rawDescGZIP(), []int{17, 0} } func (x *EncryptionConfig_JWKPublicKeyConfig) GetPubKey() []byte { @@ -2006,250 +2206,286 @@ var file_c1_connector_v2_resource_proto_rawDesc = string([]byte{ 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xfc, 0x01, 0x0a, 0x17, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x43, - 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x3c, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x49, 0x64, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x51, - 0x0a, 0x12, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x6f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x31, 0x2e, - 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x11, - 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x50, 0x0a, 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, - 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, - 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x52, 0x11, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x73, 0x22, 0xd7, 0x01, 0x0a, 0x18, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x43, 0x72, - 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x45, 0x0a, 0x0e, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x61, - 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, - 0x70, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0d, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, - 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x3c, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, - 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, - 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x82, 0x02, - 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3a, 0x0a, - 0x06, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, - 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x45, 0x6d, 0x61, 0x69, - 0x6c, 0x52, 0x06, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x6f, 0x67, - 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x12, - 0x23, 0x0a, 0x0d, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x41, 0x6c, 0x69, - 0x61, 0x73, 0x65, 0x73, 0x12, 0x31, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x07, - 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x1a, 0x49, 0x0a, 0x05, 0x45, 0x6d, 0x61, 0x69, 0x6c, - 0x12, 0x21, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x60, 0x01, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, - 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x50, 0x72, 0x69, 0x6d, 0x61, - 0x72, 0x79, 0x22, 0xf7, 0x02, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, - 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5c, 0x0a, 0x0f, 0x72, 0x61, 0x6e, 0x64, - 0x6f, 0x6d, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x64, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x31, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x50, 0x61, 0x73, 0x73, - 0x77, 0x6f, 0x72, 0x64, 0x48, 0x00, 0x52, 0x0e, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x50, 0x61, - 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x50, 0x0a, 0x0b, 0x6e, 0x6f, 0x5f, 0x70, 0x61, 0x73, - 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x63, 0x31, - 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, - 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x4e, 0x6f, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x48, 0x00, 0x52, 0x0a, 0x6e, 0x6f, - 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x3a, 0x0a, 0x03, 0x73, 0x73, 0x6f, 0x18, - 0x66, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x53, 0x4f, 0x48, 0x00, 0x52, - 0x03, 0x73, 0x73, 0x6f, 0x1a, 0x33, 0x0a, 0x0e, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x50, 0x61, - 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x21, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x22, 0x04, 0x18, 0x40, 0x28, - 0x08, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x1a, 0x0c, 0x0a, 0x0a, 0x4e, 0x6f, 0x50, - 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x1a, 0x28, 0x0a, 0x03, 0x53, 0x53, 0x4f, 0x12, 0x21, - 0x0a, 0x0c, 0x73, 0x73, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x73, 0x6f, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, - 0x72, 0x42, 0x09, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xfc, 0x01, 0x0a, - 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x31, - 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x51, 0x0a, 0x12, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, + 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x57, 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x56, 0x32, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x3c, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, + 0x64, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x22, 0x52, 0x0a, + 0x18, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x56, + 0x32, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x22, 0xfc, 0x01, 0x0a, 0x17, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, + 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x52, + 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x51, 0x0a, 0x12, 0x63, + 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x11, 0x63, 0x72, 0x65, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x50, + 0x0a, 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x31, 0x2e, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x63, + 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x11, 0x65, + 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, + 0x22, 0xd7, 0x01, 0x0a, 0x18, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, + 0x0e, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, + 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0d, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, + 0x44, 0x61, 0x74, 0x61, 0x12, 0x3c, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x49, 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x82, 0x02, 0x0a, 0x0b, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3a, 0x0a, 0x06, 0x65, 0x6d, + 0x61, 0x69, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x31, 0x2e, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x52, 0x06, + 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x23, 0x0a, 0x0d, + 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, + 0x73, 0x12, 0x31, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, 0x6f, + 0x66, 0x69, 0x6c, 0x65, 0x1a, 0x49, 0x0a, 0x05, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x21, 0x0a, + 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, + 0xfa, 0x42, 0x04, 0x72, 0x02, 0x60, 0x01, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x22, + 0xf7, 0x02, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5c, 0x0a, 0x0f, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x5f, + 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, + 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, + 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, + 0x64, 0x48, 0x00, 0x52, 0x0e, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x50, 0x61, 0x73, 0x73, 0x77, + 0x6f, 0x72, 0x64, 0x12, 0x50, 0x0a, 0x0b, 0x6e, 0x6f, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, + 0x72, 0x64, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4e, 0x6f, 0x50, + 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x48, 0x00, 0x52, 0x0a, 0x6e, 0x6f, 0x50, 0x61, 0x73, + 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x3a, 0x0a, 0x03, 0x73, 0x73, 0x6f, 0x18, 0x66, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x11, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x50, 0x0a, 0x12, 0x65, 0x6e, 0x63, - 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x11, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x22, 0xfe, 0x04, 0x0a, 0x15, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x53, 0x4f, 0x48, 0x00, 0x52, 0x03, 0x73, 0x73, + 0x6f, 0x1a, 0x33, 0x0a, 0x0e, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x50, 0x61, 0x73, 0x73, 0x77, + 0x6f, 0x72, 0x64, 0x12, 0x21, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x22, 0x04, 0x18, 0x40, 0x28, 0x08, 0x52, 0x06, + 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x1a, 0x0c, 0x0a, 0x0a, 0x4e, 0x6f, 0x50, 0x61, 0x73, 0x73, + 0x77, 0x6f, 0x72, 0x64, 0x1a, 0x28, 0x0a, 0x03, 0x53, 0x53, 0x4f, 0x12, 0x21, 0x0a, 0x0c, 0x73, + 0x73, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x73, 0x73, 0x6f, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x42, 0x09, + 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xfc, 0x01, 0x0a, 0x14, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x6e, + 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, + 0x6e, 0x66, 0x6f, 0x12, 0x51, 0x0a, 0x12, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, + 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x22, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, + 0x32, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x11, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x50, 0x0a, 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x11, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x22, 0xfe, 0x04, 0x0a, 0x15, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x50, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x64, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x75, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x48, 0x00, 0x52, 0x07, 0x73, 0x75, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x12, 0x66, 0x0a, 0x0f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, + 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, + 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, - 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x48, 0x00, 0x52, 0x07, - 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x66, 0x0a, 0x0f, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x3b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, - 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x48, 0x00, 0x52, - 0x0e, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, - 0x45, 0x0a, 0x0e, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, - 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, - 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0d, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, - 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, - 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x7f, - 0x0a, 0x0d, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, - 0x35, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x37, 0x0a, 0x18, 0x69, 0x73, 0x5f, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x69, 0x73, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x1a, - 0xa0, 0x01, 0x0a, 0x14, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, - 0x65, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x35, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, - 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, - 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x37, 0x0a, 0x18, 0x69, 0x73, 0x5f, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x72, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x69, 0x73, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x42, 0x08, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0xd6, 0x01, 0x0a, - 0x0d, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1a, - 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x06, 0x6b, 0x65, - 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x05, - 0x6b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, - 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x65, 0x6e, - 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x17, 0x0a, 0x07, - 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x6b, - 0x65, 0x79, 0x49, 0x64, 0x73, 0x22, 0x73, 0x0a, 0x0d, 0x50, 0x6c, 0x61, 0x69, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, - 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x22, 0xa2, 0x02, 0x0a, 0x10, 0x45, - 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, - 0x37, 0x0a, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x70, - 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, - 0x69, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, - 0x69, 0x64, 0x65, 0x72, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x69, 0x0a, 0x15, 0x6a, - 0x77, 0x6b, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x63, 0x31, 0x2e, - 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x63, - 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4a, 0x57, - 0x4b, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x48, 0x00, 0x52, 0x12, 0x6a, 0x77, 0x6b, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x2d, 0x0a, 0x12, 0x4a, 0x57, 0x4b, 0x50, 0x75, 0x62, - 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x17, 0x0a, 0x07, - 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, - 0x75, 0x62, 0x4b, 0x65, 0x79, 0x42, 0x08, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, - 0x8c, 0x01, 0x0a, 0x0a, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x2f, - 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x20, 0x01, 0x28, 0x80, - 0x08, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x26, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x20, 0x01, 0x28, 0x80, 0x08, 0x52, 0x08, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x62, 0x61, 0x74, 0x6f, 0x6e, - 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0d, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0xf0, - 0x04, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x69, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x48, 0x00, 0x52, 0x0e, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x45, 0x0a, 0x0e, + 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, + 0x44, 0x61, 0x74, 0x61, 0x52, 0x0d, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x44, + 0x61, 0x74, 0x61, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x7f, 0x0a, 0x0d, 0x53, + 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x35, 0x0a, 0x08, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, + 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x12, 0x37, 0x0a, 0x18, 0x69, 0x73, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x69, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x1a, 0xa0, 0x01, 0x0a, + 0x14, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x52, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x35, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x49, 0x64, 0x52, 0x02, 0x69, 0x64, 0x12, 0x49, 0x0a, 0x12, 0x70, 0x61, 0x72, 0x65, - 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, + 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x37, 0x0a, 0x18, 0x69, 0x73, 0x5f, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x69, 0x73, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x42, + 0x08, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0xd6, 0x01, 0x0a, 0x0d, 0x45, 0x6e, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1a, 0x0a, 0x08, 0x70, + 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, + 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x05, 0x6b, 0x65, 0x79, + 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, + 0x74, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x65, 0x6e, 0x63, 0x72, 0x79, + 0x70, 0x74, 0x65, 0x64, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x6b, 0x65, 0x79, + 0x5f, 0x69, 0x64, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x6b, 0x65, 0x79, 0x49, + 0x64, 0x73, 0x22, 0x73, 0x0a, 0x0d, 0x50, 0x6c, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x44, + 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x22, 0xa2, 0x02, 0x0a, 0x10, 0x45, 0x6e, 0x63, 0x72, + 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x37, 0x0a, 0x09, + 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, + 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x70, 0x72, 0x69, 0x6e, + 0x63, 0x69, 0x70, 0x61, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x72, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x69, 0x0a, 0x15, 0x6a, 0x77, 0x6b, 0x5f, + 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4a, 0x57, 0x4b, 0x50, 0x75, + 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, + 0x12, 0x6a, 0x77, 0x6b, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x1a, 0x2d, 0x0a, 0x12, 0x4a, 0x57, 0x4b, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x75, 0x62, + 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x75, 0x62, 0x4b, + 0x65, 0x79, 0x42, 0x08, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x8c, 0x01, 0x0a, + 0x0a, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x0d, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x20, 0x01, 0x28, 0x80, 0x08, 0x52, 0x0c, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x26, 0x0a, 0x08, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, + 0xfa, 0x42, 0x07, 0x72, 0x05, 0x20, 0x01, 0x28, 0x80, 0x08, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x5f, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x62, 0x61, + 0x74, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0xf0, 0x04, 0x0a, 0x08, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, - 0x64, 0x52, 0x10, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, - 0x20, 0x01, 0x28, 0x80, 0x08, 0xd0, 0x01, 0x01, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, - 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, - 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2f, 0x0a, - 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0x28, 0x80, 0x10, 0xd0, 0x01, - 0x01, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, - 0x0a, 0x0e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x3c, 0x0a, 0x0b, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, - 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, - 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x78, 0x74, - 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, - 0x6c, 0x49, 0x64, 0x12, 0x51, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x63, - 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x98, 0x01, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x1b, 0x43, 0x52, 0x45, - 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x53, - 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x2c, 0x0a, 0x28, 0x43, 0x52, - 0x45, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x43, 0x4f, - 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x4f, 0x52, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x5f, 0x52, 0x45, 0x53, - 0x4f, 0x55, 0x52, 0x43, 0x45, 0x53, 0x10, 0x01, 0x12, 0x37, 0x0a, 0x33, 0x43, 0x52, 0x45, 0x41, - 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x4e, - 0x45, 0x43, 0x54, 0x4f, 0x52, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x5f, 0x47, 0x52, 0x41, 0x4e, 0x54, - 0x53, 0x5f, 0x50, 0x52, 0x49, 0x4e, 0x43, 0x49, 0x50, 0x41, 0x4c, 0x5f, 0x4a, 0x49, 0x54, 0x10, - 0x02, 0x22, 0xc1, 0x02, 0x0a, 0x24, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x10, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x20, 0x01, 0x28, 0x80, 0x08, - 0x52, 0x0e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, - 0x12, 0x53, 0x0a, 0x12, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, + 0x64, 0x52, 0x02, 0x69, 0x64, 0x12, 0x49, 0x0a, 0x12, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x52, 0x10, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, + 0x12, 0x30, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0x28, + 0x80, 0x08, 0xd0, 0x01, 0x01, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2f, 0x0a, 0x0b, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0x28, 0x80, 0x10, 0xd0, 0x01, 0x01, 0x52, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x62, + 0x61, 0x74, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0d, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x12, 0x3c, 0x0a, 0x0b, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x69, + 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x49, 0x64, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, + 0x12, 0x51, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x63, 0x31, 0x2e, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x22, 0x98, 0x01, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x1b, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, + 0x4f, 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x2c, 0x0a, 0x28, 0x43, 0x52, 0x45, 0x41, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x4e, 0x45, + 0x43, 0x54, 0x4f, 0x52, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, + 0x43, 0x45, 0x53, 0x10, 0x01, 0x12, 0x37, 0x0a, 0x33, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, 0x4f, + 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, + 0x4f, 0x52, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x5f, 0x47, 0x52, 0x41, 0x4e, 0x54, 0x53, 0x5f, 0x50, + 0x52, 0x49, 0x4e, 0x43, 0x49, 0x50, 0x41, 0x4c, 0x5f, 0x4a, 0x49, 0x54, 0x10, 0x02, 0x22, 0xc1, + 0x02, 0x0a, 0x24, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x20, 0x01, 0x28, 0x80, 0x08, 0x52, 0x0e, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x12, 0x53, 0x0a, + 0x12, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x00, + 0x52, 0x10, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x49, 0x64, 0x12, 0x27, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x2a, 0x05, 0x18, 0xfa, 0x01, 0x40, + 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x2d, 0x0a, 0x0a, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x0e, 0xfa, 0x42, 0x0b, 0x72, 0x09, 0x20, 0x01, 0x28, 0x80, 0x80, 0x40, 0xd0, 0x01, 0x01, 0x52, + 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x22, 0xc6, 0x01, 0x0a, 0x25, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x04, + 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x0f, 0x6e, + 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x72, 0x09, 0x20, 0x01, 0x28, 0x80, 0x80, + 0x40, 0xd0, 0x01, 0x01, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xf4, 0x01, 0x0a, 0x27, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x65, 0x74, 0x74, 0x65, 0x72, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, - 0x02, 0x10, 0x00, 0x52, 0x10, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, - 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x2a, 0x05, 0x18, - 0xfa, 0x01, 0x40, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x2d, - 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x72, 0x09, 0x20, 0x01, 0x28, 0x80, 0x80, 0x40, 0xd0, - 0x01, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x36, 0x0a, - 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xc6, 0x01, 0x0a, 0x25, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x2d, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x36, - 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x72, 0x09, 0x20, 0x01, - 0x28, 0x80, 0x80, 0x40, 0xd0, 0x01, 0x01, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, - 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x53, 0x0a, 0x12, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x42, 0x08, + 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x00, 0x52, 0x10, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x22, 0x99, 0x01, 0x0a, 0x28, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, + 0x65, 0x74, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x35, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x52, 0x0a, 0x0a, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, @@ -2277,41 +2513,59 @@ var file_c1_connector_v2_resource_proto_rawDesc = string([]byte{ 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xde, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x12, 0x61, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x12, 0x26, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x31, 0x2e, - 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x26, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, - 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x83, 0x01, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x67, 0x0a, 0x10, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x12, 0x28, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, - 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x77, 0x0a, 0x15, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5e, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, - 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x65, - 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, - 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x9c, 0x01, 0x0a, 0x15, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x47, 0x65, 0x74, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x82, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, + 0x38, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, + 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x65, 0x74, 0x74, 0x65, 0x72, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x63, 0x31, 0x2e, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x47, 0x65, 0x74, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xde, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x61, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x12, 0x26, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x31, 0x2e, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x61, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x12, 0x26, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x63, + 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x81, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x67, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x56, 0x32, 0x12, 0x28, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x56, 0x32, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, + 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, + 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x56, + 0x32, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x83, 0x01, 0x0a, 0x18, 0x43, 0x72, + 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x67, 0x0a, 0x10, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, + 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x12, 0x28, 0x2e, 0x63, 0x31, 0x2e, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x6f, 0x74, + 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, + 0x77, 0x0a, 0x15, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5e, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x2e, 0x63, 0x31, 0x2e, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x26, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, + 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, + 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, }) var ( @@ -2327,7 +2581,7 @@ func file_c1_connector_v2_resource_proto_rawDescGZIP() []byte { } var file_c1_connector_v2_resource_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_c1_connector_v2_resource_proto_msgTypes = make([]protoimpl.MessageInfo, 28) +var file_c1_connector_v2_resource_proto_msgTypes = make([]protoimpl.MessageInfo, 32) var file_c1_connector_v2_resource_proto_goTypes = []any{ (ResourceType_Trait)(0), // 0: c1.connector.v2.ResourceType.Trait (Resource_CreationSource)(0), // 1: c1.connector.v2.Resource.CreationSource @@ -2338,90 +2592,105 @@ var file_c1_connector_v2_resource_proto_goTypes = []any{ (*CreateResourceResponse)(nil), // 6: c1.connector.v2.CreateResourceResponse (*DeleteResourceRequest)(nil), // 7: c1.connector.v2.DeleteResourceRequest (*DeleteResourceResponse)(nil), // 8: c1.connector.v2.DeleteResourceResponse - (*RotateCredentialRequest)(nil), // 9: c1.connector.v2.RotateCredentialRequest - (*RotateCredentialResponse)(nil), // 10: c1.connector.v2.RotateCredentialResponse - (*AccountInfo)(nil), // 11: c1.connector.v2.AccountInfo - (*CredentialOptions)(nil), // 12: c1.connector.v2.CredentialOptions - (*CreateAccountRequest)(nil), // 13: c1.connector.v2.CreateAccountRequest - (*CreateAccountResponse)(nil), // 14: c1.connector.v2.CreateAccountResponse - (*EncryptedData)(nil), // 15: c1.connector.v2.EncryptedData - (*PlaintextData)(nil), // 16: c1.connector.v2.PlaintextData - (*EncryptionConfig)(nil), // 17: c1.connector.v2.EncryptionConfig - (*ResourceId)(nil), // 18: c1.connector.v2.ResourceId - (*Resource)(nil), // 19: c1.connector.v2.Resource - (*ResourcesServiceListResourcesRequest)(nil), // 20: c1.connector.v2.ResourcesServiceListResourcesRequest - (*ResourcesServiceListResourcesResponse)(nil), // 21: c1.connector.v2.ResourcesServiceListResourcesResponse - (*ExternalId)(nil), // 22: c1.connector.v2.ExternalId - (*AccountInfo_Email)(nil), // 23: c1.connector.v2.AccountInfo.Email - (*CredentialOptions_RandomPassword)(nil), // 24: c1.connector.v2.CredentialOptions.RandomPassword - (*CredentialOptions_NoPassword)(nil), // 25: c1.connector.v2.CredentialOptions.NoPassword - (*CredentialOptions_SSO)(nil), // 26: c1.connector.v2.CredentialOptions.SSO - (*CreateAccountResponse_SuccessResult)(nil), // 27: c1.connector.v2.CreateAccountResponse.SuccessResult - (*CreateAccountResponse_ActionRequiredResult)(nil), // 28: c1.connector.v2.CreateAccountResponse.ActionRequiredResult - (*EncryptionConfig_JWKPublicKeyConfig)(nil), // 29: c1.connector.v2.EncryptionConfig.JWKPublicKeyConfig - (*anypb.Any)(nil), // 30: google.protobuf.Any - (*structpb.Struct)(nil), // 31: google.protobuf.Struct + (*DeleteResourceV2Request)(nil), // 9: c1.connector.v2.DeleteResourceV2Request + (*DeleteResourceV2Response)(nil), // 10: c1.connector.v2.DeleteResourceV2Response + (*RotateCredentialRequest)(nil), // 11: c1.connector.v2.RotateCredentialRequest + (*RotateCredentialResponse)(nil), // 12: c1.connector.v2.RotateCredentialResponse + (*AccountInfo)(nil), // 13: c1.connector.v2.AccountInfo + (*CredentialOptions)(nil), // 14: c1.connector.v2.CredentialOptions + (*CreateAccountRequest)(nil), // 15: c1.connector.v2.CreateAccountRequest + (*CreateAccountResponse)(nil), // 16: c1.connector.v2.CreateAccountResponse + (*EncryptedData)(nil), // 17: c1.connector.v2.EncryptedData + (*PlaintextData)(nil), // 18: c1.connector.v2.PlaintextData + (*EncryptionConfig)(nil), // 19: c1.connector.v2.EncryptionConfig + (*ResourceId)(nil), // 20: c1.connector.v2.ResourceId + (*Resource)(nil), // 21: c1.connector.v2.Resource + (*ResourcesServiceListResourcesRequest)(nil), // 22: c1.connector.v2.ResourcesServiceListResourcesRequest + (*ResourcesServiceListResourcesResponse)(nil), // 23: c1.connector.v2.ResourcesServiceListResourcesResponse + (*ResourceGetterServiceGetResourceRequest)(nil), // 24: c1.connector.v2.ResourceGetterServiceGetResourceRequest + (*ResourceGetterServiceGetResourceResponse)(nil), // 25: c1.connector.v2.ResourceGetterServiceGetResourceResponse + (*ExternalId)(nil), // 26: c1.connector.v2.ExternalId + (*AccountInfo_Email)(nil), // 27: c1.connector.v2.AccountInfo.Email + (*CredentialOptions_RandomPassword)(nil), // 28: c1.connector.v2.CredentialOptions.RandomPassword + (*CredentialOptions_NoPassword)(nil), // 29: c1.connector.v2.CredentialOptions.NoPassword + (*CredentialOptions_SSO)(nil), // 30: c1.connector.v2.CredentialOptions.SSO + (*CreateAccountResponse_SuccessResult)(nil), // 31: c1.connector.v2.CreateAccountResponse.SuccessResult + (*CreateAccountResponse_ActionRequiredResult)(nil), // 32: c1.connector.v2.CreateAccountResponse.ActionRequiredResult + (*EncryptionConfig_JWKPublicKeyConfig)(nil), // 33: c1.connector.v2.EncryptionConfig.JWKPublicKeyConfig + (*anypb.Any)(nil), // 34: google.protobuf.Any + (*structpb.Struct)(nil), // 35: google.protobuf.Struct } var file_c1_connector_v2_resource_proto_depIdxs = []int32{ 0, // 0: c1.connector.v2.ResourceType.traits:type_name -> c1.connector.v2.ResourceType.Trait - 30, // 1: c1.connector.v2.ResourceType.annotations:type_name -> google.protobuf.Any - 19, // 2: c1.connector.v2.ResourceTypesServiceListResourceTypesRequest.parent:type_name -> c1.connector.v2.Resource - 30, // 3: c1.connector.v2.ResourceTypesServiceListResourceTypesRequest.annotations:type_name -> google.protobuf.Any + 34, // 1: c1.connector.v2.ResourceType.annotations:type_name -> google.protobuf.Any + 21, // 2: c1.connector.v2.ResourceTypesServiceListResourceTypesRequest.parent:type_name -> c1.connector.v2.Resource + 34, // 3: c1.connector.v2.ResourceTypesServiceListResourceTypesRequest.annotations:type_name -> google.protobuf.Any 2, // 4: c1.connector.v2.ResourceTypesServiceListResourceTypesResponse.list:type_name -> c1.connector.v2.ResourceType - 30, // 5: c1.connector.v2.ResourceTypesServiceListResourceTypesResponse.annotations:type_name -> google.protobuf.Any - 19, // 6: c1.connector.v2.CreateResourceRequest.resource:type_name -> c1.connector.v2.Resource - 19, // 7: c1.connector.v2.CreateResourceResponse.created:type_name -> c1.connector.v2.Resource - 30, // 8: c1.connector.v2.CreateResourceResponse.annotations:type_name -> google.protobuf.Any - 18, // 9: c1.connector.v2.DeleteResourceRequest.resource_id:type_name -> c1.connector.v2.ResourceId - 30, // 10: c1.connector.v2.DeleteResourceResponse.annotations:type_name -> google.protobuf.Any - 18, // 11: c1.connector.v2.RotateCredentialRequest.resource_id:type_name -> c1.connector.v2.ResourceId - 12, // 12: c1.connector.v2.RotateCredentialRequest.credential_options:type_name -> c1.connector.v2.CredentialOptions - 17, // 13: c1.connector.v2.RotateCredentialRequest.encryption_configs:type_name -> c1.connector.v2.EncryptionConfig - 15, // 14: c1.connector.v2.RotateCredentialResponse.encrypted_data:type_name -> c1.connector.v2.EncryptedData - 18, // 15: c1.connector.v2.RotateCredentialResponse.resource_id:type_name -> c1.connector.v2.ResourceId - 30, // 16: c1.connector.v2.RotateCredentialResponse.annotations:type_name -> google.protobuf.Any - 23, // 17: c1.connector.v2.AccountInfo.emails:type_name -> c1.connector.v2.AccountInfo.Email - 31, // 18: c1.connector.v2.AccountInfo.profile:type_name -> google.protobuf.Struct - 24, // 19: c1.connector.v2.CredentialOptions.random_password:type_name -> c1.connector.v2.CredentialOptions.RandomPassword - 25, // 20: c1.connector.v2.CredentialOptions.no_password:type_name -> c1.connector.v2.CredentialOptions.NoPassword - 26, // 21: c1.connector.v2.CredentialOptions.sso:type_name -> c1.connector.v2.CredentialOptions.SSO - 11, // 22: c1.connector.v2.CreateAccountRequest.account_info:type_name -> c1.connector.v2.AccountInfo - 12, // 23: c1.connector.v2.CreateAccountRequest.credential_options:type_name -> c1.connector.v2.CredentialOptions - 17, // 24: c1.connector.v2.CreateAccountRequest.encryption_configs:type_name -> c1.connector.v2.EncryptionConfig - 27, // 25: c1.connector.v2.CreateAccountResponse.success:type_name -> c1.connector.v2.CreateAccountResponse.SuccessResult - 28, // 26: c1.connector.v2.CreateAccountResponse.action_required:type_name -> c1.connector.v2.CreateAccountResponse.ActionRequiredResult - 15, // 27: c1.connector.v2.CreateAccountResponse.encrypted_data:type_name -> c1.connector.v2.EncryptedData - 30, // 28: c1.connector.v2.CreateAccountResponse.annotations:type_name -> google.protobuf.Any - 19, // 29: c1.connector.v2.EncryptionConfig.principal:type_name -> c1.connector.v2.Resource - 29, // 30: c1.connector.v2.EncryptionConfig.jwk_public_key_config:type_name -> c1.connector.v2.EncryptionConfig.JWKPublicKeyConfig - 18, // 31: c1.connector.v2.Resource.id:type_name -> c1.connector.v2.ResourceId - 18, // 32: c1.connector.v2.Resource.parent_resource_id:type_name -> c1.connector.v2.ResourceId - 30, // 33: c1.connector.v2.Resource.annotations:type_name -> google.protobuf.Any - 22, // 34: c1.connector.v2.Resource.external_id:type_name -> c1.connector.v2.ExternalId - 1, // 35: c1.connector.v2.Resource.creation_source:type_name -> c1.connector.v2.Resource.CreationSource - 18, // 36: c1.connector.v2.ResourcesServiceListResourcesRequest.parent_resource_id:type_name -> c1.connector.v2.ResourceId - 30, // 37: c1.connector.v2.ResourcesServiceListResourcesRequest.annotations:type_name -> google.protobuf.Any - 19, // 38: c1.connector.v2.ResourcesServiceListResourcesResponse.list:type_name -> c1.connector.v2.Resource - 30, // 39: c1.connector.v2.ResourcesServiceListResourcesResponse.annotations:type_name -> google.protobuf.Any - 19, // 40: c1.connector.v2.CreateAccountResponse.SuccessResult.resource:type_name -> c1.connector.v2.Resource - 19, // 41: c1.connector.v2.CreateAccountResponse.ActionRequiredResult.resource:type_name -> c1.connector.v2.Resource - 3, // 42: c1.connector.v2.ResourceTypesService.ListResourceTypes:input_type -> c1.connector.v2.ResourceTypesServiceListResourceTypesRequest - 20, // 43: c1.connector.v2.ResourcesService.ListResources:input_type -> c1.connector.v2.ResourcesServiceListResourcesRequest - 5, // 44: c1.connector.v2.ResourceManagerService.CreateResource:input_type -> c1.connector.v2.CreateResourceRequest - 7, // 45: c1.connector.v2.ResourceManagerService.DeleteResource:input_type -> c1.connector.v2.DeleteResourceRequest - 9, // 46: c1.connector.v2.CredentialManagerService.RotateCredential:input_type -> c1.connector.v2.RotateCredentialRequest - 13, // 47: c1.connector.v2.AccountManagerService.CreateAccount:input_type -> c1.connector.v2.CreateAccountRequest - 4, // 48: c1.connector.v2.ResourceTypesService.ListResourceTypes:output_type -> c1.connector.v2.ResourceTypesServiceListResourceTypesResponse - 21, // 49: c1.connector.v2.ResourcesService.ListResources:output_type -> c1.connector.v2.ResourcesServiceListResourcesResponse - 6, // 50: c1.connector.v2.ResourceManagerService.CreateResource:output_type -> c1.connector.v2.CreateResourceResponse - 8, // 51: c1.connector.v2.ResourceManagerService.DeleteResource:output_type -> c1.connector.v2.DeleteResourceResponse - 10, // 52: c1.connector.v2.CredentialManagerService.RotateCredential:output_type -> c1.connector.v2.RotateCredentialResponse - 14, // 53: c1.connector.v2.AccountManagerService.CreateAccount:output_type -> c1.connector.v2.CreateAccountResponse - 48, // [48:54] is the sub-list for method output_type - 42, // [42:48] is the sub-list for method input_type - 42, // [42:42] is the sub-list for extension type_name - 42, // [42:42] is the sub-list for extension extendee - 0, // [0:42] is the sub-list for field type_name + 34, // 5: c1.connector.v2.ResourceTypesServiceListResourceTypesResponse.annotations:type_name -> google.protobuf.Any + 21, // 6: c1.connector.v2.CreateResourceRequest.resource:type_name -> c1.connector.v2.Resource + 21, // 7: c1.connector.v2.CreateResourceResponse.created:type_name -> c1.connector.v2.Resource + 34, // 8: c1.connector.v2.CreateResourceResponse.annotations:type_name -> google.protobuf.Any + 20, // 9: c1.connector.v2.DeleteResourceRequest.resource_id:type_name -> c1.connector.v2.ResourceId + 34, // 10: c1.connector.v2.DeleteResourceResponse.annotations:type_name -> google.protobuf.Any + 20, // 11: c1.connector.v2.DeleteResourceV2Request.resource_id:type_name -> c1.connector.v2.ResourceId + 34, // 12: c1.connector.v2.DeleteResourceV2Response.annotations:type_name -> google.protobuf.Any + 20, // 13: c1.connector.v2.RotateCredentialRequest.resource_id:type_name -> c1.connector.v2.ResourceId + 14, // 14: c1.connector.v2.RotateCredentialRequest.credential_options:type_name -> c1.connector.v2.CredentialOptions + 19, // 15: c1.connector.v2.RotateCredentialRequest.encryption_configs:type_name -> c1.connector.v2.EncryptionConfig + 17, // 16: c1.connector.v2.RotateCredentialResponse.encrypted_data:type_name -> c1.connector.v2.EncryptedData + 20, // 17: c1.connector.v2.RotateCredentialResponse.resource_id:type_name -> c1.connector.v2.ResourceId + 34, // 18: c1.connector.v2.RotateCredentialResponse.annotations:type_name -> google.protobuf.Any + 27, // 19: c1.connector.v2.AccountInfo.emails:type_name -> c1.connector.v2.AccountInfo.Email + 35, // 20: c1.connector.v2.AccountInfo.profile:type_name -> google.protobuf.Struct + 28, // 21: c1.connector.v2.CredentialOptions.random_password:type_name -> c1.connector.v2.CredentialOptions.RandomPassword + 29, // 22: c1.connector.v2.CredentialOptions.no_password:type_name -> c1.connector.v2.CredentialOptions.NoPassword + 30, // 23: c1.connector.v2.CredentialOptions.sso:type_name -> c1.connector.v2.CredentialOptions.SSO + 13, // 24: c1.connector.v2.CreateAccountRequest.account_info:type_name -> c1.connector.v2.AccountInfo + 14, // 25: c1.connector.v2.CreateAccountRequest.credential_options:type_name -> c1.connector.v2.CredentialOptions + 19, // 26: c1.connector.v2.CreateAccountRequest.encryption_configs:type_name -> c1.connector.v2.EncryptionConfig + 31, // 27: c1.connector.v2.CreateAccountResponse.success:type_name -> c1.connector.v2.CreateAccountResponse.SuccessResult + 32, // 28: c1.connector.v2.CreateAccountResponse.action_required:type_name -> c1.connector.v2.CreateAccountResponse.ActionRequiredResult + 17, // 29: c1.connector.v2.CreateAccountResponse.encrypted_data:type_name -> c1.connector.v2.EncryptedData + 34, // 30: c1.connector.v2.CreateAccountResponse.annotations:type_name -> google.protobuf.Any + 21, // 31: c1.connector.v2.EncryptionConfig.principal:type_name -> c1.connector.v2.Resource + 33, // 32: c1.connector.v2.EncryptionConfig.jwk_public_key_config:type_name -> c1.connector.v2.EncryptionConfig.JWKPublicKeyConfig + 20, // 33: c1.connector.v2.Resource.id:type_name -> c1.connector.v2.ResourceId + 20, // 34: c1.connector.v2.Resource.parent_resource_id:type_name -> c1.connector.v2.ResourceId + 34, // 35: c1.connector.v2.Resource.annotations:type_name -> google.protobuf.Any + 26, // 36: c1.connector.v2.Resource.external_id:type_name -> c1.connector.v2.ExternalId + 1, // 37: c1.connector.v2.Resource.creation_source:type_name -> c1.connector.v2.Resource.CreationSource + 20, // 38: c1.connector.v2.ResourcesServiceListResourcesRequest.parent_resource_id:type_name -> c1.connector.v2.ResourceId + 34, // 39: c1.connector.v2.ResourcesServiceListResourcesRequest.annotations:type_name -> google.protobuf.Any + 21, // 40: c1.connector.v2.ResourcesServiceListResourcesResponse.list:type_name -> c1.connector.v2.Resource + 34, // 41: c1.connector.v2.ResourcesServiceListResourcesResponse.annotations:type_name -> google.protobuf.Any + 20, // 42: c1.connector.v2.ResourceGetterServiceGetResourceRequest.resource_id:type_name -> c1.connector.v2.ResourceId + 20, // 43: c1.connector.v2.ResourceGetterServiceGetResourceRequest.parent_resource_id:type_name -> c1.connector.v2.ResourceId + 34, // 44: c1.connector.v2.ResourceGetterServiceGetResourceRequest.annotations:type_name -> google.protobuf.Any + 21, // 45: c1.connector.v2.ResourceGetterServiceGetResourceResponse.resource:type_name -> c1.connector.v2.Resource + 34, // 46: c1.connector.v2.ResourceGetterServiceGetResourceResponse.annotations:type_name -> google.protobuf.Any + 21, // 47: c1.connector.v2.CreateAccountResponse.SuccessResult.resource:type_name -> c1.connector.v2.Resource + 21, // 48: c1.connector.v2.CreateAccountResponse.ActionRequiredResult.resource:type_name -> c1.connector.v2.Resource + 3, // 49: c1.connector.v2.ResourceTypesService.ListResourceTypes:input_type -> c1.connector.v2.ResourceTypesServiceListResourceTypesRequest + 22, // 50: c1.connector.v2.ResourcesService.ListResources:input_type -> c1.connector.v2.ResourcesServiceListResourcesRequest + 24, // 51: c1.connector.v2.ResourceGetterService.GetResource:input_type -> c1.connector.v2.ResourceGetterServiceGetResourceRequest + 5, // 52: c1.connector.v2.ResourceManagerService.CreateResource:input_type -> c1.connector.v2.CreateResourceRequest + 7, // 53: c1.connector.v2.ResourceManagerService.DeleteResource:input_type -> c1.connector.v2.DeleteResourceRequest + 9, // 54: c1.connector.v2.ResourceDeleterService.DeleteResourceV2:input_type -> c1.connector.v2.DeleteResourceV2Request + 11, // 55: c1.connector.v2.CredentialManagerService.RotateCredential:input_type -> c1.connector.v2.RotateCredentialRequest + 15, // 56: c1.connector.v2.AccountManagerService.CreateAccount:input_type -> c1.connector.v2.CreateAccountRequest + 4, // 57: c1.connector.v2.ResourceTypesService.ListResourceTypes:output_type -> c1.connector.v2.ResourceTypesServiceListResourceTypesResponse + 23, // 58: c1.connector.v2.ResourcesService.ListResources:output_type -> c1.connector.v2.ResourcesServiceListResourcesResponse + 25, // 59: c1.connector.v2.ResourceGetterService.GetResource:output_type -> c1.connector.v2.ResourceGetterServiceGetResourceResponse + 6, // 60: c1.connector.v2.ResourceManagerService.CreateResource:output_type -> c1.connector.v2.CreateResourceResponse + 8, // 61: c1.connector.v2.ResourceManagerService.DeleteResource:output_type -> c1.connector.v2.DeleteResourceResponse + 10, // 62: c1.connector.v2.ResourceDeleterService.DeleteResourceV2:output_type -> c1.connector.v2.DeleteResourceV2Response + 12, // 63: c1.connector.v2.CredentialManagerService.RotateCredential:output_type -> c1.connector.v2.RotateCredentialResponse + 16, // 64: c1.connector.v2.AccountManagerService.CreateAccount:output_type -> c1.connector.v2.CreateAccountResponse + 57, // [57:65] is the sub-list for method output_type + 49, // [49:57] is the sub-list for method input_type + 49, // [49:49] is the sub-list for extension type_name + 49, // [49:49] is the sub-list for extension extendee + 0, // [0:49] is the sub-list for field type_name } func init() { file_c1_connector_v2_resource_proto_init() } @@ -2429,16 +2698,16 @@ func file_c1_connector_v2_resource_proto_init() { if File_c1_connector_v2_resource_proto != nil { return } - file_c1_connector_v2_resource_proto_msgTypes[10].OneofWrappers = []any{ + file_c1_connector_v2_resource_proto_msgTypes[12].OneofWrappers = []any{ (*CredentialOptions_RandomPassword_)(nil), (*CredentialOptions_NoPassword_)(nil), (*CredentialOptions_Sso)(nil), } - file_c1_connector_v2_resource_proto_msgTypes[12].OneofWrappers = []any{ + file_c1_connector_v2_resource_proto_msgTypes[14].OneofWrappers = []any{ (*CreateAccountResponse_Success)(nil), (*CreateAccountResponse_ActionRequired)(nil), } - file_c1_connector_v2_resource_proto_msgTypes[15].OneofWrappers = []any{ + file_c1_connector_v2_resource_proto_msgTypes[17].OneofWrappers = []any{ (*EncryptionConfig_JwkPublicKeyConfig)(nil), } type x struct{} @@ -2447,9 +2716,9 @@ func file_c1_connector_v2_resource_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_connector_v2_resource_proto_rawDesc), len(file_c1_connector_v2_resource_proto_rawDesc)), NumEnums: 2, - NumMessages: 28, + NumMessages: 32, NumExtensions: 0, - NumServices: 5, + NumServices: 7, }, GoTypes: file_c1_connector_v2_resource_proto_goTypes, DependencyIndexes: file_c1_connector_v2_resource_proto_depIdxs, diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.validate.go index 3afa61fe..2e0d07a6 100644 --- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.validate.go +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource.pb.validate.go @@ -1197,6 +1197,273 @@ var _ interface { ErrorName() string } = DeleteResourceResponseValidationError{} +// Validate checks the field values on DeleteResourceV2Request with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *DeleteResourceV2Request) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DeleteResourceV2Request with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// DeleteResourceV2RequestMultiError, or nil if none found. +func (m *DeleteResourceV2Request) ValidateAll() error { + return m.validate(true) +} + +func (m *DeleteResourceV2Request) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetResourceId()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DeleteResourceV2RequestValidationError{ + field: "ResourceId", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DeleteResourceV2RequestValidationError{ + field: "ResourceId", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResourceId()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DeleteResourceV2RequestValidationError{ + field: "ResourceId", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return DeleteResourceV2RequestMultiError(errors) + } + + return nil +} + +// DeleteResourceV2RequestMultiError is an error wrapping multiple validation +// errors returned by DeleteResourceV2Request.ValidateAll() if the designated +// constraints aren't met. +type DeleteResourceV2RequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DeleteResourceV2RequestMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DeleteResourceV2RequestMultiError) AllErrors() []error { return m } + +// DeleteResourceV2RequestValidationError is the validation error returned by +// DeleteResourceV2Request.Validate if the designated constraints aren't met. +type DeleteResourceV2RequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DeleteResourceV2RequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DeleteResourceV2RequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DeleteResourceV2RequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DeleteResourceV2RequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DeleteResourceV2RequestValidationError) ErrorName() string { + return "DeleteResourceV2RequestValidationError" +} + +// Error satisfies the builtin error interface +func (e DeleteResourceV2RequestValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sDeleteResourceV2Request.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DeleteResourceV2RequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DeleteResourceV2RequestValidationError{} + +// Validate checks the field values on DeleteResourceV2Response with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *DeleteResourceV2Response) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DeleteResourceV2Response with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// DeleteResourceV2ResponseMultiError, or nil if none found. +func (m *DeleteResourceV2Response) ValidateAll() error { + return m.validate(true) +} + +func (m *DeleteResourceV2Response) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetAnnotations() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DeleteResourceV2ResponseValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DeleteResourceV2ResponseValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DeleteResourceV2ResponseValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return DeleteResourceV2ResponseMultiError(errors) + } + + return nil +} + +// DeleteResourceV2ResponseMultiError is an error wrapping multiple validation +// errors returned by DeleteResourceV2Response.ValidateAll() if the designated +// constraints aren't met. +type DeleteResourceV2ResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DeleteResourceV2ResponseMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DeleteResourceV2ResponseMultiError) AllErrors() []error { return m } + +// DeleteResourceV2ResponseValidationError is the validation error returned by +// DeleteResourceV2Response.Validate if the designated constraints aren't met. +type DeleteResourceV2ResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DeleteResourceV2ResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DeleteResourceV2ResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DeleteResourceV2ResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DeleteResourceV2ResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DeleteResourceV2ResponseValidationError) ErrorName() string { + return "DeleteResourceV2ResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e DeleteResourceV2ResponseValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sDeleteResourceV2Response.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DeleteResourceV2ResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DeleteResourceV2ResponseValidationError{} + // Validate checks the field values on RotateCredentialRequest with the rules // defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. @@ -3608,6 +3875,373 @@ var _ interface { ErrorName() string } = ResourcesServiceListResourcesResponseValidationError{} +// Validate checks the field values on ResourceGetterServiceGetResourceRequest +// with the rules defined in the proto definition for this message. If any +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. +func (m *ResourceGetterServiceGetResourceRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// ResourceGetterServiceGetResourceRequest with the rules defined in the proto +// definition for this message. If any rules are violated, the result is a +// list of violation errors wrapped in +// ResourceGetterServiceGetResourceRequestMultiError, or nil if none found. +func (m *ResourceGetterServiceGetResourceRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *ResourceGetterServiceGetResourceRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetResourceId()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ResourceGetterServiceGetResourceRequestValidationError{ + field: "ResourceId", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ResourceGetterServiceGetResourceRequestValidationError{ + field: "ResourceId", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResourceId()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ResourceGetterServiceGetResourceRequestValidationError{ + field: "ResourceId", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetParentResourceId()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ResourceGetterServiceGetResourceRequestValidationError{ + field: "ParentResourceId", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ResourceGetterServiceGetResourceRequestValidationError{ + field: "ParentResourceId", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetParentResourceId()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ResourceGetterServiceGetResourceRequestValidationError{ + field: "ParentResourceId", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for idx, item := range m.GetAnnotations() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ResourceGetterServiceGetResourceRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ResourceGetterServiceGetResourceRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ResourceGetterServiceGetResourceRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return ResourceGetterServiceGetResourceRequestMultiError(errors) + } + + return nil +} + +// ResourceGetterServiceGetResourceRequestMultiError is an error wrapping +// multiple validation errors returned by +// ResourceGetterServiceGetResourceRequest.ValidateAll() if the designated +// constraints aren't met. +type ResourceGetterServiceGetResourceRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ResourceGetterServiceGetResourceRequestMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ResourceGetterServiceGetResourceRequestMultiError) AllErrors() []error { return m } + +// ResourceGetterServiceGetResourceRequestValidationError is the validation +// error returned by ResourceGetterServiceGetResourceRequest.Validate if the +// designated constraints aren't met. +type ResourceGetterServiceGetResourceRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ResourceGetterServiceGetResourceRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ResourceGetterServiceGetResourceRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ResourceGetterServiceGetResourceRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ResourceGetterServiceGetResourceRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ResourceGetterServiceGetResourceRequestValidationError) ErrorName() string { + return "ResourceGetterServiceGetResourceRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e ResourceGetterServiceGetResourceRequestValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sResourceGetterServiceGetResourceRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ResourceGetterServiceGetResourceRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ResourceGetterServiceGetResourceRequestValidationError{} + +// Validate checks the field values on ResourceGetterServiceGetResourceResponse +// with the rules defined in the proto definition for this message. If any +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. +func (m *ResourceGetterServiceGetResourceResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// ResourceGetterServiceGetResourceResponse with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in +// ResourceGetterServiceGetResourceResponseMultiError, or nil if none found. +func (m *ResourceGetterServiceGetResourceResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *ResourceGetterServiceGetResourceResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetResource()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ResourceGetterServiceGetResourceResponseValidationError{ + field: "Resource", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ResourceGetterServiceGetResourceResponseValidationError{ + field: "Resource", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResource()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ResourceGetterServiceGetResourceResponseValidationError{ + field: "Resource", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for idx, item := range m.GetAnnotations() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ResourceGetterServiceGetResourceResponseValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ResourceGetterServiceGetResourceResponseValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ResourceGetterServiceGetResourceResponseValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return ResourceGetterServiceGetResourceResponseMultiError(errors) + } + + return nil +} + +// ResourceGetterServiceGetResourceResponseMultiError is an error wrapping +// multiple validation errors returned by +// ResourceGetterServiceGetResourceResponse.ValidateAll() if the designated +// constraints aren't met. +type ResourceGetterServiceGetResourceResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ResourceGetterServiceGetResourceResponseMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ResourceGetterServiceGetResourceResponseMultiError) AllErrors() []error { return m } + +// ResourceGetterServiceGetResourceResponseValidationError is the validation +// error returned by ResourceGetterServiceGetResourceResponse.Validate if the +// designated constraints aren't met. +type ResourceGetterServiceGetResourceResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ResourceGetterServiceGetResourceResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ResourceGetterServiceGetResourceResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ResourceGetterServiceGetResourceResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ResourceGetterServiceGetResourceResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ResourceGetterServiceGetResourceResponseValidationError) ErrorName() string { + return "ResourceGetterServiceGetResourceResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e ResourceGetterServiceGetResourceResponseValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sResourceGetterServiceGetResourceResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ResourceGetterServiceGetResourceResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ResourceGetterServiceGetResourceResponseValidationError{} + // Validate checks the field values on ExternalId with the rules defined in the // proto definition for this message. If any rules are violated, the first // error encountered is returned, or nil if there are no violations. diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource_grpc.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource_grpc.pb.go index bbef59e8..c1fe9d71 100644 --- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource_grpc.pb.go +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/resource_grpc.pb.go @@ -218,6 +218,106 @@ var ResourcesService_ServiceDesc = grpc.ServiceDesc{ Metadata: "c1/connector/v2/resource.proto", } +const ( + ResourceGetterService_GetResource_FullMethodName = "/c1.connector.v2.ResourceGetterService/GetResource" +) + +// ResourceGetterServiceClient is the client API for ResourceGetterService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type ResourceGetterServiceClient interface { + GetResource(ctx context.Context, in *ResourceGetterServiceGetResourceRequest, opts ...grpc.CallOption) (*ResourceGetterServiceGetResourceResponse, error) +} + +type resourceGetterServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewResourceGetterServiceClient(cc grpc.ClientConnInterface) ResourceGetterServiceClient { + return &resourceGetterServiceClient{cc} +} + +func (c *resourceGetterServiceClient) GetResource(ctx context.Context, in *ResourceGetterServiceGetResourceRequest, opts ...grpc.CallOption) (*ResourceGetterServiceGetResourceResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ResourceGetterServiceGetResourceResponse) + err := c.cc.Invoke(ctx, ResourceGetterService_GetResource_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ResourceGetterServiceServer is the server API for ResourceGetterService service. +// All implementations should embed UnimplementedResourceGetterServiceServer +// for forward compatibility. +type ResourceGetterServiceServer interface { + GetResource(context.Context, *ResourceGetterServiceGetResourceRequest) (*ResourceGetterServiceGetResourceResponse, error) +} + +// UnimplementedResourceGetterServiceServer should be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedResourceGetterServiceServer struct{} + +func (UnimplementedResourceGetterServiceServer) GetResource(context.Context, *ResourceGetterServiceGetResourceRequest) (*ResourceGetterServiceGetResourceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetResource not implemented") +} +func (UnimplementedResourceGetterServiceServer) testEmbeddedByValue() {} + +// UnsafeResourceGetterServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ResourceGetterServiceServer will +// result in compilation errors. +type UnsafeResourceGetterServiceServer interface { + mustEmbedUnimplementedResourceGetterServiceServer() +} + +func RegisterResourceGetterServiceServer(s grpc.ServiceRegistrar, srv ResourceGetterServiceServer) { + // If the following call pancis, it indicates UnimplementedResourceGetterServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&ResourceGetterService_ServiceDesc, srv) +} + +func _ResourceGetterService_GetResource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ResourceGetterServiceGetResourceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ResourceGetterServiceServer).GetResource(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ResourceGetterService_GetResource_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ResourceGetterServiceServer).GetResource(ctx, req.(*ResourceGetterServiceGetResourceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ResourceGetterService_ServiceDesc is the grpc.ServiceDesc for ResourceGetterService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ResourceGetterService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "c1.connector.v2.ResourceGetterService", + HandlerType: (*ResourceGetterServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetResource", + Handler: _ResourceGetterService_GetResource_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "c1/connector/v2/resource.proto", +} + const ( ResourceManagerService_CreateResource_FullMethodName = "/c1.connector.v2.ResourceManagerService/CreateResource" ResourceManagerService_DeleteResource_FullMethodName = "/c1.connector.v2.ResourceManagerService/DeleteResource" @@ -356,6 +456,106 @@ var ResourceManagerService_ServiceDesc = grpc.ServiceDesc{ Metadata: "c1/connector/v2/resource.proto", } +const ( + ResourceDeleterService_DeleteResourceV2_FullMethodName = "/c1.connector.v2.ResourceDeleterService/DeleteResourceV2" +) + +// ResourceDeleterServiceClient is the client API for ResourceDeleterService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type ResourceDeleterServiceClient interface { + DeleteResourceV2(ctx context.Context, in *DeleteResourceV2Request, opts ...grpc.CallOption) (*DeleteResourceV2Response, error) +} + +type resourceDeleterServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewResourceDeleterServiceClient(cc grpc.ClientConnInterface) ResourceDeleterServiceClient { + return &resourceDeleterServiceClient{cc} +} + +func (c *resourceDeleterServiceClient) DeleteResourceV2(ctx context.Context, in *DeleteResourceV2Request, opts ...grpc.CallOption) (*DeleteResourceV2Response, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DeleteResourceV2Response) + err := c.cc.Invoke(ctx, ResourceDeleterService_DeleteResourceV2_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ResourceDeleterServiceServer is the server API for ResourceDeleterService service. +// All implementations should embed UnimplementedResourceDeleterServiceServer +// for forward compatibility. +type ResourceDeleterServiceServer interface { + DeleteResourceV2(context.Context, *DeleteResourceV2Request) (*DeleteResourceV2Response, error) +} + +// UnimplementedResourceDeleterServiceServer should be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedResourceDeleterServiceServer struct{} + +func (UnimplementedResourceDeleterServiceServer) DeleteResourceV2(context.Context, *DeleteResourceV2Request) (*DeleteResourceV2Response, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteResourceV2 not implemented") +} +func (UnimplementedResourceDeleterServiceServer) testEmbeddedByValue() {} + +// UnsafeResourceDeleterServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ResourceDeleterServiceServer will +// result in compilation errors. +type UnsafeResourceDeleterServiceServer interface { + mustEmbedUnimplementedResourceDeleterServiceServer() +} + +func RegisterResourceDeleterServiceServer(s grpc.ServiceRegistrar, srv ResourceDeleterServiceServer) { + // If the following call pancis, it indicates UnimplementedResourceDeleterServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&ResourceDeleterService_ServiceDesc, srv) +} + +func _ResourceDeleterService_DeleteResourceV2_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteResourceV2Request) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ResourceDeleterServiceServer).DeleteResourceV2(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ResourceDeleterService_DeleteResourceV2_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ResourceDeleterServiceServer).DeleteResourceV2(ctx, req.(*DeleteResourceV2Request)) + } + return interceptor(ctx, in, info, handler) +} + +// ResourceDeleterService_ServiceDesc is the grpc.ServiceDesc for ResourceDeleterService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ResourceDeleterService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "c1.connector.v2.ResourceDeleterService", + HandlerType: (*ResourceDeleterServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "DeleteResourceV2", + Handler: _ResourceDeleterService_DeleteResourceV2_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "c1/connector/v2/resource.proto", +} + const ( CredentialManagerService_RotateCredential_FullMethodName = "/c1.connector.v2.CredentialManagerService/RotateCredential" ) diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1/baton.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1/baton.pb.go index b9404b74..cc49f178 100644 --- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1/baton.pb.go +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1/baton.pb.go @@ -14,6 +14,7 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" anypb "google.golang.org/protobuf/types/known/anypb" durationpb "google.golang.org/protobuf/types/known/durationpb" + structpb "google.golang.org/protobuf/types/known/structpb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" reflect "reflect" sync "sync" @@ -103,6 +104,12 @@ type Task struct { // *Task_GetTicket // *Task_BulkCreateTickets // *Task_BulkGetTickets + // *Task_ActionListSchemas + // *Task_ActionGetSchema + // *Task_ActionInvoke + // *Task_ActionStatus + // *Task_CreateSyncDiff + // *Task_CompactSyncs_ TaskType isTask_TaskType `protobuf_oneof:"task_type"` Debug bool `protobuf:"varint,3,opt,name=debug,proto3" json:"debug,omitempty"` unknownFields protoimpl.UnknownFields @@ -295,6 +302,60 @@ func (x *Task) GetBulkGetTickets() *Task_BulkGetTicketsTask { return nil } +func (x *Task) GetActionListSchemas() *Task_ActionListSchemasTask { + if x != nil { + if x, ok := x.TaskType.(*Task_ActionListSchemas); ok { + return x.ActionListSchemas + } + } + return nil +} + +func (x *Task) GetActionGetSchema() *Task_ActionGetSchemaTask { + if x != nil { + if x, ok := x.TaskType.(*Task_ActionGetSchema); ok { + return x.ActionGetSchema + } + } + return nil +} + +func (x *Task) GetActionInvoke() *Task_ActionInvokeTask { + if x != nil { + if x, ok := x.TaskType.(*Task_ActionInvoke); ok { + return x.ActionInvoke + } + } + return nil +} + +func (x *Task) GetActionStatus() *Task_ActionStatusTask { + if x != nil { + if x, ok := x.TaskType.(*Task_ActionStatus); ok { + return x.ActionStatus + } + } + return nil +} + +func (x *Task) GetCreateSyncDiff() *Task_CreateSyncDiffTask { + if x != nil { + if x, ok := x.TaskType.(*Task_CreateSyncDiff); ok { + return x.CreateSyncDiff + } + } + return nil +} + +func (x *Task) GetCompactSyncs() *Task_CompactSyncs { + if x != nil { + if x, ok := x.TaskType.(*Task_CompactSyncs_); ok { + return x.CompactSyncs + } + } + return nil +} + func (x *Task) GetDebug() bool { if x != nil { return x.Debug @@ -366,6 +427,30 @@ type Task_BulkGetTickets struct { BulkGetTickets *Task_BulkGetTicketsTask `protobuf:"bytes,114,opt,name=bulk_get_tickets,json=bulkGetTickets,proto3,oneof"` } +type Task_ActionListSchemas struct { + ActionListSchemas *Task_ActionListSchemasTask `protobuf:"bytes,115,opt,name=action_list_schemas,json=actionListSchemas,proto3,oneof"` +} + +type Task_ActionGetSchema struct { + ActionGetSchema *Task_ActionGetSchemaTask `protobuf:"bytes,116,opt,name=action_get_schema,json=actionGetSchema,proto3,oneof"` +} + +type Task_ActionInvoke struct { + ActionInvoke *Task_ActionInvokeTask `protobuf:"bytes,117,opt,name=action_invoke,json=actionInvoke,proto3,oneof"` +} + +type Task_ActionStatus struct { + ActionStatus *Task_ActionStatusTask `protobuf:"bytes,118,opt,name=action_status,json=actionStatus,proto3,oneof"` +} + +type Task_CreateSyncDiff struct { + CreateSyncDiff *Task_CreateSyncDiffTask `protobuf:"bytes,119,opt,name=create_sync_diff,json=createSyncDiff,proto3,oneof"` +} + +type Task_CompactSyncs_ struct { + CompactSyncs *Task_CompactSyncs `protobuf:"bytes,120,opt,name=compact_syncs,json=compactSyncs,proto3,oneof"` +} + func (*Task_None) isTask_TaskType() {} func (*Task_Hello) isTask_TaskType() {} @@ -396,6 +481,18 @@ func (*Task_BulkCreateTickets) isTask_TaskType() {} func (*Task_BulkGetTickets) isTask_TaskType() {} +func (*Task_ActionListSchemas) isTask_TaskType() {} + +func (*Task_ActionGetSchema) isTask_TaskType() {} + +func (*Task_ActionInvoke) isTask_TaskType() {} + +func (*Task_ActionStatus) isTask_TaskType() {} + +func (*Task_CreateSyncDiff) isTask_TaskType() {} + +func (*Task_CompactSyncs_) isTask_TaskType() {} + type BatonServiceHelloRequest struct { state protoimpl.MessageState `protogen:"open.v1"` HostId string `protobuf:"bytes,1,opt,name=host_id,json=hostId,proto3" json:"host_id,omitempty"` @@ -1885,6 +1982,387 @@ func (x *Task_GetTicketTask) GetAnnotations() []*anypb.Any { return nil } +type Task_ActionListSchemasTask struct { + state protoimpl.MessageState `protogen:"open.v1"` + Annotations []*anypb.Any `protobuf:"bytes,1,rep,name=annotations,proto3" json:"annotations,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Task_ActionListSchemasTask) Reset() { + *x = Task_ActionListSchemasTask{} + mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Task_ActionListSchemasTask) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Task_ActionListSchemasTask) ProtoMessage() {} + +func (x *Task_ActionListSchemasTask) ProtoReflect() protoreflect.Message { + mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[28] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Task_ActionListSchemasTask.ProtoReflect.Descriptor instead. +func (*Task_ActionListSchemasTask) Descriptor() ([]byte, []int) { + return file_c1_connectorapi_baton_v1_baton_proto_rawDescGZIP(), []int{0, 15} +} + +func (x *Task_ActionListSchemasTask) GetAnnotations() []*anypb.Any { + if x != nil { + return x.Annotations + } + return nil +} + +type Task_ActionGetSchemaTask struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Task_ActionGetSchemaTask) Reset() { + *x = Task_ActionGetSchemaTask{} + mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Task_ActionGetSchemaTask) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Task_ActionGetSchemaTask) ProtoMessage() {} + +func (x *Task_ActionGetSchemaTask) ProtoReflect() protoreflect.Message { + mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[29] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Task_ActionGetSchemaTask.ProtoReflect.Descriptor instead. +func (*Task_ActionGetSchemaTask) Descriptor() ([]byte, []int) { + return file_c1_connectorapi_baton_v1_baton_proto_rawDescGZIP(), []int{0, 16} +} + +func (x *Task_ActionGetSchemaTask) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Task_ActionGetSchemaTask) GetAnnotations() []*anypb.Any { + if x != nil { + return x.Annotations + } + return nil +} + +type Task_ActionInvokeTask struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Args *structpb.Struct `protobuf:"bytes,2,opt,name=args,proto3" json:"args,omitempty"` + Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Task_ActionInvokeTask) Reset() { + *x = Task_ActionInvokeTask{} + mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Task_ActionInvokeTask) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Task_ActionInvokeTask) ProtoMessage() {} + +func (x *Task_ActionInvokeTask) ProtoReflect() protoreflect.Message { + mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[30] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Task_ActionInvokeTask.ProtoReflect.Descriptor instead. +func (*Task_ActionInvokeTask) Descriptor() ([]byte, []int) { + return file_c1_connectorapi_baton_v1_baton_proto_rawDescGZIP(), []int{0, 17} +} + +func (x *Task_ActionInvokeTask) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Task_ActionInvokeTask) GetArgs() *structpb.Struct { + if x != nil { + return x.Args + } + return nil +} + +func (x *Task_ActionInvokeTask) GetAnnotations() []*anypb.Any { + if x != nil { + return x.Annotations + } + return nil +} + +type Task_ActionStatusTask struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Task_ActionStatusTask) Reset() { + *x = Task_ActionStatusTask{} + mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Task_ActionStatusTask) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Task_ActionStatusTask) ProtoMessage() {} + +func (x *Task_ActionStatusTask) ProtoReflect() protoreflect.Message { + mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[31] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Task_ActionStatusTask.ProtoReflect.Descriptor instead. +func (*Task_ActionStatusTask) Descriptor() ([]byte, []int) { + return file_c1_connectorapi_baton_v1_baton_proto_rawDescGZIP(), []int{0, 18} +} + +func (x *Task_ActionStatusTask) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Task_ActionStatusTask) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Task_ActionStatusTask) GetAnnotations() []*anypb.Any { + if x != nil { + return x.Annotations + } + return nil +} + +type Task_CreateSyncDiffTask struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Open to suggestions here + BaseSyncId string `protobuf:"bytes,1,opt,name=base_sync_id,json=baseSyncId,proto3" json:"base_sync_id,omitempty"` + NewSyncId string `protobuf:"bytes,2,opt,name=new_sync_id,json=newSyncId,proto3" json:"new_sync_id,omitempty"` + Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Task_CreateSyncDiffTask) Reset() { + *x = Task_CreateSyncDiffTask{} + mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Task_CreateSyncDiffTask) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Task_CreateSyncDiffTask) ProtoMessage() {} + +func (x *Task_CreateSyncDiffTask) ProtoReflect() protoreflect.Message { + mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[32] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Task_CreateSyncDiffTask.ProtoReflect.Descriptor instead. +func (*Task_CreateSyncDiffTask) Descriptor() ([]byte, []int) { + return file_c1_connectorapi_baton_v1_baton_proto_rawDescGZIP(), []int{0, 19} +} + +func (x *Task_CreateSyncDiffTask) GetBaseSyncId() string { + if x != nil { + return x.BaseSyncId + } + return "" +} + +func (x *Task_CreateSyncDiffTask) GetNewSyncId() string { + if x != nil { + return x.NewSyncId + } + return "" +} + +func (x *Task_CreateSyncDiffTask) GetAnnotations() []*anypb.Any { + if x != nil { + return x.Annotations + } + return nil +} + +type Task_CompactSyncs struct { + state protoimpl.MessageState `protogen:"open.v1"` + CompactableSyncs []*Task_CompactSyncs_CompactableSync `protobuf:"bytes,1,rep,name=compactable_syncs,json=compactableSyncs,proto3" json:"compactable_syncs,omitempty"` + Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Task_CompactSyncs) Reset() { + *x = Task_CompactSyncs{} + mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Task_CompactSyncs) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Task_CompactSyncs) ProtoMessage() {} + +func (x *Task_CompactSyncs) ProtoReflect() protoreflect.Message { + mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[33] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Task_CompactSyncs.ProtoReflect.Descriptor instead. +func (*Task_CompactSyncs) Descriptor() ([]byte, []int) { + return file_c1_connectorapi_baton_v1_baton_proto_rawDescGZIP(), []int{0, 20} +} + +func (x *Task_CompactSyncs) GetCompactableSyncs() []*Task_CompactSyncs_CompactableSync { + if x != nil { + return x.CompactableSyncs + } + return nil +} + +func (x *Task_CompactSyncs) GetAnnotations() []*anypb.Any { + if x != nil { + return x.Annotations + } + return nil +} + +type Task_CompactSyncs_CompactableSync struct { + state protoimpl.MessageState `protogen:"open.v1"` + FilePath string `protobuf:"bytes,1,opt,name=file_path,json=filePath,proto3" json:"file_path,omitempty"` + SyncId string `protobuf:"bytes,2,opt,name=sync_id,json=syncId,proto3" json:"sync_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Task_CompactSyncs_CompactableSync) Reset() { + *x = Task_CompactSyncs_CompactableSync{} + mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Task_CompactSyncs_CompactableSync) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Task_CompactSyncs_CompactableSync) ProtoMessage() {} + +func (x *Task_CompactSyncs_CompactableSync) ProtoReflect() protoreflect.Message { + mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[34] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Task_CompactSyncs_CompactableSync.ProtoReflect.Descriptor instead. +func (*Task_CompactSyncs_CompactableSync) Descriptor() ([]byte, []int) { + return file_c1_connectorapi_baton_v1_baton_proto_rawDescGZIP(), []int{0, 20, 0} +} + +func (x *Task_CompactSyncs_CompactableSync) GetFilePath() string { + if x != nil { + return x.FilePath + } + return "" +} + +func (x *Task_CompactSyncs_CompactableSync) GetSyncId() string { + if x != nil { + return x.SyncId + } + return "" +} + type BatonServiceHelloRequest_BuildInfo struct { state protoimpl.MessageState `protogen:"open.v1"` LangVersion string `protobuf:"bytes,1,opt,name=lang_version,json=langVersion,proto3" json:"lang_version,omitempty"` @@ -1896,7 +2374,7 @@ type BatonServiceHelloRequest_BuildInfo struct { func (x *BatonServiceHelloRequest_BuildInfo) Reset() { *x = BatonServiceHelloRequest_BuildInfo{} - mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[28] + mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1908,7 +2386,7 @@ func (x *BatonServiceHelloRequest_BuildInfo) String() string { func (*BatonServiceHelloRequest_BuildInfo) ProtoMessage() {} func (x *BatonServiceHelloRequest_BuildInfo) ProtoReflect() protoreflect.Message { - mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[28] + mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[35] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1961,7 +2439,7 @@ type BatonServiceHelloRequest_OSInfo struct { func (x *BatonServiceHelloRequest_OSInfo) Reset() { *x = BatonServiceHelloRequest_OSInfo{} - mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[29] + mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1973,7 +2451,7 @@ func (x *BatonServiceHelloRequest_OSInfo) String() string { func (*BatonServiceHelloRequest_OSInfo) ProtoMessage() {} func (x *BatonServiceHelloRequest_OSInfo) ProtoReflect() protoreflect.Message { - mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[29] + mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[36] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2056,7 +2534,7 @@ type BatonServiceUploadAssetRequest_UploadMetadata struct { func (x *BatonServiceUploadAssetRequest_UploadMetadata) Reset() { *x = BatonServiceUploadAssetRequest_UploadMetadata{} - mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[30] + mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2068,7 +2546,7 @@ func (x *BatonServiceUploadAssetRequest_UploadMetadata) String() string { func (*BatonServiceUploadAssetRequest_UploadMetadata) ProtoMessage() {} func (x *BatonServiceUploadAssetRequest_UploadMetadata) ProtoReflect() protoreflect.Message { - mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[30] + mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[37] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2115,7 +2593,7 @@ type BatonServiceUploadAssetRequest_UploadData struct { func (x *BatonServiceUploadAssetRequest_UploadData) Reset() { *x = BatonServiceUploadAssetRequest_UploadData{} - mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[31] + mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2127,7 +2605,7 @@ func (x *BatonServiceUploadAssetRequest_UploadData) String() string { func (*BatonServiceUploadAssetRequest_UploadData) ProtoMessage() {} func (x *BatonServiceUploadAssetRequest_UploadData) ProtoReflect() protoreflect.Message { - mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[31] + mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[38] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2160,7 +2638,7 @@ type BatonServiceUploadAssetRequest_UploadEOF struct { func (x *BatonServiceUploadAssetRequest_UploadEOF) Reset() { *x = BatonServiceUploadAssetRequest_UploadEOF{} - mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[32] + mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2172,7 +2650,7 @@ func (x *BatonServiceUploadAssetRequest_UploadEOF) String() string { func (*BatonServiceUploadAssetRequest_UploadEOF) ProtoMessage() {} func (x *BatonServiceUploadAssetRequest_UploadEOF) ProtoReflect() protoreflect.Message { - mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[32] + mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[39] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2214,7 +2692,7 @@ type BatonServiceFinishTaskRequest_Error struct { func (x *BatonServiceFinishTaskRequest_Error) Reset() { *x = BatonServiceFinishTaskRequest_Error{} - mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[33] + mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2226,7 +2704,7 @@ func (x *BatonServiceFinishTaskRequest_Error) String() string { func (*BatonServiceFinishTaskRequest_Error) ProtoMessage() {} func (x *BatonServiceFinishTaskRequest_Error) ProtoReflect() protoreflect.Message { - mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[33] + mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[40] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2274,7 +2752,7 @@ type BatonServiceFinishTaskRequest_Success struct { func (x *BatonServiceFinishTaskRequest_Success) Reset() { *x = BatonServiceFinishTaskRequest_Success{} - mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[34] + mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2286,7 +2764,7 @@ func (x *BatonServiceFinishTaskRequest_Success) String() string { func (*BatonServiceFinishTaskRequest_Success) ProtoMessage() {} func (x *BatonServiceFinishTaskRequest_Success) ProtoReflect() protoreflect.Message { - mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[34] + mi := &file_c1_connectorapi_baton_v1_baton_proto_msgTypes[41] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2336,496 +2814,584 @@ var file_c1_connectorapi_baton_v1_baton_proto_rawDesc = string([]byte{ 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb1, 0x1b, - 0x0a, 0x04, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3d, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, - 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3d, 0x0a, 0x04, 0x6e, 0x6f, 0x6e, 0x65, 0x18, 0x64, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, - 0x61, 0x73, 0x6b, 0x2e, 0x4e, 0x6f, 0x6e, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x04, - 0x6e, 0x6f, 0x6e, 0x65, 0x12, 0x40, 0x0a, 0x05, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x18, 0x65, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, - 0x61, 0x73, 0x6b, 0x2e, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, - 0x05, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x12, 0x4a, 0x0a, 0x09, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x66, - 0x75, 0x6c, 0x6c, 0x18, 0x66, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x31, 0x2e, 0x63, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, - 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x46, 0x75, - 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x08, 0x73, 0x79, 0x6e, 0x63, 0x46, 0x75, - 0x6c, 0x6c, 0x12, 0x40, 0x0a, 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x18, 0x67, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x28, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, - 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, - 0x6b, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x05, 0x67, - 0x72, 0x61, 0x6e, 0x74, 0x12, 0x43, 0x0a, 0x06, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x18, 0x68, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, + 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9d, 0x26, 0x0a, 0x04, + 0x54, 0x61, 0x73, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x3d, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, - 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x48, - 0x00, 0x52, 0x06, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x12, 0x59, 0x0a, 0x0e, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x69, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x30, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x3d, 0x0a, 0x04, 0x6e, 0x6f, 0x6e, 0x65, 0x18, 0x64, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, - 0x6b, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, - 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x5c, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x6a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, - 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, - 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x61, 0x73, 0x6b, - 0x48, 0x00, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x12, 0x5c, 0x0a, 0x0f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x6b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x63, 0x31, + 0x6b, 0x2e, 0x4e, 0x6f, 0x6e, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x6f, + 0x6e, 0x65, 0x12, 0x40, 0x0a, 0x05, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x18, 0x65, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x28, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, + 0x6b, 0x2e, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x05, 0x68, + 0x65, 0x6c, 0x6c, 0x6f, 0x12, 0x4a, 0x0a, 0x09, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x66, 0x75, 0x6c, + 0x6c, 0x18, 0x66, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x46, 0x75, 0x6c, 0x6c, + 0x54, 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x08, 0x73, 0x79, 0x6e, 0x63, 0x46, 0x75, 0x6c, 0x6c, + 0x12, 0x40, 0x0a, 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x18, 0x67, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x28, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, + 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, + 0x47, 0x72, 0x61, 0x6e, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x05, 0x67, 0x72, 0x61, + 0x6e, 0x74, 0x12, 0x43, 0x0a, 0x06, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x18, 0x68, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, + 0x73, 0x6b, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, + 0x06, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x12, 0x59, 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x69, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x30, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, + 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x61, 0x73, + 0x6b, 0x48, 0x00, 0x52, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x5c, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x6a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, - 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x00, - 0x52, 0x0e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x12, 0x65, 0x0a, 0x12, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x18, 0x6c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x63, - 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, - 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x52, 0x6f, 0x74, - 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x54, 0x61, - 0x73, 0x6b, 0x48, 0x00, 0x52, 0x11, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x4d, 0x0a, 0x0a, 0x65, 0x76, 0x65, 0x6e, 0x74, - 0x5f, 0x66, 0x65, 0x65, 0x64, 0x18, 0x6d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x63, 0x31, - 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, - 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x46, 0x65, 0x65, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x09, 0x65, 0x76, 0x65, - 0x6e, 0x74, 0x46, 0x65, 0x65, 0x64, 0x12, 0x5f, 0x0a, 0x12, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x5f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x6e, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, + 0x52, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x12, 0x5c, 0x0a, 0x0f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x18, 0x6b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x63, 0x31, 0x2e, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x0e, + 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x65, + 0x0a, 0x12, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x61, 0x6c, 0x73, 0x18, 0x6c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x63, 0x31, 0x2e, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x52, 0x6f, 0x74, 0x61, 0x74, + 0x65, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x54, 0x61, 0x73, 0x6b, + 0x48, 0x00, 0x52, 0x11, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x4d, 0x0a, 0x0a, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x66, + 0x65, 0x65, 0x64, 0x18, 0x6d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x63, 0x31, 0x2e, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x46, + 0x65, 0x65, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x09, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x46, 0x65, 0x65, 0x64, 0x12, 0x5f, 0x0a, 0x12, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, + 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x6e, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2f, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, + 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, + 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x54, 0x61, 0x73, + 0x6b, 0x48, 0x00, 0x52, 0x10, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, + 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x66, 0x0a, 0x13, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x74, 0x69, + 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x18, 0x6f, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, - 0x73, 0x6b, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x54, - 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x10, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x63, - 0x6b, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x66, 0x0a, 0x13, 0x6c, 0x69, 0x73, 0x74, 0x5f, - 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x18, 0x6f, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x73, 0x6b, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x73, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x11, 0x6c, 0x69, 0x73, 0x74, + 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x12, 0x4d, 0x0a, + 0x0a, 0x67, 0x65, 0x74, 0x5f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x70, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2c, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, + 0x6b, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x48, + 0x00, 0x52, 0x09, 0x67, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x66, 0x0a, 0x13, + 0x62, 0x75, 0x6c, 0x6b, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x63, 0x6b, + 0x65, 0x74, 0x73, 0x18, 0x71, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x63, 0x31, 0x2e, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x42, 0x75, 0x6c, 0x6b, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x54, 0x61, 0x73, 0x6b, 0x48, + 0x00, 0x52, 0x11, 0x62, 0x75, 0x6c, 0x6b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x63, + 0x6b, 0x65, 0x74, 0x73, 0x12, 0x5d, 0x0a, 0x10, 0x62, 0x75, 0x6c, 0x6b, 0x5f, 0x67, 0x65, 0x74, + 0x5f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x18, 0x72, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, + 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, + 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x42, + 0x75, 0x6c, 0x6b, 0x47, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x54, 0x61, 0x73, + 0x6b, 0x48, 0x00, 0x52, 0x0e, 0x62, 0x75, 0x6c, 0x6b, 0x47, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, + 0x65, 0x74, 0x73, 0x12, 0x66, 0x0a, 0x13, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x69, + 0x73, 0x74, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x18, 0x73, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x34, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, + 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, + 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x73, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x11, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x4c, 0x69, 0x73, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x12, 0x60, 0x0a, 0x11, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x18, 0x74, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, + 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x65, 0x74, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x0f, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x56, 0x0a, + 0x0d, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x18, 0x75, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, - 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x53, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x11, 0x6c, 0x69, - 0x73, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x12, - 0x4d, 0x0a, 0x0a, 0x67, 0x65, 0x74, 0x5f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x70, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, + 0x65, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x0c, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, + 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x12, 0x56, 0x0a, 0x0d, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x76, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x63, + 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, + 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x41, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, + 0x0c, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x5d, 0x0a, + 0x10, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x64, 0x69, 0x66, + 0x66, 0x18, 0x77, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x79, + 0x6e, 0x63, 0x44, 0x69, 0x66, 0x66, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x0e, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x44, 0x69, 0x66, 0x66, 0x12, 0x52, 0x0a, 0x0d, + 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x73, 0x18, 0x78, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, - 0x61, 0x73, 0x6b, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x54, 0x61, 0x73, - 0x6b, 0x48, 0x00, 0x52, 0x09, 0x67, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x66, - 0x0a, 0x13, 0x62, 0x75, 0x6c, 0x6b, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, - 0x63, 0x6b, 0x65, 0x74, 0x73, 0x18, 0x71, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x63, 0x31, - 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, - 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x42, 0x75, 0x6c, 0x6b, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x54, 0x61, 0x73, - 0x6b, 0x48, 0x00, 0x52, 0x11, 0x62, 0x75, 0x6c, 0x6b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, - 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x5d, 0x0a, 0x10, 0x62, 0x75, 0x6c, 0x6b, 0x5f, 0x67, - 0x65, 0x74, 0x5f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x18, 0x72, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x31, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, - 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, - 0x2e, 0x42, 0x75, 0x6c, 0x6b, 0x47, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x54, - 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x0e, 0x62, 0x75, 0x6c, 0x6b, 0x47, 0x65, 0x74, 0x54, 0x69, - 0x63, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x62, 0x75, 0x67, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x64, 0x65, 0x62, 0x75, 0x67, 0x1a, 0x42, 0x0a, 0x08, 0x4e, - 0x6f, 0x6e, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x73, 0x6b, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x73, + 0x48, 0x00, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x73, + 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x62, 0x75, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x05, 0x64, 0x65, 0x62, 0x75, 0x67, 0x1a, 0x42, 0x0a, 0x08, 0x4e, 0x6f, 0x6e, 0x65, 0x54, 0x61, + 0x73, 0x6b, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x43, 0x0a, 0x09, 0x48, 0x65, + 0x6c, 0x6c, 0x6f, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, - 0x43, 0x0a, 0x09, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x36, 0x0a, 0x0b, + 0x46, 0x0a, 0x0c, 0x53, 0x79, 0x6e, 0x63, 0x46, 0x75, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x12, + 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x7e, 0x0a, 0x0d, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x46, 0x65, 0x65, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x35, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x41, 0x74, 0x1a, 0xf3, 0x01, 0x0a, 0x09, 0x47, 0x72, 0x61, 0x6e, + 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x3e, 0x0a, 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x31, 0x2e, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x74, + 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x6c, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x37, 0x0a, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, + 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x52, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x12, 0x36, + 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x35, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x72, 0x0a, + 0x0a, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x2c, 0x0a, 0x05, 0x67, + 0x72, 0x61, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x31, 0x2e, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x72, 0x61, + 0x6e, 0x74, 0x52, 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x1a, 0xf9, 0x01, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x3f, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, + 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x51, 0x0a, 0x12, 0x63, 0x72, 0x65, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, + 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x11, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x50, 0x0a, 0x12, 0x65, + 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x11, 0x65, 0x6e, 0x63, 0x72, + 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x1a, 0x4b, 0x0a, + 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, + 0x61, 0x73, 0x6b, 0x12, 0x35, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x1a, 0x52, 0x0a, 0x12, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x61, 0x73, 0x6b, + 0x12, 0x3c, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x49, 0x64, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x1a, 0xfa, + 0x01, 0x0a, 0x15, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x61, 0x6c, 0x73, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x3c, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, + 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x51, 0x0a, 0x12, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x11, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x50, 0x0a, 0x12, 0x65, 0x6e, 0x63, + 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x11, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x1a, 0xd5, 0x01, 0x0a, 0x10, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, + 0x12, 0x45, 0x0a, 0x0e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x69, 0x63, 0x6b, 0x65, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0d, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x42, 0x0a, 0x0d, 0x74, 0x69, 0x63, 0x6b, 0x65, + 0x74, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, + 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, + 0x2e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x0c, 0x74, + 0x69, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x36, 0x0a, 0x0b, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x1a, 0x71, 0x0a, 0x15, 0x42, 0x75, 0x6c, 0x6b, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x58, 0x0a, 0x0f, + 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x63, 0x6b, + 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x0e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x1a, 0x6b, 0x0a, 0x12, 0x42, 0x75, 0x6c, 0x6b, 0x47, 0x65, + 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x55, 0x0a, 0x0f, + 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x54, + 0x61, 0x73, 0x6b, 0x52, 0x0e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x73, 0x1a, 0x4f, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, + 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x46, 0x0a, 0x0c, 0x53, 0x79, 0x6e, 0x63, 0x46, 0x75, 0x6c, 0x6c, - 0x54, 0x61, 0x73, 0x6b, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, - 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x7e, 0x0a, 0x0d, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x46, 0x65, 0x65, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x36, 0x0a, - 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x35, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x61, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x52, 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x41, 0x74, 0x1a, 0xf3, 0x01, 0x0a, - 0x09, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x3e, 0x0a, 0x0b, 0x65, 0x6e, - 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, - 0x32, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x65, - 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x37, 0x0a, 0x09, 0x70, 0x72, - 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, - 0x70, 0x61, 0x6c, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x64, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, + 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, + 0x49, 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x4f, 0x0a, 0x15, 0x41, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x54, + 0x61, 0x73, 0x6b, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x35, 0x0a, 0x08, 0x64, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x61, 0x0a, 0x13, 0x41, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x54, 0x61, + 0x73, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, + 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x8b, + 0x01, 0x0a, 0x10, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x54, + 0x61, 0x73, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x04, + 0x61, 0x72, 0x67, 0x73, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, + 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x6e, 0x0a, 0x10, + 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x54, 0x61, 0x73, 0x6b, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, + 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x8e, 0x01, 0x0a, + 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x44, 0x69, 0x66, 0x66, 0x54, + 0x61, 0x73, 0x6b, 0x12, 0x20, 0x0a, 0x0c, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x73, 0x79, 0x6e, 0x63, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x61, 0x73, 0x65, 0x53, + 0x79, 0x6e, 0x63, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0b, 0x6e, 0x65, 0x77, 0x5f, 0x73, 0x79, 0x6e, + 0x63, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x65, 0x77, 0x53, + 0x79, 0x6e, 0x63, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, + 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0xf9, 0x01, + 0x0a, 0x0c, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x73, 0x12, 0x68, + 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x79, + 0x6e, 0x63, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x63, 0x31, 0x2e, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x63, + 0x74, 0x53, 0x79, 0x6e, 0x63, 0x73, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x10, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x73, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x1a, 0x72, 0x0a, 0x0a, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x54, 0x61, 0x73, 0x6b, - 0x12, 0x2c, 0x0a, 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x16, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, - 0x32, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x12, 0x36, - 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, + 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x1a, 0x47, 0x0a, 0x0f, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, + 0x79, 0x6e, 0x63, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, + 0x12, 0x17, 0x0a, 0x07, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x73, 0x79, 0x6e, 0x63, 0x49, 0x64, 0x22, 0x73, 0x0a, 0x06, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x53, + 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, + 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x53, 0x43, 0x48, 0x45, 0x44, 0x55, + 0x4c, 0x45, 0x44, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, + 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, + 0x54, 0x55, 0x53, 0x5f, 0x46, 0x49, 0x4e, 0x49, 0x53, 0x48, 0x45, 0x44, 0x10, 0x04, 0x42, 0x0b, + 0x0a, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0xf3, 0x07, 0x0a, 0x18, + 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x65, 0x6c, 0x6c, + 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x07, 0x68, 0x6f, 0x73, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, + 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x06, 0x68, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x12, 0x32, 0x0a, + 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x19, + 0xfa, 0x42, 0x16, 0x72, 0x14, 0x32, 0x12, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, + 0x2d, 0x39, 0x5d, 0x7b, 0x32, 0x37, 0x7d, 0x7c, 0x24, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, + 0x64, 0x12, 0x65, 0x0a, 0x0a, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x65, 0x6c, + 0x6c, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x49, + 0x6e, 0x66, 0x6f, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x09, 0x62, + 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x5c, 0x0a, 0x07, 0x6f, 0x73, 0x5f, 0x69, + 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x63, 0x31, 0x2e, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4f, 0x53, + 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, + 0x6f, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x5b, 0x0a, 0x12, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, + 0x52, 0x11, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x40, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x08, + 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x10, 0x10, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x95, 0x01, 0x0a, 0x09, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x49, + 0x6e, 0x66, 0x6f, 0x12, 0x2d, 0x0a, 0x0c, 0x6c, 0x61, 0x6e, 0x67, 0x5f, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, + 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x0b, 0x6c, 0x61, 0x6e, 0x67, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x24, 0x0a, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, + 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x33, 0x0a, 0x0f, 0x70, 0x61, 0x63, 0x6b, + 0x61, 0x67, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x0e, 0x70, + 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x1a, 0x81, 0x03, + 0x0a, 0x06, 0x4f, 0x53, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x26, 0x0a, 0x08, 0x68, 0x6f, 0x73, 0x74, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, + 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x1a, 0x0a, 0x02, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, + 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x02, 0x6f, 0x73, 0x12, 0x26, 0x0a, 0x08, + 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, + 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, + 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x35, 0x0a, 0x10, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, + 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, + 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x0f, 0x70, 0x6c, 0x61, 0x74, + 0x66, 0x6f, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x0f, 0x70, + 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, + 0x52, 0x0e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, + 0x12, 0x31, 0x0a, 0x0e, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, + 0x01, 0x18, 0x80, 0x02, 0x52, 0x0d, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x0b, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x5f, 0x61, 0x72, + 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, + 0x01, 0x18, 0x80, 0x02, 0x52, 0x0a, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x41, 0x72, 0x63, 0x68, + 0x12, 0x3f, 0x0a, 0x15, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x14, 0x76, 0x69, 0x72, + 0x74, 0x75, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x79, 0x73, 0x74, 0x65, + 0x6d, 0x22, 0x53, 0x0a, 0x19, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, + 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0xf9, 0x01, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x3f, 0x0a, 0x0c, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x51, 0x0a, - 0x12, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x31, 0x2e, 0x63, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x11, 0x63, - 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x50, 0x0a, 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, - 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, - 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, - 0x11, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x73, 0x1a, 0x4b, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x35, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, - 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x1a, - 0x52, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x3c, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, - 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x49, 0x64, 0x1a, 0xfa, 0x01, 0x0a, 0x15, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x43, 0x72, - 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x3c, 0x0a, - 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x52, - 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x51, 0x0a, 0x12, 0x63, - 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x11, 0x63, 0x72, 0x65, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x50, - 0x0a, 0x12, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x31, 0x2e, - 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x63, - 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x11, 0x65, - 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, - 0x1a, 0xd5, 0x01, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, - 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x45, 0x0a, 0x0e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, - 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, - 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0d, 0x74, - 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x42, 0x0a, 0x0d, - 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x52, 0x0c, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x71, 0x0a, 0x15, 0x42, 0x75, 0x6c, 0x6b, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x54, 0x61, 0x73, - 0x6b, 0x12, 0x58, 0x0a, 0x0f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x63, 0x31, 0x2e, - 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, - 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x0e, 0x74, 0x69, 0x63, - 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x1a, 0x6b, 0x0a, 0x12, 0x42, - 0x75, 0x6c, 0x6b, 0x47, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x54, 0x61, 0x73, - 0x6b, 0x12, 0x55, 0x0a, 0x0f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x63, 0x31, 0x2e, - 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, - 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x69, - 0x63, 0x6b, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x0e, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x1a, 0x4f, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, - 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x54, 0x61, 0x73, - 0x6b, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x64, 0x0a, 0x0d, 0x47, 0x65, 0x74, - 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x69, - 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, - 0x69, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x41, 0x0a, 0x1a, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x07, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, + 0x02, 0x52, 0x06, 0x68, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x22, 0x83, 0x02, 0x0a, 0x1b, 0x42, 0x61, + 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, + 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x04, 0x74, 0x61, 0x73, + 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x12, 0x36, 0x0a, + 0x09, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x6f, 0x6c, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x6e, 0x65, 0x78, + 0x74, 0x50, 0x6f, 0x6c, 0x6c, 0x12, 0x40, 0x0a, 0x0e, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x65, + 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x48, 0x65, + 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, - 0x73, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, - 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x45, 0x4e, 0x44, - 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, - 0x53, 0x43, 0x48, 0x45, 0x44, 0x55, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x53, - 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, - 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x49, 0x4e, 0x49, 0x53, 0x48, - 0x45, 0x44, 0x10, 0x04, 0x42, 0x0b, 0x0a, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x22, 0xf3, 0x07, 0x0a, 0x18, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, - 0x0a, 0x07, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x06, 0x68, 0x6f, 0x73, - 0x74, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x19, 0xfa, 0x42, 0x16, 0x72, 0x14, 0x32, 0x12, 0x5e, 0x5b, 0x61, - 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x32, 0x37, 0x7d, 0x7c, 0x24, 0x52, - 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x65, 0x0a, 0x0a, 0x62, 0x75, 0x69, 0x6c, 0x64, - 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x63, 0x31, - 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, - 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, - 0x42, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, - 0x02, 0x10, 0x01, 0x52, 0x09, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x5c, - 0x0a, 0x07, 0x6f, 0x73, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x39, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, - 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x2e, 0x4f, 0x53, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, - 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x6f, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x5b, 0x0a, 0x12, - 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x6f, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x08, 0xfa, 0x42, - 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x11, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, - 0x72, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x40, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x10, 0x10, 0x52, 0x0b, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x95, 0x01, 0x0a, 0x09, - 0x42, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2d, 0x0a, 0x0c, 0x6c, 0x61, 0x6e, - 0x67, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x0b, 0x6c, 0x61, 0x6e, - 0x67, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x0a, 0x07, 0x70, 0x61, 0x63, 0x6b, - 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, - 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x33, - 0x0a, 0x0f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, - 0x18, 0x80, 0x02, 0x52, 0x0e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x56, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x1a, 0x81, 0x03, 0x0a, 0x06, 0x4f, 0x53, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x26, - 0x0a, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x08, 0x68, 0x6f, - 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x02, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x02, - 0x6f, 0x73, 0x12, 0x26, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, - 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x35, 0x0a, 0x10, 0x70, 0x6c, - 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, - 0x52, 0x0f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x33, 0x0a, 0x0f, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x66, 0x61, - 0x6d, 0x69, 0x6c, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, - 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x0e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, - 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x12, 0x31, 0x0a, 0x0e, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, - 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, - 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x0d, 0x6b, 0x65, 0x72, 0x6e, - 0x65, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x0b, 0x6b, 0x65, 0x72, - 0x6e, 0x65, 0x6c, 0x5f, 0x61, 0x72, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, - 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x0a, 0x6b, 0x65, 0x72, 0x6e, - 0x65, 0x6c, 0x41, 0x72, 0x63, 0x68, 0x12, 0x3f, 0x0a, 0x15, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, - 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, - 0x02, 0x52, 0x14, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x22, 0x53, 0x0a, 0x19, 0x42, 0x61, 0x74, 0x6f, 0x6e, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, - 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x41, 0x0a, 0x1a, - 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x54, - 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x07, 0x68, 0x6f, - 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, - 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x06, 0x68, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x22, - 0x83, 0x02, 0x0a, 0x1b, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x32, 0x0a, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, - 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, - 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x04, 0x74, - 0x61, 0x73, 0x6b, 0x12, 0x36, 0x0a, 0x09, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x6f, 0x6c, 0x6c, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x08, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x6f, 0x6c, 0x6c, 0x12, 0x40, 0x0a, 0x0e, 0x6e, - 0x65, 0x78, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, - 0x6e, 0x65, 0x78, 0x74, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x12, 0x36, 0x0a, - 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, + 0xb8, 0x01, 0x0a, 0x1c, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x23, 0x0a, 0x07, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x06, 0x68, + 0x6f, 0x73, 0x74, 0x49, 0x64, 0x12, 0x31, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xfa, 0x42, 0x15, 0x72, 0x13, 0x32, 0x11, 0x5e, + 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x32, 0x37, 0x7d, 0x24, + 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x40, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x41, 0x6e, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x10, 0x10, 0x52, 0x0b, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xb7, 0x01, 0x0a, 0x1d, 0x42, + 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x65, 0x61, 0x72, 0x74, + 0x62, 0x65, 0x61, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0e, + 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x12, 0x1c, + 0x0a, 0x09, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x09, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x65, 0x64, 0x12, 0x36, 0x0a, 0x0b, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa3, 0x05, 0x0a, 0x1e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x65, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x47, 0x2e, 0x63, 0x31, 0x2e, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x48, 0x00, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x59, + 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x63, + 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, + 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x61, 0x74, + 0x61, 0x48, 0x00, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x56, 0x0a, 0x03, 0x65, 0x6f, 0x66, + 0x18, 0x66, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, + 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x70, + 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x45, 0x4f, 0x46, 0x48, 0x00, 0x52, 0x03, 0x65, 0x6f, + 0x66, 0x1a, 0xaa, 0x01, 0x0a, 0x0e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x23, 0x0a, 0x07, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, + 0x02, 0x52, 0x06, 0x68, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x12, 0x31, 0x0a, 0x07, 0x74, 0x61, 0x73, + 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xfa, 0x42, 0x15, 0x72, + 0x13, 0x32, 0x11, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x7b, + 0x32, 0x37, 0x7d, 0x24, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x40, 0x0a, 0x0b, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x10, + 0x10, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x2d, + 0x0a, 0x0a, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1f, 0x0a, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x7a, + 0x06, 0x10, 0x01, 0x18, 0x80, 0x80, 0x40, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x7f, 0x0a, + 0x09, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x45, 0x4f, 0x46, 0x12, 0x30, 0x0a, 0x0f, 0x73, 0x68, + 0x61, 0x32, 0x35, 0x36, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x7a, 0x02, 0x68, 0x20, 0x52, 0x0e, 0x73, 0x68, + 0x61, 0x32, 0x35, 0x36, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x75, 0x6d, 0x12, 0x40, 0x0a, 0x0b, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x10, + 0x10, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x0a, + 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x59, 0x0a, 0x1f, 0x42, 0x61, + 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, + 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, + 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xb8, 0x01, 0x0a, 0x1c, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x07, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, - 0x18, 0x80, 0x02, 0x52, 0x06, 0x68, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x12, 0x31, 0x0a, 0x07, 0x74, - 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xfa, 0x42, - 0x15, 0x72, 0x13, 0x32, 0x11, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, - 0x5d, 0x7b, 0x32, 0x37, 0x7d, 0x24, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x40, - 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x8d, 0x05, 0x0a, 0x1d, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x54, 0x61, 0x73, 0x6b, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x07, 0x68, 0x6f, 0x73, 0x74, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, + 0x01, 0x18, 0x80, 0x02, 0x52, 0x06, 0x68, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x12, 0x31, 0x0a, 0x07, + 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xfa, + 0x42, 0x15, 0x72, 0x13, 0x32, 0x11, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, + 0x39, 0x5d, 0x7b, 0x32, 0x37, 0x7d, 0x24, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, + 0x2a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x55, 0x0a, 0x05, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x63, 0x31, 0x2e, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, + 0x6f, 0x72, 0x12, 0x5b, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x65, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, + 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, + 0x68, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x53, 0x75, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x1a, + 0xa0, 0x01, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x6e, 0x6f, 0x6e, + 0x5f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0c, 0x6e, 0x6f, 0x6e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x40, + 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x10, 0x10, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x22, 0xb7, 0x01, 0x0a, 0x1d, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0e, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x72, 0x74, - 0x62, 0x65, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x48, 0x65, 0x61, 0x72, 0x74, - 0x62, 0x65, 0x61, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x65, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, - 0x65, 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa3, 0x05, 0x0a, 0x1e, 0x42, - 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x70, 0x6c, 0x6f, 0x61, - 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x65, 0x0a, - 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x47, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, - 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x73, 0x73, - 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x12, 0x59, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x65, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, - 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, - 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, - 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x55, 0x70, 0x6c, - 0x6f, 0x61, 0x64, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, - 0x56, 0x0a, 0x03, 0x65, 0x6f, 0x66, 0x18, 0x66, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x63, - 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, - 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x45, 0x4f, 0x46, - 0x48, 0x00, 0x52, 0x03, 0x65, 0x6f, 0x66, 0x1a, 0xaa, 0x01, 0x0a, 0x0e, 0x55, 0x70, 0x6c, 0x6f, - 0x61, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x23, 0x0a, 0x07, 0x68, 0x6f, - 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, - 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x06, 0x68, 0x6f, 0x73, 0x74, 0x49, 0x64, 0x12, - 0x31, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x18, 0xfa, 0x42, 0x15, 0x72, 0x13, 0x32, 0x11, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, - 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x32, 0x37, 0x7d, 0x24, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, - 0x49, 0x64, 0x12, 0x40, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x08, 0xfa, - 0x42, 0x05, 0x92, 0x01, 0x02, 0x10, 0x10, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x2d, 0x0a, 0x0a, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x61, - 0x74, 0x61, 0x12, 0x1f, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, - 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x7a, 0x06, 0x10, 0x01, 0x18, 0x80, 0x80, 0x40, 0x52, 0x04, 0x64, - 0x61, 0x74, 0x61, 0x1a, 0x7f, 0x0a, 0x09, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x45, 0x4f, 0x46, - 0x12, 0x30, 0x0a, 0x0f, 0x73, 0x68, 0x61, 0x32, 0x35, 0x36, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, - 0x73, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x7a, 0x02, - 0x68, 0x20, 0x52, 0x0e, 0x73, 0x68, 0x61, 0x32, 0x35, 0x36, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, - 0x75, 0x6d, 0x12, 0x40, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x08, 0xfa, - 0x42, 0x05, 0x92, 0x01, 0x02, 0x10, 0x10, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x0a, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x03, 0xf8, 0x42, 0x01, - 0x22, 0x59, 0x0a, 0x1f, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x8d, 0x05, 0x0a, 0x1d, - 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x46, 0x69, 0x6e, 0x69, - 0x73, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, - 0x07, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, - 0xfa, 0x42, 0x07, 0x72, 0x05, 0x10, 0x01, 0x18, 0x80, 0x02, 0x52, 0x06, 0x68, 0x6f, 0x73, 0x74, - 0x49, 0x64, 0x12, 0x31, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x18, 0xfa, 0x42, 0x15, 0x72, 0x13, 0x32, 0x11, 0x5e, 0x5b, 0x61, 0x2d, - 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x7b, 0x32, 0x37, 0x7d, 0x24, 0x52, 0x06, 0x74, - 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, - 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x12, 0x55, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x3d, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, - 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, - 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x54, 0x61, - 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, - 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x5b, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x63, 0x31, 0x2e, 0x63, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, - 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x2e, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x07, 0x73, 0x75, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x1a, 0xa0, 0x01, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, - 0x23, 0x0a, 0x0d, 0x6e, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x61, 0x62, 0x6c, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x6e, 0x6f, 0x6e, 0x52, 0x65, 0x74, 0x72, 0x79, - 0x61, 0x62, 0x6c, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, - 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x10, 0x10, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x30, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x08, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x7d, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x12, 0x40, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x08, - 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x10, 0x10, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x30, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x08, 0x72, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x12, 0x0a, 0x0b, 0x66, 0x69, 0x6e, 0x61, 0x6c, - 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x58, 0x0a, 0x1e, 0x42, - 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, - 0x68, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, + 0x12, 0x30, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x1a, 0x7d, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x40, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x17, 0x0a, 0x15, 0x53, 0x74, 0x61, 0x72, 0x74, 0x44, 0x65, - 0x62, 0x75, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x30, - 0x0a, 0x16, 0x53, 0x74, 0x61, 0x72, 0x74, 0x44, 0x65, 0x62, 0x75, 0x67, 0x67, 0x69, 0x6e, 0x67, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x32, 0x80, 0x06, 0x0a, 0x0c, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x12, 0x72, 0x0a, 0x05, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x12, 0x32, 0x2e, 0x63, 0x31, 0x2e, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, + 0x10, 0x10, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x30, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x42, 0x12, 0x0a, 0x0b, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x58, 0x0a, 0x1e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, + 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, + 0x17, 0x0a, 0x15, 0x53, 0x74, 0x61, 0x72, 0x74, 0x44, 0x65, 0x62, 0x75, 0x67, 0x67, 0x69, 0x6e, + 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x30, 0x0a, 0x16, 0x53, 0x74, 0x61, 0x72, + 0x74, 0x44, 0x65, 0x62, 0x75, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x32, 0x80, 0x06, 0x0a, 0x0c, 0x42, + 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x72, 0x0a, 0x05, 0x48, + 0x65, 0x6c, 0x6c, 0x6f, 0x12, 0x32, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, + 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x65, 0x6c, 0x6c, + 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x78, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x34, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, - 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, - 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x78, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, - 0x12, 0x34, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, + 0x63, 0x65, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x35, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7e, 0x0a, 0x09, 0x48, 0x65, 0x61, + 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x12, 0x36, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, - 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, - 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x7e, 0x0a, 0x09, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x12, 0x36, 0x2e, 0x63, - 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, - 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, - 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x65, 0x61, 0x72, - 0x74, 0x62, 0x65, 0x61, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x81, 0x01, 0x0a, 0x0a, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x37, + 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x65, + 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x54, 0x61, 0x73, 0x6b, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, - 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x46, - 0x69, 0x6e, 0x69, 0x73, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x86, 0x01, 0x0a, 0x0b, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x73, - 0x73, 0x65, 0x74, 0x12, 0x38, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, - 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x70, 0x6c, 0x6f, 0x61, - 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x81, 0x01, 0x0a, 0x0a, 0x46, 0x69, + 0x6e, 0x69, 0x73, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x37, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x38, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, + 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x54, + 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x86, 0x01, + 0x0a, 0x0b, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x38, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x12, 0x75, 0x0a, 0x0e, - 0x53, 0x74, 0x61, 0x72, 0x74, 0x44, 0x65, 0x62, 0x75, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x12, 0x2f, - 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, - 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x44, - 0x65, 0x62, 0x75, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x30, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, - 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, - 0x44, 0x65, 0x62, 0x75, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x42, 0x37, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x6c, 0x61, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x6e, 0x65, 0x2f, 0x63, 0x31, 0x2f, 0x70, 0x6b, 0x67, - 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, - 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, + 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x12, 0x75, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x44, + 0x65, 0x62, 0x75, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x12, 0x2f, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x44, 0x65, 0x62, 0x75, 0x67, 0x67, 0x69, + 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x63, 0x31, 0x2e, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x44, 0x65, 0x62, 0x75, 0x67, 0x67, + 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x37, 0x5a, + 0x35, 0x67, 0x69, 0x74, 0x6c, 0x61, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x75, 0x63, 0x74, + 0x6f, 0x6e, 0x65, 0x2f, 0x63, 0x31, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, + 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, + 0x74, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, }) var ( @@ -2841,7 +3407,7 @@ func file_c1_connectorapi_baton_v1_baton_proto_rawDescGZIP() []byte { } var file_c1_connectorapi_baton_v1_baton_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_c1_connectorapi_baton_v1_baton_proto_msgTypes = make([]protoimpl.MessageInfo, 35) +var file_c1_connectorapi_baton_v1_baton_proto_msgTypes = make([]protoimpl.MessageInfo, 42) var file_c1_connectorapi_baton_v1_baton_proto_goTypes = []any{ (Task_Status)(0), // 0: c1.connectorapi.baton.v1.Task.Status (*Task)(nil), // 1: c1.connectorapi.baton.v1.Task @@ -2872,27 +3438,35 @@ var file_c1_connectorapi_baton_v1_baton_proto_goTypes = []any{ (*Task_BulkGetTicketsTask)(nil), // 26: c1.connectorapi.baton.v1.Task.BulkGetTicketsTask (*Task_ListTicketSchemasTask)(nil), // 27: c1.connectorapi.baton.v1.Task.ListTicketSchemasTask (*Task_GetTicketTask)(nil), // 28: c1.connectorapi.baton.v1.Task.GetTicketTask - (*BatonServiceHelloRequest_BuildInfo)(nil), // 29: c1.connectorapi.baton.v1.BatonServiceHelloRequest.BuildInfo - (*BatonServiceHelloRequest_OSInfo)(nil), // 30: c1.connectorapi.baton.v1.BatonServiceHelloRequest.OSInfo - (*BatonServiceUploadAssetRequest_UploadMetadata)(nil), // 31: c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.UploadMetadata - (*BatonServiceUploadAssetRequest_UploadData)(nil), // 32: c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.UploadData - (*BatonServiceUploadAssetRequest_UploadEOF)(nil), // 33: c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.UploadEOF - (*BatonServiceFinishTaskRequest_Error)(nil), // 34: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.Error - (*BatonServiceFinishTaskRequest_Success)(nil), // 35: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.Success - (*v2.ConnectorMetadata)(nil), // 36: c1.connector.v2.ConnectorMetadata - (*anypb.Any)(nil), // 37: google.protobuf.Any - (*durationpb.Duration)(nil), // 38: google.protobuf.Duration - (*status.Status)(nil), // 39: google.rpc.Status - (*timestamppb.Timestamp)(nil), // 40: google.protobuf.Timestamp - (*v2.Entitlement)(nil), // 41: c1.connector.v2.Entitlement - (*v2.Resource)(nil), // 42: c1.connector.v2.Resource - (*v2.Grant)(nil), // 43: c1.connector.v2.Grant - (*v2.AccountInfo)(nil), // 44: c1.connector.v2.AccountInfo - (*v2.CredentialOptions)(nil), // 45: c1.connector.v2.CredentialOptions - (*v2.EncryptionConfig)(nil), // 46: c1.connector.v2.EncryptionConfig - (*v2.ResourceId)(nil), // 47: c1.connector.v2.ResourceId - (*v2.TicketRequest)(nil), // 48: c1.connector.v2.TicketRequest - (*v2.TicketSchema)(nil), // 49: c1.connector.v2.TicketSchema + (*Task_ActionListSchemasTask)(nil), // 29: c1.connectorapi.baton.v1.Task.ActionListSchemasTask + (*Task_ActionGetSchemaTask)(nil), // 30: c1.connectorapi.baton.v1.Task.ActionGetSchemaTask + (*Task_ActionInvokeTask)(nil), // 31: c1.connectorapi.baton.v1.Task.ActionInvokeTask + (*Task_ActionStatusTask)(nil), // 32: c1.connectorapi.baton.v1.Task.ActionStatusTask + (*Task_CreateSyncDiffTask)(nil), // 33: c1.connectorapi.baton.v1.Task.CreateSyncDiffTask + (*Task_CompactSyncs)(nil), // 34: c1.connectorapi.baton.v1.Task.CompactSyncs + (*Task_CompactSyncs_CompactableSync)(nil), // 35: c1.connectorapi.baton.v1.Task.CompactSyncs.CompactableSync + (*BatonServiceHelloRequest_BuildInfo)(nil), // 36: c1.connectorapi.baton.v1.BatonServiceHelloRequest.BuildInfo + (*BatonServiceHelloRequest_OSInfo)(nil), // 37: c1.connectorapi.baton.v1.BatonServiceHelloRequest.OSInfo + (*BatonServiceUploadAssetRequest_UploadMetadata)(nil), // 38: c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.UploadMetadata + (*BatonServiceUploadAssetRequest_UploadData)(nil), // 39: c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.UploadData + (*BatonServiceUploadAssetRequest_UploadEOF)(nil), // 40: c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.UploadEOF + (*BatonServiceFinishTaskRequest_Error)(nil), // 41: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.Error + (*BatonServiceFinishTaskRequest_Success)(nil), // 42: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.Success + (*v2.ConnectorMetadata)(nil), // 43: c1.connector.v2.ConnectorMetadata + (*anypb.Any)(nil), // 44: google.protobuf.Any + (*durationpb.Duration)(nil), // 45: google.protobuf.Duration + (*status.Status)(nil), // 46: google.rpc.Status + (*timestamppb.Timestamp)(nil), // 47: google.protobuf.Timestamp + (*v2.Entitlement)(nil), // 48: c1.connector.v2.Entitlement + (*v2.Resource)(nil), // 49: c1.connector.v2.Resource + (*v2.Grant)(nil), // 50: c1.connector.v2.Grant + (*v2.AccountInfo)(nil), // 51: c1.connector.v2.AccountInfo + (*v2.CredentialOptions)(nil), // 52: c1.connector.v2.CredentialOptions + (*v2.EncryptionConfig)(nil), // 53: c1.connector.v2.EncryptionConfig + (*v2.ResourceId)(nil), // 54: c1.connector.v2.ResourceId + (*v2.TicketRequest)(nil), // 55: c1.connector.v2.TicketRequest + (*v2.TicketSchema)(nil), // 56: c1.connector.v2.TicketSchema + (*structpb.Struct)(nil), // 57: google.protobuf.Struct } var file_c1_connectorapi_baton_v1_baton_proto_depIdxs = []int32{ 0, // 0: c1.connectorapi.baton.v1.Task.status:type_name -> c1.connectorapi.baton.v1.Task.Status @@ -2911,75 +3485,89 @@ var file_c1_connectorapi_baton_v1_baton_proto_depIdxs = []int32{ 28, // 13: c1.connectorapi.baton.v1.Task.get_ticket:type_name -> c1.connectorapi.baton.v1.Task.GetTicketTask 25, // 14: c1.connectorapi.baton.v1.Task.bulk_create_tickets:type_name -> c1.connectorapi.baton.v1.Task.BulkCreateTicketsTask 26, // 15: c1.connectorapi.baton.v1.Task.bulk_get_tickets:type_name -> c1.connectorapi.baton.v1.Task.BulkGetTicketsTask - 29, // 16: c1.connectorapi.baton.v1.BatonServiceHelloRequest.build_info:type_name -> c1.connectorapi.baton.v1.BatonServiceHelloRequest.BuildInfo - 30, // 17: c1.connectorapi.baton.v1.BatonServiceHelloRequest.os_info:type_name -> c1.connectorapi.baton.v1.BatonServiceHelloRequest.OSInfo - 36, // 18: c1.connectorapi.baton.v1.BatonServiceHelloRequest.connector_metadata:type_name -> c1.connector.v2.ConnectorMetadata - 37, // 19: c1.connectorapi.baton.v1.BatonServiceHelloRequest.annotations:type_name -> google.protobuf.Any - 37, // 20: c1.connectorapi.baton.v1.BatonServiceHelloResponse.annotations:type_name -> google.protobuf.Any - 1, // 21: c1.connectorapi.baton.v1.BatonServiceGetTaskResponse.task:type_name -> c1.connectorapi.baton.v1.Task - 38, // 22: c1.connectorapi.baton.v1.BatonServiceGetTaskResponse.next_poll:type_name -> google.protobuf.Duration - 38, // 23: c1.connectorapi.baton.v1.BatonServiceGetTaskResponse.next_heartbeat:type_name -> google.protobuf.Duration - 37, // 24: c1.connectorapi.baton.v1.BatonServiceGetTaskResponse.annotations:type_name -> google.protobuf.Any - 37, // 25: c1.connectorapi.baton.v1.BatonServiceHeartbeatRequest.annotations:type_name -> google.protobuf.Any - 38, // 26: c1.connectorapi.baton.v1.BatonServiceHeartbeatResponse.next_heartbeat:type_name -> google.protobuf.Duration - 37, // 27: c1.connectorapi.baton.v1.BatonServiceHeartbeatResponse.annotations:type_name -> google.protobuf.Any - 31, // 28: c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.metadata:type_name -> c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.UploadMetadata - 32, // 29: c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.data:type_name -> c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.UploadData - 33, // 30: c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.eof:type_name -> c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.UploadEOF - 37, // 31: c1.connectorapi.baton.v1.BatonServiceUploadAssetResponse.annotations:type_name -> google.protobuf.Any - 39, // 32: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.status:type_name -> google.rpc.Status - 34, // 33: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.error:type_name -> c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.Error - 35, // 34: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.success:type_name -> c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.Success - 37, // 35: c1.connectorapi.baton.v1.BatonServiceFinishTaskResponse.annotations:type_name -> google.protobuf.Any - 37, // 36: c1.connectorapi.baton.v1.Task.NoneTask.annotations:type_name -> google.protobuf.Any - 37, // 37: c1.connectorapi.baton.v1.Task.HelloTask.annotations:type_name -> google.protobuf.Any - 37, // 38: c1.connectorapi.baton.v1.Task.SyncFullTask.annotations:type_name -> google.protobuf.Any - 37, // 39: c1.connectorapi.baton.v1.Task.EventFeedTask.annotations:type_name -> google.protobuf.Any - 40, // 40: c1.connectorapi.baton.v1.Task.EventFeedTask.start_at:type_name -> google.protobuf.Timestamp - 41, // 41: c1.connectorapi.baton.v1.Task.GrantTask.entitlement:type_name -> c1.connector.v2.Entitlement - 42, // 42: c1.connectorapi.baton.v1.Task.GrantTask.principal:type_name -> c1.connector.v2.Resource - 37, // 43: c1.connectorapi.baton.v1.Task.GrantTask.annotations:type_name -> google.protobuf.Any - 38, // 44: c1.connectorapi.baton.v1.Task.GrantTask.duration:type_name -> google.protobuf.Duration - 43, // 45: c1.connectorapi.baton.v1.Task.RevokeTask.grant:type_name -> c1.connector.v2.Grant - 37, // 46: c1.connectorapi.baton.v1.Task.RevokeTask.annotations:type_name -> google.protobuf.Any - 44, // 47: c1.connectorapi.baton.v1.Task.CreateAccountTask.account_info:type_name -> c1.connector.v2.AccountInfo - 45, // 48: c1.connectorapi.baton.v1.Task.CreateAccountTask.credential_options:type_name -> c1.connector.v2.CredentialOptions - 46, // 49: c1.connectorapi.baton.v1.Task.CreateAccountTask.encryption_configs:type_name -> c1.connector.v2.EncryptionConfig - 42, // 50: c1.connectorapi.baton.v1.Task.CreateResourceTask.resource:type_name -> c1.connector.v2.Resource - 47, // 51: c1.connectorapi.baton.v1.Task.DeleteResourceTask.resource_id:type_name -> c1.connector.v2.ResourceId - 47, // 52: c1.connectorapi.baton.v1.Task.RotateCredentialsTask.resource_id:type_name -> c1.connector.v2.ResourceId - 45, // 53: c1.connectorapi.baton.v1.Task.RotateCredentialsTask.credential_options:type_name -> c1.connector.v2.CredentialOptions - 46, // 54: c1.connectorapi.baton.v1.Task.RotateCredentialsTask.encryption_configs:type_name -> c1.connector.v2.EncryptionConfig - 48, // 55: c1.connectorapi.baton.v1.Task.CreateTicketTask.ticket_request:type_name -> c1.connector.v2.TicketRequest - 49, // 56: c1.connectorapi.baton.v1.Task.CreateTicketTask.ticket_schema:type_name -> c1.connector.v2.TicketSchema - 37, // 57: c1.connectorapi.baton.v1.Task.CreateTicketTask.annotations:type_name -> google.protobuf.Any - 24, // 58: c1.connectorapi.baton.v1.Task.BulkCreateTicketsTask.ticket_requests:type_name -> c1.connectorapi.baton.v1.Task.CreateTicketTask - 28, // 59: c1.connectorapi.baton.v1.Task.BulkGetTicketsTask.ticket_requests:type_name -> c1.connectorapi.baton.v1.Task.GetTicketTask - 37, // 60: c1.connectorapi.baton.v1.Task.ListTicketSchemasTask.annotations:type_name -> google.protobuf.Any - 37, // 61: c1.connectorapi.baton.v1.Task.GetTicketTask.annotations:type_name -> google.protobuf.Any - 37, // 62: c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.UploadMetadata.annotations:type_name -> google.protobuf.Any - 37, // 63: c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.UploadEOF.annotations:type_name -> google.protobuf.Any - 37, // 64: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.Error.annotations:type_name -> google.protobuf.Any - 37, // 65: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.Error.response:type_name -> google.protobuf.Any - 37, // 66: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.Success.annotations:type_name -> google.protobuf.Any - 37, // 67: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.Success.response:type_name -> google.protobuf.Any - 2, // 68: c1.connectorapi.baton.v1.BatonService.Hello:input_type -> c1.connectorapi.baton.v1.BatonServiceHelloRequest - 4, // 69: c1.connectorapi.baton.v1.BatonService.GetTask:input_type -> c1.connectorapi.baton.v1.BatonServiceGetTaskRequest - 6, // 70: c1.connectorapi.baton.v1.BatonService.Heartbeat:input_type -> c1.connectorapi.baton.v1.BatonServiceHeartbeatRequest - 10, // 71: c1.connectorapi.baton.v1.BatonService.FinishTask:input_type -> c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest - 8, // 72: c1.connectorapi.baton.v1.BatonService.UploadAsset:input_type -> c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest - 12, // 73: c1.connectorapi.baton.v1.BatonService.StartDebugging:input_type -> c1.connectorapi.baton.v1.StartDebuggingRequest - 3, // 74: c1.connectorapi.baton.v1.BatonService.Hello:output_type -> c1.connectorapi.baton.v1.BatonServiceHelloResponse - 5, // 75: c1.connectorapi.baton.v1.BatonService.GetTask:output_type -> c1.connectorapi.baton.v1.BatonServiceGetTaskResponse - 7, // 76: c1.connectorapi.baton.v1.BatonService.Heartbeat:output_type -> c1.connectorapi.baton.v1.BatonServiceHeartbeatResponse - 11, // 77: c1.connectorapi.baton.v1.BatonService.FinishTask:output_type -> c1.connectorapi.baton.v1.BatonServiceFinishTaskResponse - 9, // 78: c1.connectorapi.baton.v1.BatonService.UploadAsset:output_type -> c1.connectorapi.baton.v1.BatonServiceUploadAssetResponse - 13, // 79: c1.connectorapi.baton.v1.BatonService.StartDebugging:output_type -> c1.connectorapi.baton.v1.StartDebuggingResponse - 74, // [74:80] is the sub-list for method output_type - 68, // [68:74] is the sub-list for method input_type - 68, // [68:68] is the sub-list for extension type_name - 68, // [68:68] is the sub-list for extension extendee - 0, // [0:68] is the sub-list for field type_name + 29, // 16: c1.connectorapi.baton.v1.Task.action_list_schemas:type_name -> c1.connectorapi.baton.v1.Task.ActionListSchemasTask + 30, // 17: c1.connectorapi.baton.v1.Task.action_get_schema:type_name -> c1.connectorapi.baton.v1.Task.ActionGetSchemaTask + 31, // 18: c1.connectorapi.baton.v1.Task.action_invoke:type_name -> c1.connectorapi.baton.v1.Task.ActionInvokeTask + 32, // 19: c1.connectorapi.baton.v1.Task.action_status:type_name -> c1.connectorapi.baton.v1.Task.ActionStatusTask + 33, // 20: c1.connectorapi.baton.v1.Task.create_sync_diff:type_name -> c1.connectorapi.baton.v1.Task.CreateSyncDiffTask + 34, // 21: c1.connectorapi.baton.v1.Task.compact_syncs:type_name -> c1.connectorapi.baton.v1.Task.CompactSyncs + 36, // 22: c1.connectorapi.baton.v1.BatonServiceHelloRequest.build_info:type_name -> c1.connectorapi.baton.v1.BatonServiceHelloRequest.BuildInfo + 37, // 23: c1.connectorapi.baton.v1.BatonServiceHelloRequest.os_info:type_name -> c1.connectorapi.baton.v1.BatonServiceHelloRequest.OSInfo + 43, // 24: c1.connectorapi.baton.v1.BatonServiceHelloRequest.connector_metadata:type_name -> c1.connector.v2.ConnectorMetadata + 44, // 25: c1.connectorapi.baton.v1.BatonServiceHelloRequest.annotations:type_name -> google.protobuf.Any + 44, // 26: c1.connectorapi.baton.v1.BatonServiceHelloResponse.annotations:type_name -> google.protobuf.Any + 1, // 27: c1.connectorapi.baton.v1.BatonServiceGetTaskResponse.task:type_name -> c1.connectorapi.baton.v1.Task + 45, // 28: c1.connectorapi.baton.v1.BatonServiceGetTaskResponse.next_poll:type_name -> google.protobuf.Duration + 45, // 29: c1.connectorapi.baton.v1.BatonServiceGetTaskResponse.next_heartbeat:type_name -> google.protobuf.Duration + 44, // 30: c1.connectorapi.baton.v1.BatonServiceGetTaskResponse.annotations:type_name -> google.protobuf.Any + 44, // 31: c1.connectorapi.baton.v1.BatonServiceHeartbeatRequest.annotations:type_name -> google.protobuf.Any + 45, // 32: c1.connectorapi.baton.v1.BatonServiceHeartbeatResponse.next_heartbeat:type_name -> google.protobuf.Duration + 44, // 33: c1.connectorapi.baton.v1.BatonServiceHeartbeatResponse.annotations:type_name -> google.protobuf.Any + 38, // 34: c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.metadata:type_name -> c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.UploadMetadata + 39, // 35: c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.data:type_name -> c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.UploadData + 40, // 36: c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.eof:type_name -> c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.UploadEOF + 44, // 37: c1.connectorapi.baton.v1.BatonServiceUploadAssetResponse.annotations:type_name -> google.protobuf.Any + 46, // 38: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.status:type_name -> google.rpc.Status + 41, // 39: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.error:type_name -> c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.Error + 42, // 40: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.success:type_name -> c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.Success + 44, // 41: c1.connectorapi.baton.v1.BatonServiceFinishTaskResponse.annotations:type_name -> google.protobuf.Any + 44, // 42: c1.connectorapi.baton.v1.Task.NoneTask.annotations:type_name -> google.protobuf.Any + 44, // 43: c1.connectorapi.baton.v1.Task.HelloTask.annotations:type_name -> google.protobuf.Any + 44, // 44: c1.connectorapi.baton.v1.Task.SyncFullTask.annotations:type_name -> google.protobuf.Any + 44, // 45: c1.connectorapi.baton.v1.Task.EventFeedTask.annotations:type_name -> google.protobuf.Any + 47, // 46: c1.connectorapi.baton.v1.Task.EventFeedTask.start_at:type_name -> google.protobuf.Timestamp + 48, // 47: c1.connectorapi.baton.v1.Task.GrantTask.entitlement:type_name -> c1.connector.v2.Entitlement + 49, // 48: c1.connectorapi.baton.v1.Task.GrantTask.principal:type_name -> c1.connector.v2.Resource + 44, // 49: c1.connectorapi.baton.v1.Task.GrantTask.annotations:type_name -> google.protobuf.Any + 45, // 50: c1.connectorapi.baton.v1.Task.GrantTask.duration:type_name -> google.protobuf.Duration + 50, // 51: c1.connectorapi.baton.v1.Task.RevokeTask.grant:type_name -> c1.connector.v2.Grant + 44, // 52: c1.connectorapi.baton.v1.Task.RevokeTask.annotations:type_name -> google.protobuf.Any + 51, // 53: c1.connectorapi.baton.v1.Task.CreateAccountTask.account_info:type_name -> c1.connector.v2.AccountInfo + 52, // 54: c1.connectorapi.baton.v1.Task.CreateAccountTask.credential_options:type_name -> c1.connector.v2.CredentialOptions + 53, // 55: c1.connectorapi.baton.v1.Task.CreateAccountTask.encryption_configs:type_name -> c1.connector.v2.EncryptionConfig + 49, // 56: c1.connectorapi.baton.v1.Task.CreateResourceTask.resource:type_name -> c1.connector.v2.Resource + 54, // 57: c1.connectorapi.baton.v1.Task.DeleteResourceTask.resource_id:type_name -> c1.connector.v2.ResourceId + 54, // 58: c1.connectorapi.baton.v1.Task.RotateCredentialsTask.resource_id:type_name -> c1.connector.v2.ResourceId + 52, // 59: c1.connectorapi.baton.v1.Task.RotateCredentialsTask.credential_options:type_name -> c1.connector.v2.CredentialOptions + 53, // 60: c1.connectorapi.baton.v1.Task.RotateCredentialsTask.encryption_configs:type_name -> c1.connector.v2.EncryptionConfig + 55, // 61: c1.connectorapi.baton.v1.Task.CreateTicketTask.ticket_request:type_name -> c1.connector.v2.TicketRequest + 56, // 62: c1.connectorapi.baton.v1.Task.CreateTicketTask.ticket_schema:type_name -> c1.connector.v2.TicketSchema + 44, // 63: c1.connectorapi.baton.v1.Task.CreateTicketTask.annotations:type_name -> google.protobuf.Any + 24, // 64: c1.connectorapi.baton.v1.Task.BulkCreateTicketsTask.ticket_requests:type_name -> c1.connectorapi.baton.v1.Task.CreateTicketTask + 28, // 65: c1.connectorapi.baton.v1.Task.BulkGetTicketsTask.ticket_requests:type_name -> c1.connectorapi.baton.v1.Task.GetTicketTask + 44, // 66: c1.connectorapi.baton.v1.Task.ListTicketSchemasTask.annotations:type_name -> google.protobuf.Any + 44, // 67: c1.connectorapi.baton.v1.Task.GetTicketTask.annotations:type_name -> google.protobuf.Any + 44, // 68: c1.connectorapi.baton.v1.Task.ActionListSchemasTask.annotations:type_name -> google.protobuf.Any + 44, // 69: c1.connectorapi.baton.v1.Task.ActionGetSchemaTask.annotations:type_name -> google.protobuf.Any + 57, // 70: c1.connectorapi.baton.v1.Task.ActionInvokeTask.args:type_name -> google.protobuf.Struct + 44, // 71: c1.connectorapi.baton.v1.Task.ActionInvokeTask.annotations:type_name -> google.protobuf.Any + 44, // 72: c1.connectorapi.baton.v1.Task.ActionStatusTask.annotations:type_name -> google.protobuf.Any + 44, // 73: c1.connectorapi.baton.v1.Task.CreateSyncDiffTask.annotations:type_name -> google.protobuf.Any + 35, // 74: c1.connectorapi.baton.v1.Task.CompactSyncs.compactable_syncs:type_name -> c1.connectorapi.baton.v1.Task.CompactSyncs.CompactableSync + 44, // 75: c1.connectorapi.baton.v1.Task.CompactSyncs.annotations:type_name -> google.protobuf.Any + 44, // 76: c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.UploadMetadata.annotations:type_name -> google.protobuf.Any + 44, // 77: c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest.UploadEOF.annotations:type_name -> google.protobuf.Any + 44, // 78: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.Error.annotations:type_name -> google.protobuf.Any + 44, // 79: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.Error.response:type_name -> google.protobuf.Any + 44, // 80: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.Success.annotations:type_name -> google.protobuf.Any + 44, // 81: c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest.Success.response:type_name -> google.protobuf.Any + 2, // 82: c1.connectorapi.baton.v1.BatonService.Hello:input_type -> c1.connectorapi.baton.v1.BatonServiceHelloRequest + 4, // 83: c1.connectorapi.baton.v1.BatonService.GetTask:input_type -> c1.connectorapi.baton.v1.BatonServiceGetTaskRequest + 6, // 84: c1.connectorapi.baton.v1.BatonService.Heartbeat:input_type -> c1.connectorapi.baton.v1.BatonServiceHeartbeatRequest + 10, // 85: c1.connectorapi.baton.v1.BatonService.FinishTask:input_type -> c1.connectorapi.baton.v1.BatonServiceFinishTaskRequest + 8, // 86: c1.connectorapi.baton.v1.BatonService.UploadAsset:input_type -> c1.connectorapi.baton.v1.BatonServiceUploadAssetRequest + 12, // 87: c1.connectorapi.baton.v1.BatonService.StartDebugging:input_type -> c1.connectorapi.baton.v1.StartDebuggingRequest + 3, // 88: c1.connectorapi.baton.v1.BatonService.Hello:output_type -> c1.connectorapi.baton.v1.BatonServiceHelloResponse + 5, // 89: c1.connectorapi.baton.v1.BatonService.GetTask:output_type -> c1.connectorapi.baton.v1.BatonServiceGetTaskResponse + 7, // 90: c1.connectorapi.baton.v1.BatonService.Heartbeat:output_type -> c1.connectorapi.baton.v1.BatonServiceHeartbeatResponse + 11, // 91: c1.connectorapi.baton.v1.BatonService.FinishTask:output_type -> c1.connectorapi.baton.v1.BatonServiceFinishTaskResponse + 9, // 92: c1.connectorapi.baton.v1.BatonService.UploadAsset:output_type -> c1.connectorapi.baton.v1.BatonServiceUploadAssetResponse + 13, // 93: c1.connectorapi.baton.v1.BatonService.StartDebugging:output_type -> c1.connectorapi.baton.v1.StartDebuggingResponse + 88, // [88:94] is the sub-list for method output_type + 82, // [82:88] is the sub-list for method input_type + 82, // [82:82] is the sub-list for extension type_name + 82, // [82:82] is the sub-list for extension extendee + 0, // [0:82] is the sub-list for field type_name } func init() { file_c1_connectorapi_baton_v1_baton_proto_init() } @@ -3003,6 +3591,12 @@ func file_c1_connectorapi_baton_v1_baton_proto_init() { (*Task_GetTicket)(nil), (*Task_BulkCreateTickets)(nil), (*Task_BulkGetTickets)(nil), + (*Task_ActionListSchemas)(nil), + (*Task_ActionGetSchema)(nil), + (*Task_ActionInvoke)(nil), + (*Task_ActionStatus)(nil), + (*Task_CreateSyncDiff)(nil), + (*Task_CompactSyncs_)(nil), } file_c1_connectorapi_baton_v1_baton_proto_msgTypes[7].OneofWrappers = []any{ (*BatonServiceUploadAssetRequest_Metadata)(nil), @@ -3019,7 +3613,7 @@ func file_c1_connectorapi_baton_v1_baton_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_connectorapi_baton_v1_baton_proto_rawDesc), len(file_c1_connectorapi_baton_v1_baton_proto_rawDesc)), NumEnums: 1, - NumMessages: 35, + NumMessages: 42, NumExtensions: 0, NumServices: 1, }, diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1/baton.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1/baton.pb.validate.go index 032629e0..15741a2a 100644 --- a/vendor/github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1/baton.pb.validate.go +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1/baton.pb.validate.go @@ -678,6 +678,252 @@ func (m *Task) validate(all bool) error { } } + case *Task_ActionListSchemas: + if v == nil { + err := TaskValidationError{ + field: "TaskType", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetActionListSchemas()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TaskValidationError{ + field: "ActionListSchemas", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TaskValidationError{ + field: "ActionListSchemas", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetActionListSchemas()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TaskValidationError{ + field: "ActionListSchemas", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *Task_ActionGetSchema: + if v == nil { + err := TaskValidationError{ + field: "TaskType", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetActionGetSchema()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TaskValidationError{ + field: "ActionGetSchema", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TaskValidationError{ + field: "ActionGetSchema", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetActionGetSchema()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TaskValidationError{ + field: "ActionGetSchema", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *Task_ActionInvoke: + if v == nil { + err := TaskValidationError{ + field: "TaskType", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetActionInvoke()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TaskValidationError{ + field: "ActionInvoke", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TaskValidationError{ + field: "ActionInvoke", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetActionInvoke()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TaskValidationError{ + field: "ActionInvoke", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *Task_ActionStatus: + if v == nil { + err := TaskValidationError{ + field: "TaskType", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetActionStatus()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TaskValidationError{ + field: "ActionStatus", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TaskValidationError{ + field: "ActionStatus", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetActionStatus()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TaskValidationError{ + field: "ActionStatus", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *Task_CreateSyncDiff: + if v == nil { + err := TaskValidationError{ + field: "TaskType", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetCreateSyncDiff()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TaskValidationError{ + field: "CreateSyncDiff", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TaskValidationError{ + field: "CreateSyncDiff", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCreateSyncDiff()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TaskValidationError{ + field: "CreateSyncDiff", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *Task_CompactSyncs_: + if v == nil { + err := TaskValidationError{ + field: "TaskType", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetCompactSyncs()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TaskValidationError{ + field: "CompactSyncs", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TaskValidationError{ + field: "CompactSyncs", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCompactSyncs()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TaskValidationError{ + field: "CompactSyncs", + reason: "embedded message failed validation", + cause: err, + } + } + } + default: _ = v // ensures v is used } @@ -5187,6 +5433,1006 @@ var _ interface { ErrorName() string } = Task_GetTicketTaskValidationError{} +// Validate checks the field values on Task_ActionListSchemasTask with the +// rules defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *Task_ActionListSchemasTask) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Task_ActionListSchemasTask with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// Task_ActionListSchemasTaskMultiError, or nil if none found. +func (m *Task_ActionListSchemasTask) ValidateAll() error { + return m.validate(true) +} + +func (m *Task_ActionListSchemasTask) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetAnnotations() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Task_ActionListSchemasTaskValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Task_ActionListSchemasTaskValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Task_ActionListSchemasTaskValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return Task_ActionListSchemasTaskMultiError(errors) + } + + return nil +} + +// Task_ActionListSchemasTaskMultiError is an error wrapping multiple +// validation errors returned by Task_ActionListSchemasTask.ValidateAll() if +// the designated constraints aren't met. +type Task_ActionListSchemasTaskMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Task_ActionListSchemasTaskMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Task_ActionListSchemasTaskMultiError) AllErrors() []error { return m } + +// Task_ActionListSchemasTaskValidationError is the validation error returned +// by Task_ActionListSchemasTask.Validate if the designated constraints aren't met. +type Task_ActionListSchemasTaskValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Task_ActionListSchemasTaskValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Task_ActionListSchemasTaskValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Task_ActionListSchemasTaskValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Task_ActionListSchemasTaskValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Task_ActionListSchemasTaskValidationError) ErrorName() string { + return "Task_ActionListSchemasTaskValidationError" +} + +// Error satisfies the builtin error interface +func (e Task_ActionListSchemasTaskValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sTask_ActionListSchemasTask.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Task_ActionListSchemasTaskValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Task_ActionListSchemasTaskValidationError{} + +// Validate checks the field values on Task_ActionGetSchemaTask with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *Task_ActionGetSchemaTask) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Task_ActionGetSchemaTask with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// Task_ActionGetSchemaTaskMultiError, or nil if none found. +func (m *Task_ActionGetSchemaTask) ValidateAll() error { + return m.validate(true) +} + +func (m *Task_ActionGetSchemaTask) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Name + + for idx, item := range m.GetAnnotations() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Task_ActionGetSchemaTaskValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Task_ActionGetSchemaTaskValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Task_ActionGetSchemaTaskValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return Task_ActionGetSchemaTaskMultiError(errors) + } + + return nil +} + +// Task_ActionGetSchemaTaskMultiError is an error wrapping multiple validation +// errors returned by Task_ActionGetSchemaTask.ValidateAll() if the designated +// constraints aren't met. +type Task_ActionGetSchemaTaskMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Task_ActionGetSchemaTaskMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Task_ActionGetSchemaTaskMultiError) AllErrors() []error { return m } + +// Task_ActionGetSchemaTaskValidationError is the validation error returned by +// Task_ActionGetSchemaTask.Validate if the designated constraints aren't met. +type Task_ActionGetSchemaTaskValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Task_ActionGetSchemaTaskValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Task_ActionGetSchemaTaskValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Task_ActionGetSchemaTaskValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Task_ActionGetSchemaTaskValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Task_ActionGetSchemaTaskValidationError) ErrorName() string { + return "Task_ActionGetSchemaTaskValidationError" +} + +// Error satisfies the builtin error interface +func (e Task_ActionGetSchemaTaskValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sTask_ActionGetSchemaTask.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Task_ActionGetSchemaTaskValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Task_ActionGetSchemaTaskValidationError{} + +// Validate checks the field values on Task_ActionInvokeTask with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *Task_ActionInvokeTask) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Task_ActionInvokeTask with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// Task_ActionInvokeTaskMultiError, or nil if none found. +func (m *Task_ActionInvokeTask) ValidateAll() error { + return m.validate(true) +} + +func (m *Task_ActionInvokeTask) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Name + + if all { + switch v := interface{}(m.GetArgs()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Task_ActionInvokeTaskValidationError{ + field: "Args", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Task_ActionInvokeTaskValidationError{ + field: "Args", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetArgs()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Task_ActionInvokeTaskValidationError{ + field: "Args", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for idx, item := range m.GetAnnotations() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Task_ActionInvokeTaskValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Task_ActionInvokeTaskValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Task_ActionInvokeTaskValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return Task_ActionInvokeTaskMultiError(errors) + } + + return nil +} + +// Task_ActionInvokeTaskMultiError is an error wrapping multiple validation +// errors returned by Task_ActionInvokeTask.ValidateAll() if the designated +// constraints aren't met. +type Task_ActionInvokeTaskMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Task_ActionInvokeTaskMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Task_ActionInvokeTaskMultiError) AllErrors() []error { return m } + +// Task_ActionInvokeTaskValidationError is the validation error returned by +// Task_ActionInvokeTask.Validate if the designated constraints aren't met. +type Task_ActionInvokeTaskValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Task_ActionInvokeTaskValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Task_ActionInvokeTaskValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Task_ActionInvokeTaskValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Task_ActionInvokeTaskValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Task_ActionInvokeTaskValidationError) ErrorName() string { + return "Task_ActionInvokeTaskValidationError" +} + +// Error satisfies the builtin error interface +func (e Task_ActionInvokeTaskValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sTask_ActionInvokeTask.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Task_ActionInvokeTaskValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Task_ActionInvokeTaskValidationError{} + +// Validate checks the field values on Task_ActionStatusTask with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *Task_ActionStatusTask) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Task_ActionStatusTask with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// Task_ActionStatusTaskMultiError, or nil if none found. +func (m *Task_ActionStatusTask) ValidateAll() error { + return m.validate(true) +} + +func (m *Task_ActionStatusTask) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Name + + // no validation rules for Id + + for idx, item := range m.GetAnnotations() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Task_ActionStatusTaskValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Task_ActionStatusTaskValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Task_ActionStatusTaskValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return Task_ActionStatusTaskMultiError(errors) + } + + return nil +} + +// Task_ActionStatusTaskMultiError is an error wrapping multiple validation +// errors returned by Task_ActionStatusTask.ValidateAll() if the designated +// constraints aren't met. +type Task_ActionStatusTaskMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Task_ActionStatusTaskMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Task_ActionStatusTaskMultiError) AllErrors() []error { return m } + +// Task_ActionStatusTaskValidationError is the validation error returned by +// Task_ActionStatusTask.Validate if the designated constraints aren't met. +type Task_ActionStatusTaskValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Task_ActionStatusTaskValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Task_ActionStatusTaskValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Task_ActionStatusTaskValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Task_ActionStatusTaskValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Task_ActionStatusTaskValidationError) ErrorName() string { + return "Task_ActionStatusTaskValidationError" +} + +// Error satisfies the builtin error interface +func (e Task_ActionStatusTaskValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sTask_ActionStatusTask.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Task_ActionStatusTaskValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Task_ActionStatusTaskValidationError{} + +// Validate checks the field values on Task_CreateSyncDiffTask with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *Task_CreateSyncDiffTask) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Task_CreateSyncDiffTask with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// Task_CreateSyncDiffTaskMultiError, or nil if none found. +func (m *Task_CreateSyncDiffTask) ValidateAll() error { + return m.validate(true) +} + +func (m *Task_CreateSyncDiffTask) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for BaseSyncId + + // no validation rules for NewSyncId + + for idx, item := range m.GetAnnotations() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Task_CreateSyncDiffTaskValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Task_CreateSyncDiffTaskValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Task_CreateSyncDiffTaskValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return Task_CreateSyncDiffTaskMultiError(errors) + } + + return nil +} + +// Task_CreateSyncDiffTaskMultiError is an error wrapping multiple validation +// errors returned by Task_CreateSyncDiffTask.ValidateAll() if the designated +// constraints aren't met. +type Task_CreateSyncDiffTaskMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Task_CreateSyncDiffTaskMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Task_CreateSyncDiffTaskMultiError) AllErrors() []error { return m } + +// Task_CreateSyncDiffTaskValidationError is the validation error returned by +// Task_CreateSyncDiffTask.Validate if the designated constraints aren't met. +type Task_CreateSyncDiffTaskValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Task_CreateSyncDiffTaskValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Task_CreateSyncDiffTaskValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Task_CreateSyncDiffTaskValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Task_CreateSyncDiffTaskValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Task_CreateSyncDiffTaskValidationError) ErrorName() string { + return "Task_CreateSyncDiffTaskValidationError" +} + +// Error satisfies the builtin error interface +func (e Task_CreateSyncDiffTaskValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sTask_CreateSyncDiffTask.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Task_CreateSyncDiffTaskValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Task_CreateSyncDiffTaskValidationError{} + +// Validate checks the field values on Task_CompactSyncs with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *Task_CompactSyncs) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Task_CompactSyncs with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// Task_CompactSyncsMultiError, or nil if none found. +func (m *Task_CompactSyncs) ValidateAll() error { + return m.validate(true) +} + +func (m *Task_CompactSyncs) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetCompactableSyncs() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Task_CompactSyncsValidationError{ + field: fmt.Sprintf("CompactableSyncs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Task_CompactSyncsValidationError{ + field: fmt.Sprintf("CompactableSyncs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Task_CompactSyncsValidationError{ + field: fmt.Sprintf("CompactableSyncs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for idx, item := range m.GetAnnotations() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Task_CompactSyncsValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Task_CompactSyncsValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Task_CompactSyncsValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return Task_CompactSyncsMultiError(errors) + } + + return nil +} + +// Task_CompactSyncsMultiError is an error wrapping multiple validation errors +// returned by Task_CompactSyncs.ValidateAll() if the designated constraints +// aren't met. +type Task_CompactSyncsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Task_CompactSyncsMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Task_CompactSyncsMultiError) AllErrors() []error { return m } + +// Task_CompactSyncsValidationError is the validation error returned by +// Task_CompactSyncs.Validate if the designated constraints aren't met. +type Task_CompactSyncsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Task_CompactSyncsValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Task_CompactSyncsValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Task_CompactSyncsValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Task_CompactSyncsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Task_CompactSyncsValidationError) ErrorName() string { + return "Task_CompactSyncsValidationError" +} + +// Error satisfies the builtin error interface +func (e Task_CompactSyncsValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sTask_CompactSyncs.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Task_CompactSyncsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Task_CompactSyncsValidationError{} + +// Validate checks the field values on Task_CompactSyncs_CompactableSync with +// the rules defined in the proto definition for this message. If any rules +// are violated, the first error encountered is returned, or nil if there are +// no violations. +func (m *Task_CompactSyncs_CompactableSync) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Task_CompactSyncs_CompactableSync +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// Task_CompactSyncs_CompactableSyncMultiError, or nil if none found. +func (m *Task_CompactSyncs_CompactableSync) ValidateAll() error { + return m.validate(true) +} + +func (m *Task_CompactSyncs_CompactableSync) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for FilePath + + // no validation rules for SyncId + + if len(errors) > 0 { + return Task_CompactSyncs_CompactableSyncMultiError(errors) + } + + return nil +} + +// Task_CompactSyncs_CompactableSyncMultiError is an error wrapping multiple +// validation errors returned by +// Task_CompactSyncs_CompactableSync.ValidateAll() if the designated +// constraints aren't met. +type Task_CompactSyncs_CompactableSyncMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Task_CompactSyncs_CompactableSyncMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Task_CompactSyncs_CompactableSyncMultiError) AllErrors() []error { return m } + +// Task_CompactSyncs_CompactableSyncValidationError is the validation error +// returned by Task_CompactSyncs_CompactableSync.Validate if the designated +// constraints aren't met. +type Task_CompactSyncs_CompactableSyncValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Task_CompactSyncs_CompactableSyncValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Task_CompactSyncs_CompactableSyncValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Task_CompactSyncs_CompactableSyncValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Task_CompactSyncs_CompactableSyncValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Task_CompactSyncs_CompactableSyncValidationError) ErrorName() string { + return "Task_CompactSyncs_CompactableSyncValidationError" +} + +// Error satisfies the builtin error interface +func (e Task_CompactSyncs_CompactableSyncValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sTask_CompactSyncs_CompactableSync.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Task_CompactSyncs_CompactableSyncValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Task_CompactSyncs_CompactableSyncValidationError{} + // Validate checks the field values on BatonServiceHelloRequest_BuildInfo with // the rules defined in the proto definition for this message. If any rules // are violated, the first error encountered is returned, or nil if there are diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1/config.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1/config.pb.go new file mode 100644 index 00000000..ccf3c296 --- /dev/null +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1/config.pb.go @@ -0,0 +1,336 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.4 +// protoc (unknown) +// source: c1/connectorapi/baton/v1/config.proto + +package v1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetConnectorConfigRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetConnectorConfigRequest) Reset() { + *x = GetConnectorConfigRequest{} + mi := &file_c1_connectorapi_baton_v1_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetConnectorConfigRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetConnectorConfigRequest) ProtoMessage() {} + +func (x *GetConnectorConfigRequest) ProtoReflect() protoreflect.Message { + mi := &file_c1_connectorapi_baton_v1_config_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetConnectorConfigRequest.ProtoReflect.Descriptor instead. +func (*GetConnectorConfigRequest) Descriptor() ([]byte, []int) { + return file_c1_connectorapi_baton_v1_config_proto_rawDescGZIP(), []int{0} +} + +type GetConnectorConfigResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Config []byte `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` + LastUpdated *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetConnectorConfigResponse) Reset() { + *x = GetConnectorConfigResponse{} + mi := &file_c1_connectorapi_baton_v1_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetConnectorConfigResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetConnectorConfigResponse) ProtoMessage() {} + +func (x *GetConnectorConfigResponse) ProtoReflect() protoreflect.Message { + mi := &file_c1_connectorapi_baton_v1_config_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetConnectorConfigResponse.ProtoReflect.Descriptor instead. +func (*GetConnectorConfigResponse) Descriptor() ([]byte, []int) { + return file_c1_connectorapi_baton_v1_config_proto_rawDescGZIP(), []int{1} +} + +func (x *GetConnectorConfigResponse) GetConfig() []byte { + if x != nil { + return x.Config + } + return nil +} + +func (x *GetConnectorConfigResponse) GetLastUpdated() *timestamppb.Timestamp { + if x != nil { + return x.LastUpdated + } + return nil +} + +type SignedHeader struct { + state protoimpl.MessageState `protogen:"open.v1"` + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Value []string `protobuf:"bytes,2,rep,name=value,proto3" json:"value,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SignedHeader) Reset() { + *x = SignedHeader{} + mi := &file_c1_connectorapi_baton_v1_config_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SignedHeader) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SignedHeader) ProtoMessage() {} + +func (x *SignedHeader) ProtoReflect() protoreflect.Message { + mi := &file_c1_connectorapi_baton_v1_config_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SignedHeader.ProtoReflect.Descriptor instead. +func (*SignedHeader) Descriptor() ([]byte, []int) { + return file_c1_connectorapi_baton_v1_config_proto_rawDescGZIP(), []int{2} +} + +func (x *SignedHeader) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *SignedHeader) GetValue() []string { + if x != nil { + return x.Value + } + return nil +} + +type Sigv4SignedRequestSTSGetCallerIdentity struct { + state protoimpl.MessageState `protogen:"open.v1"` + Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"` + Endpoint string `protobuf:"bytes,2,opt,name=endpoint,proto3" json:"endpoint,omitempty"` + Headers []*SignedHeader `protobuf:"bytes,3,rep,name=headers,proto3" json:"headers,omitempty"` + Body []byte `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Sigv4SignedRequestSTSGetCallerIdentity) Reset() { + *x = Sigv4SignedRequestSTSGetCallerIdentity{} + mi := &file_c1_connectorapi_baton_v1_config_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Sigv4SignedRequestSTSGetCallerIdentity) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Sigv4SignedRequestSTSGetCallerIdentity) ProtoMessage() {} + +func (x *Sigv4SignedRequestSTSGetCallerIdentity) ProtoReflect() protoreflect.Message { + mi := &file_c1_connectorapi_baton_v1_config_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Sigv4SignedRequestSTSGetCallerIdentity.ProtoReflect.Descriptor instead. +func (*Sigv4SignedRequestSTSGetCallerIdentity) Descriptor() ([]byte, []int) { + return file_c1_connectorapi_baton_v1_config_proto_rawDescGZIP(), []int{3} +} + +func (x *Sigv4SignedRequestSTSGetCallerIdentity) GetMethod() string { + if x != nil { + return x.Method + } + return "" +} + +func (x *Sigv4SignedRequestSTSGetCallerIdentity) GetEndpoint() string { + if x != nil { + return x.Endpoint + } + return "" +} + +func (x *Sigv4SignedRequestSTSGetCallerIdentity) GetHeaders() []*SignedHeader { + if x != nil { + return x.Headers + } + return nil +} + +func (x *Sigv4SignedRequestSTSGetCallerIdentity) GetBody() []byte { + if x != nil { + return x.Body + } + return nil +} + +var File_c1_connectorapi_baton_v1_config_proto protoreflect.FileDescriptor + +var file_c1_connectorapi_baton_v1_config_proto_rawDesc = string([]byte{ + 0x0a, 0x25, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, + 0x69, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, + 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0x1b, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, + 0x73, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, + 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3d, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x64, 0x22, 0x36, 0x0a, 0x0c, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xb2, 0x01, 0x0a, + 0x26, 0x53, 0x69, 0x67, 0x76, 0x34, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x53, 0x54, 0x53, 0x47, 0x65, 0x74, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x49, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, + 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x40, 0x0a, 0x07, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, + 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, + 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x12, 0x0a, + 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x62, 0x6f, 0x64, + 0x79, 0x32, 0x99, 0x01, 0x0a, 0x16, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7f, 0x0a, 0x12, + 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x33, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x37, 0x5a, + 0x35, 0x67, 0x69, 0x74, 0x6c, 0x61, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x75, 0x63, 0x74, + 0x6f, 0x6e, 0x65, 0x2f, 0x63, 0x31, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, + 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, + 0x74, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +}) + +var ( + file_c1_connectorapi_baton_v1_config_proto_rawDescOnce sync.Once + file_c1_connectorapi_baton_v1_config_proto_rawDescData []byte +) + +func file_c1_connectorapi_baton_v1_config_proto_rawDescGZIP() []byte { + file_c1_connectorapi_baton_v1_config_proto_rawDescOnce.Do(func() { + file_c1_connectorapi_baton_v1_config_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_c1_connectorapi_baton_v1_config_proto_rawDesc), len(file_c1_connectorapi_baton_v1_config_proto_rawDesc))) + }) + return file_c1_connectorapi_baton_v1_config_proto_rawDescData +} + +var file_c1_connectorapi_baton_v1_config_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_c1_connectorapi_baton_v1_config_proto_goTypes = []any{ + (*GetConnectorConfigRequest)(nil), // 0: c1.connectorapi.baton.v1.GetConnectorConfigRequest + (*GetConnectorConfigResponse)(nil), // 1: c1.connectorapi.baton.v1.GetConnectorConfigResponse + (*SignedHeader)(nil), // 2: c1.connectorapi.baton.v1.SignedHeader + (*Sigv4SignedRequestSTSGetCallerIdentity)(nil), // 3: c1.connectorapi.baton.v1.Sigv4SignedRequestSTSGetCallerIdentity + (*timestamppb.Timestamp)(nil), // 4: google.protobuf.Timestamp +} +var file_c1_connectorapi_baton_v1_config_proto_depIdxs = []int32{ + 4, // 0: c1.connectorapi.baton.v1.GetConnectorConfigResponse.last_updated:type_name -> google.protobuf.Timestamp + 2, // 1: c1.connectorapi.baton.v1.Sigv4SignedRequestSTSGetCallerIdentity.headers:type_name -> c1.connectorapi.baton.v1.SignedHeader + 0, // 2: c1.connectorapi.baton.v1.ConnectorConfigService.GetConnectorConfig:input_type -> c1.connectorapi.baton.v1.GetConnectorConfigRequest + 1, // 3: c1.connectorapi.baton.v1.ConnectorConfigService.GetConnectorConfig:output_type -> c1.connectorapi.baton.v1.GetConnectorConfigResponse + 3, // [3:4] is the sub-list for method output_type + 2, // [2:3] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_c1_connectorapi_baton_v1_config_proto_init() } +func file_c1_connectorapi_baton_v1_config_proto_init() { + if File_c1_connectorapi_baton_v1_config_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_connectorapi_baton_v1_config_proto_rawDesc), len(file_c1_connectorapi_baton_v1_config_proto_rawDesc)), + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_c1_connectorapi_baton_v1_config_proto_goTypes, + DependencyIndexes: file_c1_connectorapi_baton_v1_config_proto_depIdxs, + MessageInfos: file_c1_connectorapi_baton_v1_config_proto_msgTypes, + }.Build() + File_c1_connectorapi_baton_v1_config_proto = out.File + file_c1_connectorapi_baton_v1_config_proto_goTypes = nil + file_c1_connectorapi_baton_v1_config_proto_depIdxs = nil +} diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1/config.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1/config.pb.validate.go new file mode 100644 index 00000000..ee2b6ec2 --- /dev/null +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1/config.pb.validate.go @@ -0,0 +1,518 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: c1/connectorapi/baton/v1/config.proto + +package v1 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on GetConnectorConfigRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *GetConnectorConfigRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GetConnectorConfigRequest with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// GetConnectorConfigRequestMultiError, or nil if none found. +func (m *GetConnectorConfigRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *GetConnectorConfigRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return GetConnectorConfigRequestMultiError(errors) + } + + return nil +} + +// GetConnectorConfigRequestMultiError is an error wrapping multiple validation +// errors returned by GetConnectorConfigRequest.ValidateAll() if the +// designated constraints aren't met. +type GetConnectorConfigRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GetConnectorConfigRequestMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GetConnectorConfigRequestMultiError) AllErrors() []error { return m } + +// GetConnectorConfigRequestValidationError is the validation error returned by +// GetConnectorConfigRequest.Validate if the designated constraints aren't met. +type GetConnectorConfigRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e GetConnectorConfigRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e GetConnectorConfigRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e GetConnectorConfigRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e GetConnectorConfigRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e GetConnectorConfigRequestValidationError) ErrorName() string { + return "GetConnectorConfigRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e GetConnectorConfigRequestValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sGetConnectorConfigRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = GetConnectorConfigRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = GetConnectorConfigRequestValidationError{} + +// Validate checks the field values on GetConnectorConfigResponse with the +// rules defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *GetConnectorConfigResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GetConnectorConfigResponse with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// GetConnectorConfigResponseMultiError, or nil if none found. +func (m *GetConnectorConfigResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *GetConnectorConfigResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Config + + if all { + switch v := interface{}(m.GetLastUpdated()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GetConnectorConfigResponseValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GetConnectorConfigResponseValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return GetConnectorConfigResponseValidationError{ + field: "LastUpdated", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return GetConnectorConfigResponseMultiError(errors) + } + + return nil +} + +// GetConnectorConfigResponseMultiError is an error wrapping multiple +// validation errors returned by GetConnectorConfigResponse.ValidateAll() if +// the designated constraints aren't met. +type GetConnectorConfigResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GetConnectorConfigResponseMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GetConnectorConfigResponseMultiError) AllErrors() []error { return m } + +// GetConnectorConfigResponseValidationError is the validation error returned +// by GetConnectorConfigResponse.Validate if the designated constraints aren't met. +type GetConnectorConfigResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e GetConnectorConfigResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e GetConnectorConfigResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e GetConnectorConfigResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e GetConnectorConfigResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e GetConnectorConfigResponseValidationError) ErrorName() string { + return "GetConnectorConfigResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e GetConnectorConfigResponseValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sGetConnectorConfigResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = GetConnectorConfigResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = GetConnectorConfigResponseValidationError{} + +// Validate checks the field values on SignedHeader with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *SignedHeader) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SignedHeader with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in SignedHeaderMultiError, or +// nil if none found. +func (m *SignedHeader) ValidateAll() error { + return m.validate(true) +} + +func (m *SignedHeader) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Key + + if len(errors) > 0 { + return SignedHeaderMultiError(errors) + } + + return nil +} + +// SignedHeaderMultiError is an error wrapping multiple validation errors +// returned by SignedHeader.ValidateAll() if the designated constraints aren't met. +type SignedHeaderMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SignedHeaderMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SignedHeaderMultiError) AllErrors() []error { return m } + +// SignedHeaderValidationError is the validation error returned by +// SignedHeader.Validate if the designated constraints aren't met. +type SignedHeaderValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SignedHeaderValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SignedHeaderValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SignedHeaderValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SignedHeaderValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SignedHeaderValidationError) ErrorName() string { return "SignedHeaderValidationError" } + +// Error satisfies the builtin error interface +func (e SignedHeaderValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sSignedHeader.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SignedHeaderValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SignedHeaderValidationError{} + +// Validate checks the field values on Sigv4SignedRequestSTSGetCallerIdentity +// with the rules defined in the proto definition for this message. If any +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. +func (m *Sigv4SignedRequestSTSGetCallerIdentity) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// Sigv4SignedRequestSTSGetCallerIdentity with the rules defined in the proto +// definition for this message. If any rules are violated, the result is a +// list of violation errors wrapped in +// Sigv4SignedRequestSTSGetCallerIdentityMultiError, or nil if none found. +func (m *Sigv4SignedRequestSTSGetCallerIdentity) ValidateAll() error { + return m.validate(true) +} + +func (m *Sigv4SignedRequestSTSGetCallerIdentity) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Method + + // no validation rules for Endpoint + + for idx, item := range m.GetHeaders() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, Sigv4SignedRequestSTSGetCallerIdentityValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, Sigv4SignedRequestSTSGetCallerIdentityValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return Sigv4SignedRequestSTSGetCallerIdentityValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + // no validation rules for Body + + if len(errors) > 0 { + return Sigv4SignedRequestSTSGetCallerIdentityMultiError(errors) + } + + return nil +} + +// Sigv4SignedRequestSTSGetCallerIdentityMultiError is an error wrapping +// multiple validation errors returned by +// Sigv4SignedRequestSTSGetCallerIdentity.ValidateAll() if the designated +// constraints aren't met. +type Sigv4SignedRequestSTSGetCallerIdentityMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Sigv4SignedRequestSTSGetCallerIdentityMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Sigv4SignedRequestSTSGetCallerIdentityMultiError) AllErrors() []error { return m } + +// Sigv4SignedRequestSTSGetCallerIdentityValidationError is the validation +// error returned by Sigv4SignedRequestSTSGetCallerIdentity.Validate if the +// designated constraints aren't met. +type Sigv4SignedRequestSTSGetCallerIdentityValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Sigv4SignedRequestSTSGetCallerIdentityValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Sigv4SignedRequestSTSGetCallerIdentityValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Sigv4SignedRequestSTSGetCallerIdentityValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Sigv4SignedRequestSTSGetCallerIdentityValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Sigv4SignedRequestSTSGetCallerIdentityValidationError) ErrorName() string { + return "Sigv4SignedRequestSTSGetCallerIdentityValidationError" +} + +// Error satisfies the builtin error interface +func (e Sigv4SignedRequestSTSGetCallerIdentityValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sSigv4SignedRequestSTSGetCallerIdentity.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Sigv4SignedRequestSTSGetCallerIdentityValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Sigv4SignedRequestSTSGetCallerIdentityValidationError{} diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1/config_grpc.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1/config_grpc.pb.go new file mode 100644 index 00000000..985a23de --- /dev/null +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/connectorapi/baton/v1/config_grpc.pb.go @@ -0,0 +1,119 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc (unknown) +// source: c1/connectorapi/baton/v1/config.proto + +package v1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + ConnectorConfigService_GetConnectorConfig_FullMethodName = "/c1.connectorapi.baton.v1.ConnectorConfigService/GetConnectorConfig" +) + +// ConnectorConfigServiceClient is the client API for ConnectorConfigService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type ConnectorConfigServiceClient interface { + GetConnectorConfig(ctx context.Context, in *GetConnectorConfigRequest, opts ...grpc.CallOption) (*GetConnectorConfigResponse, error) +} + +type connectorConfigServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewConnectorConfigServiceClient(cc grpc.ClientConnInterface) ConnectorConfigServiceClient { + return &connectorConfigServiceClient{cc} +} + +func (c *connectorConfigServiceClient) GetConnectorConfig(ctx context.Context, in *GetConnectorConfigRequest, opts ...grpc.CallOption) (*GetConnectorConfigResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetConnectorConfigResponse) + err := c.cc.Invoke(ctx, ConnectorConfigService_GetConnectorConfig_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ConnectorConfigServiceServer is the server API for ConnectorConfigService service. +// All implementations should embed UnimplementedConnectorConfigServiceServer +// for forward compatibility. +type ConnectorConfigServiceServer interface { + GetConnectorConfig(context.Context, *GetConnectorConfigRequest) (*GetConnectorConfigResponse, error) +} + +// UnimplementedConnectorConfigServiceServer should be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedConnectorConfigServiceServer struct{} + +func (UnimplementedConnectorConfigServiceServer) GetConnectorConfig(context.Context, *GetConnectorConfigRequest) (*GetConnectorConfigResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetConnectorConfig not implemented") +} +func (UnimplementedConnectorConfigServiceServer) testEmbeddedByValue() {} + +// UnsafeConnectorConfigServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ConnectorConfigServiceServer will +// result in compilation errors. +type UnsafeConnectorConfigServiceServer interface { + mustEmbedUnimplementedConnectorConfigServiceServer() +} + +func RegisterConnectorConfigServiceServer(s grpc.ServiceRegistrar, srv ConnectorConfigServiceServer) { + // If the following call pancis, it indicates UnimplementedConnectorConfigServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&ConnectorConfigService_ServiceDesc, srv) +} + +func _ConnectorConfigService_GetConnectorConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetConnectorConfigRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConnectorConfigServiceServer).GetConnectorConfig(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ConnectorConfigService_GetConnectorConfig_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConnectorConfigServiceServer).GetConnectorConfig(ctx, req.(*GetConnectorConfigRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ConnectorConfigService_ServiceDesc is the grpc.ServiceDesc for ConnectorConfigService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ConnectorConfigService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "c1.connectorapi.baton.v1.ConnectorConfigService", + HandlerType: (*ConnectorConfigServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetConnectorConfig", + Handler: _ConnectorConfigService_GetConnectorConfig_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "c1/connectorapi/baton/v1/config.proto", +} diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/entitlement.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/entitlement.pb.go index 846f0ca7..1cf92ff9 100644 --- a/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/entitlement.pb.go +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/entitlement.pb.go @@ -11,6 +11,7 @@ import ( _ "github.com/envoyproxy/protoc-gen-validate/validate" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + anypb "google.golang.org/protobuf/types/known/anypb" reflect "reflect" sync "sync" unsafe "unsafe" @@ -26,6 +27,7 @@ const ( type EntitlementsReaderServiceGetEntitlementRequest struct { state protoimpl.MessageState `protogen:"open.v1"` EntitlementId string `protobuf:"bytes,1,opt,name=entitlement_id,json=entitlementId,proto3" json:"entitlement_id,omitempty"` + Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -67,6 +69,13 @@ func (x *EntitlementsReaderServiceGetEntitlementRequest) GetEntitlementId() stri return "" } +func (x *EntitlementsReaderServiceGetEntitlementRequest) GetAnnotations() []*anypb.Any { + if x != nil { + return x.Annotations + } + return nil +} + type EntitlementsReaderServiceGetEntitlementResponse struct { state protoimpl.MessageState `protogen:"open.v1"` Entitlement *v2.Entitlement `protobuf:"bytes,1,opt,name=entitlement,proto3" json:"entitlement,omitempty"` @@ -119,36 +128,42 @@ var file_c1_reader_v2_entitlement_proto_rawDesc = string([]byte{ 0x12, 0x0c, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x1a, 0x21, 0x63, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x63, 0x0a, 0x2e, 0x45, 0x6e, - 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x0e, - 0x65, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x20, 0x01, 0x28, 0x80, 0x08, - 0x52, 0x0d, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, - 0x71, 0x0a, 0x2f, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x45, - 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x32, 0xab, 0x01, 0x0a, 0x19, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, + 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9b, 0x01, 0x0a, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x0e, 0x65, 0x6e, 0x74, 0x69, + 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x20, 0x01, 0x28, 0x80, 0x08, 0x52, 0x0d, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x22, 0x71, 0x0a, 0x2f, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x47, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x6c, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x31, + 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, + 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x32, 0xab, 0x01, 0x0a, 0x19, 0x45, 0x6e, 0x74, 0x69, 0x74, + 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0x8d, 0x01, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x69, + 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3c, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x12, 0x8d, 0x01, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x12, 0x3c, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, - 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x45, - 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x3d, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, - 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x74, - 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x42, 0x33, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, - 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, - 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x72, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x47, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3d, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, + 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x33, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f, + 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, + 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, }) var ( @@ -167,17 +182,19 @@ var file_c1_reader_v2_entitlement_proto_msgTypes = make([]protoimpl.MessageInfo, var file_c1_reader_v2_entitlement_proto_goTypes = []any{ (*EntitlementsReaderServiceGetEntitlementRequest)(nil), // 0: c1.reader.v2.EntitlementsReaderServiceGetEntitlementRequest (*EntitlementsReaderServiceGetEntitlementResponse)(nil), // 1: c1.reader.v2.EntitlementsReaderServiceGetEntitlementResponse - (*v2.Entitlement)(nil), // 2: c1.connector.v2.Entitlement + (*anypb.Any)(nil), // 2: google.protobuf.Any + (*v2.Entitlement)(nil), // 3: c1.connector.v2.Entitlement } var file_c1_reader_v2_entitlement_proto_depIdxs = []int32{ - 2, // 0: c1.reader.v2.EntitlementsReaderServiceGetEntitlementResponse.entitlement:type_name -> c1.connector.v2.Entitlement - 0, // 1: c1.reader.v2.EntitlementsReaderService.GetEntitlement:input_type -> c1.reader.v2.EntitlementsReaderServiceGetEntitlementRequest - 1, // 2: c1.reader.v2.EntitlementsReaderService.GetEntitlement:output_type -> c1.reader.v2.EntitlementsReaderServiceGetEntitlementResponse - 2, // [2:3] is the sub-list for method output_type - 1, // [1:2] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 2, // 0: c1.reader.v2.EntitlementsReaderServiceGetEntitlementRequest.annotations:type_name -> google.protobuf.Any + 3, // 1: c1.reader.v2.EntitlementsReaderServiceGetEntitlementResponse.entitlement:type_name -> c1.connector.v2.Entitlement + 0, // 2: c1.reader.v2.EntitlementsReaderService.GetEntitlement:input_type -> c1.reader.v2.EntitlementsReaderServiceGetEntitlementRequest + 1, // 3: c1.reader.v2.EntitlementsReaderService.GetEntitlement:output_type -> c1.reader.v2.EntitlementsReaderServiceGetEntitlementResponse + 3, // [3:4] is the sub-list for method output_type + 2, // [2:3] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_c1_reader_v2_entitlement_proto_init() } diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/entitlement.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/entitlement.pb.validate.go index 7d09eca7..b0b290a5 100644 --- a/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/entitlement.pb.validate.go +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/entitlement.pb.validate.go @@ -70,6 +70,40 @@ func (m *EntitlementsReaderServiceGetEntitlementRequest) validate(all bool) erro errors = append(errors, err) } + for idx, item := range m.GetAnnotations() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, EntitlementsReaderServiceGetEntitlementRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, EntitlementsReaderServiceGetEntitlementRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return EntitlementsReaderServiceGetEntitlementRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + if len(errors) > 0 { return EntitlementsReaderServiceGetEntitlementRequestMultiError(errors) } diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/grant.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/grant.pb.go index a7792b2c..13690bcd 100644 --- a/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/grant.pb.go +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/grant.pb.go @@ -27,6 +27,7 @@ const ( type GrantsReaderServiceGetGrantRequest struct { state protoimpl.MessageState `protogen:"open.v1"` GrantId string `protobuf:"bytes,1,opt,name=grant_id,json=grantId,proto3" json:"grant_id,omitempty"` + Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -68,6 +69,13 @@ func (x *GrantsReaderServiceGetGrantRequest) GetGrantId() string { return "" } +func (x *GrantsReaderServiceGetGrantRequest) GetAnnotations() []*anypb.Any { + if x != nil { + return x.Annotations + } + return nil +} + type GrantsReaderServiceGetGrantResponse struct { state protoimpl.MessageState `protogen:"open.v1"` Grant *v2.Grant `protobuf:"bytes,1,opt,name=grant,proto3" json:"grant,omitempty"` @@ -374,107 +382,111 @@ var file_c1_reader_v2_grant_proto_rawDesc = string([]byte{ 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4b, 0x0a, 0x22, - 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x25, 0x0a, 0x08, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x20, 0x01, 0x28, 0x80, 0x08, - 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x53, 0x0a, 0x23, 0x47, 0x72, 0x61, - 0x6e, 0x74, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x47, 0x65, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x2c, 0x0a, 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x16, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, - 0x32, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x22, 0xd7, - 0x02, 0x0a, 0x32, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, - 0x46, 0x6f, 0x72, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x48, 0x0a, 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x31, 0x2e, - 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x74, - 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, - 0x10, 0x01, 0x52, 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, - 0x48, 0x0a, 0x0c, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x49, 0x64, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x00, 0x52, 0x0b, 0x70, 0x72, - 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x09, 0x70, 0x61, 0x67, - 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x0a, 0xfa, 0x42, - 0x07, 0x2a, 0x05, 0x18, 0xfa, 0x01, 0x40, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, - 0x7a, 0x65, 0x12, 0x2c, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0x28, - 0x80, 0x10, 0xd0, 0x01, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, - 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x98, 0x01, 0x0a, 0x33, 0x47, 0x72, 0x61, - 0x6e, 0x74, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x45, 0x6e, 0x74, - 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x2a, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x83, 0x01, 0x0a, + 0x22, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x08, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x20, 0x01, 0x28, 0x80, + 0x08, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x22, 0x53, 0x0a, 0x23, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x47, 0x72, 0x61, 0x6e, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x05, 0x67, 0x72, 0x61, + 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, + 0x52, 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x22, 0xd7, 0x02, 0x0a, 0x32, 0x47, 0x72, 0x61, 0x6e, + 0x74, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, + 0x69, 0x73, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x45, 0x6e, 0x74, 0x69, + 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x48, + 0x0a, 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x65, 0x6e, 0x74, + 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x48, 0x0a, 0x0c, 0x70, 0x72, 0x69, 0x6e, + 0x63, 0x69, 0x70, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, - 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x35, 0x0a, 0x0f, - 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0x28, 0x80, - 0x10, 0xd0, 0x01, 0x01, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x22, 0xfd, 0x01, 0x0a, 0x33, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x47, - 0x72, 0x61, 0x6e, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x10, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0x28, 0x80, - 0x10, 0xd0, 0x01, 0x01, 0x52, 0x0e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, - 0x70, 0x65, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x2a, 0x05, 0x18, 0xfa, - 0x01, 0x40, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x2c, 0x0a, - 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0x28, 0x80, 0x10, 0xd0, 0x01, 0x01, - 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x0b, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x22, 0x99, 0x01, 0x0a, 0x34, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x47, - 0x72, 0x61, 0x6e, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x04, - 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x31, 0x2e, - 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x72, 0x61, - 0x6e, 0x74, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x35, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, - 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0x28, 0x80, 0x10, 0xd0, 0x01, 0x01, - 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x32, - 0xcd, 0x03, 0x0a, 0x13, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6f, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x47, 0x72, - 0x61, 0x6e, 0x74, 0x12, 0x30, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, - 0x76, 0x32, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x9f, 0x01, 0x0a, 0x18, 0x4c, 0x69, 0x73, - 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x40, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x61, 0x6e, - 0x74, 0x73, 0x46, 0x6f, 0x72, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x41, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, - 0x61, 0x6e, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0xa2, 0x01, 0x0a, 0x19, 0x4c, - 0x69, 0x73, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x41, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x47, - 0x72, 0x61, 0x6e, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x42, 0x2e, 0x63, 0x31, - 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, - 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, - 0x73, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, - 0x33, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, - 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, - 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x72, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x42, 0x08, 0xfa, 0x42, 0x05, + 0x8a, 0x01, 0x02, 0x10, 0x00, 0x52, 0x0b, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, + 0x49, 0x64, 0x12, 0x27, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x2a, 0x05, 0x18, 0xfa, 0x01, 0x40, + 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x2c, 0x0a, 0x0a, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0x28, 0x80, 0x10, 0xd0, 0x01, 0x01, 0x52, 0x09, + 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x22, 0x98, 0x01, 0x0a, 0x33, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x61, + 0x6e, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x04, 0x6c, 0x69, 0x73, + 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, + 0x04, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x35, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, + 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0x28, 0x80, 0x10, 0xd0, 0x01, 0x01, 0x52, 0x0d, 0x6e, + 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xfd, 0x01, 0x0a, + 0x33, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x46, 0x6f, + 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, + 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0x28, 0x80, 0x10, 0xd0, 0x01, 0x01, 0x52, 0x0e, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x12, 0x27, 0x0a, + 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, + 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x2a, 0x05, 0x18, 0xfa, 0x01, 0x40, 0x01, 0x52, 0x08, 0x70, 0x61, + 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x2c, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, + 0x08, 0x20, 0x01, 0x28, 0x80, 0x10, 0xd0, 0x01, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, + 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x99, 0x01, 0x0a, + 0x34, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x46, 0x6f, + 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x04, 0x6c, 0x69, 0x73, + 0x74, 0x12, 0x35, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, + 0x08, 0x20, 0x01, 0x28, 0x80, 0x10, 0xd0, 0x01, 0x01, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, + 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0xcd, 0x03, 0x0a, 0x13, 0x47, 0x72, 0x61, + 0x6e, 0x74, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x6f, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x12, 0x30, 0x2e, 0x63, + 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x72, 0x61, 0x6e, + 0x74, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, + 0x65, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, + 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x72, + 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x47, 0x65, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x9f, 0x01, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, + 0x46, 0x6f, 0x72, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x40, + 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x72, + 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x45, 0x6e, + 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x41, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, + 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x46, 0x6f, 0x72, + 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0xa2, 0x01, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x61, 0x6e, + 0x74, 0x73, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x41, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, + 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x46, 0x6f, + 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x42, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, + 0x73, 0x46, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x33, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, + 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, + 0x2f, 0x63, 0x31, 0x2f, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, }) var ( @@ -497,30 +509,31 @@ var file_c1_reader_v2_grant_proto_goTypes = []any{ (*GrantsReaderServiceListGrantsForEntitlementResponse)(nil), // 3: c1.reader.v2.GrantsReaderServiceListGrantsForEntitlementResponse (*GrantsReaderServiceListGrantsForResourceTypeRequest)(nil), // 4: c1.reader.v2.GrantsReaderServiceListGrantsForResourceTypeRequest (*GrantsReaderServiceListGrantsForResourceTypeResponse)(nil), // 5: c1.reader.v2.GrantsReaderServiceListGrantsForResourceTypeResponse - (*v2.Grant)(nil), // 6: c1.connector.v2.Grant - (*v2.Entitlement)(nil), // 7: c1.connector.v2.Entitlement - (*v2.ResourceId)(nil), // 8: c1.connector.v2.ResourceId - (*anypb.Any)(nil), // 9: google.protobuf.Any + (*anypb.Any)(nil), // 6: google.protobuf.Any + (*v2.Grant)(nil), // 7: c1.connector.v2.Grant + (*v2.Entitlement)(nil), // 8: c1.connector.v2.Entitlement + (*v2.ResourceId)(nil), // 9: c1.connector.v2.ResourceId } var file_c1_reader_v2_grant_proto_depIdxs = []int32{ - 6, // 0: c1.reader.v2.GrantsReaderServiceGetGrantResponse.grant:type_name -> c1.connector.v2.Grant - 7, // 1: c1.reader.v2.GrantsReaderServiceListGrantsForEntitlementRequest.entitlement:type_name -> c1.connector.v2.Entitlement - 8, // 2: c1.reader.v2.GrantsReaderServiceListGrantsForEntitlementRequest.principal_id:type_name -> c1.connector.v2.ResourceId - 9, // 3: c1.reader.v2.GrantsReaderServiceListGrantsForEntitlementRequest.annotations:type_name -> google.protobuf.Any - 6, // 4: c1.reader.v2.GrantsReaderServiceListGrantsForEntitlementResponse.list:type_name -> c1.connector.v2.Grant - 9, // 5: c1.reader.v2.GrantsReaderServiceListGrantsForResourceTypeRequest.annotations:type_name -> google.protobuf.Any - 6, // 6: c1.reader.v2.GrantsReaderServiceListGrantsForResourceTypeResponse.list:type_name -> c1.connector.v2.Grant - 0, // 7: c1.reader.v2.GrantsReaderService.GetGrant:input_type -> c1.reader.v2.GrantsReaderServiceGetGrantRequest - 2, // 8: c1.reader.v2.GrantsReaderService.ListGrantsForEntitlement:input_type -> c1.reader.v2.GrantsReaderServiceListGrantsForEntitlementRequest - 4, // 9: c1.reader.v2.GrantsReaderService.ListGrantsForResourceType:input_type -> c1.reader.v2.GrantsReaderServiceListGrantsForResourceTypeRequest - 1, // 10: c1.reader.v2.GrantsReaderService.GetGrant:output_type -> c1.reader.v2.GrantsReaderServiceGetGrantResponse - 3, // 11: c1.reader.v2.GrantsReaderService.ListGrantsForEntitlement:output_type -> c1.reader.v2.GrantsReaderServiceListGrantsForEntitlementResponse - 5, // 12: c1.reader.v2.GrantsReaderService.ListGrantsForResourceType:output_type -> c1.reader.v2.GrantsReaderServiceListGrantsForResourceTypeResponse - 10, // [10:13] is the sub-list for method output_type - 7, // [7:10] is the sub-list for method input_type - 7, // [7:7] is the sub-list for extension type_name - 7, // [7:7] is the sub-list for extension extendee - 0, // [0:7] is the sub-list for field type_name + 6, // 0: c1.reader.v2.GrantsReaderServiceGetGrantRequest.annotations:type_name -> google.protobuf.Any + 7, // 1: c1.reader.v2.GrantsReaderServiceGetGrantResponse.grant:type_name -> c1.connector.v2.Grant + 8, // 2: c1.reader.v2.GrantsReaderServiceListGrantsForEntitlementRequest.entitlement:type_name -> c1.connector.v2.Entitlement + 9, // 3: c1.reader.v2.GrantsReaderServiceListGrantsForEntitlementRequest.principal_id:type_name -> c1.connector.v2.ResourceId + 6, // 4: c1.reader.v2.GrantsReaderServiceListGrantsForEntitlementRequest.annotations:type_name -> google.protobuf.Any + 7, // 5: c1.reader.v2.GrantsReaderServiceListGrantsForEntitlementResponse.list:type_name -> c1.connector.v2.Grant + 6, // 6: c1.reader.v2.GrantsReaderServiceListGrantsForResourceTypeRequest.annotations:type_name -> google.protobuf.Any + 7, // 7: c1.reader.v2.GrantsReaderServiceListGrantsForResourceTypeResponse.list:type_name -> c1.connector.v2.Grant + 0, // 8: c1.reader.v2.GrantsReaderService.GetGrant:input_type -> c1.reader.v2.GrantsReaderServiceGetGrantRequest + 2, // 9: c1.reader.v2.GrantsReaderService.ListGrantsForEntitlement:input_type -> c1.reader.v2.GrantsReaderServiceListGrantsForEntitlementRequest + 4, // 10: c1.reader.v2.GrantsReaderService.ListGrantsForResourceType:input_type -> c1.reader.v2.GrantsReaderServiceListGrantsForResourceTypeRequest + 1, // 11: c1.reader.v2.GrantsReaderService.GetGrant:output_type -> c1.reader.v2.GrantsReaderServiceGetGrantResponse + 3, // 12: c1.reader.v2.GrantsReaderService.ListGrantsForEntitlement:output_type -> c1.reader.v2.GrantsReaderServiceListGrantsForEntitlementResponse + 5, // 13: c1.reader.v2.GrantsReaderService.ListGrantsForResourceType:output_type -> c1.reader.v2.GrantsReaderServiceListGrantsForResourceTypeResponse + 11, // [11:14] is the sub-list for method output_type + 8, // [8:11] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name } func init() { file_c1_reader_v2_grant_proto_init() } diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/grant.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/grant.pb.validate.go index 79c318fa..67a5cfac 100644 --- a/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/grant.pb.validate.go +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/grant.pb.validate.go @@ -69,6 +69,40 @@ func (m *GrantsReaderServiceGetGrantRequest) validate(all bool) error { errors = append(errors, err) } + for idx, item := range m.GetAnnotations() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GrantsReaderServiceGetGrantRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GrantsReaderServiceGetGrantRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return GrantsReaderServiceGetGrantRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + if len(errors) > 0 { return GrantsReaderServiceGetGrantRequestMultiError(errors) } diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/resource.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/resource.pb.go index 7ddb95f2..06a4ec90 100644 --- a/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/resource.pb.go +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/resource.pb.go @@ -27,6 +27,7 @@ const ( type ResourceTypesReaderServiceGetResourceTypeRequest struct { state protoimpl.MessageState `protogen:"open.v1"` ResourceTypeId string `protobuf:"bytes,1,opt,name=resource_type_id,json=resourceTypeId,proto3" json:"resource_type_id,omitempty"` + Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -68,6 +69,13 @@ func (x *ResourceTypesReaderServiceGetResourceTypeRequest) GetResourceTypeId() s return "" } +func (x *ResourceTypesReaderServiceGetResourceTypeRequest) GetAnnotations() []*anypb.Any { + if x != nil { + return x.Annotations + } + return nil +} + type ResourceTypesReaderServiceGetResourceTypeResponse struct { state protoimpl.MessageState `protogen:"open.v1"` ResourceType *v2.ResourceType `protobuf:"bytes,1,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"` @@ -219,62 +227,65 @@ var file_c1_reader_v2_resource_proto_rawDesc = string([]byte{ 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0x5c, 0x0a, 0x30, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, - 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x22, 0x77, 0x0a, - 0x31, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x42, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x31, 0x2e, 0x63, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0xaa, 0x01, 0x0a, 0x28, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x49, 0x64, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, - 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x22, 0x62, 0x0a, 0x29, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, - 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x35, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x32, 0xb1, 0x01, 0x0a, 0x1a, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x92, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3e, 0x2e, 0x63, 0x31, 0x2e, - 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, - 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3f, 0x2e, 0x63, 0x31, 0x2e, - 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x94, 0x01, 0x0a, 0x30, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, + 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x12, 0x36, + 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x77, 0x0a, 0x31, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, - 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x98, 0x01, 0x0a, 0x16, + 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x0d, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, + 0xaa, 0x01, 0x0a, 0x28, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x0b, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1b, 0x2e, 0x63, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x42, 0x08, + 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, + 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x62, 0x0a, 0x29, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7e, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x36, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, - 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x33, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, - 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, - 0x31, 0x2f, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x31, + 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x32, 0xb1, 0x01, 0x0a, 0x1a, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x92, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x3e, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, + 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, + 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x3f, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, + 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, + 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x98, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x7e, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x36, + 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, + 0x33, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, + 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, + 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x72, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, }) var ( @@ -295,25 +306,26 @@ var file_c1_reader_v2_resource_proto_goTypes = []any{ (*ResourceTypesReaderServiceGetResourceTypeResponse)(nil), // 1: c1.reader.v2.ResourceTypesReaderServiceGetResourceTypeResponse (*ResourcesReaderServiceGetResourceRequest)(nil), // 2: c1.reader.v2.ResourcesReaderServiceGetResourceRequest (*ResourcesReaderServiceGetResourceResponse)(nil), // 3: c1.reader.v2.ResourcesReaderServiceGetResourceResponse - (*v2.ResourceType)(nil), // 4: c1.connector.v2.ResourceType - (*v2.ResourceId)(nil), // 5: c1.connector.v2.ResourceId - (*anypb.Any)(nil), // 6: google.protobuf.Any - (*v2.Resource)(nil), // 7: c1.connector.v2.Resource + (*anypb.Any)(nil), // 4: google.protobuf.Any + (*v2.ResourceType)(nil), // 5: c1.connector.v2.ResourceType + (*v2.ResourceId)(nil), // 6: c1.connector.v2.ResourceId + (*v2.Resource)(nil), // 7: c1.connector.v2.Resource } var file_c1_reader_v2_resource_proto_depIdxs = []int32{ - 4, // 0: c1.reader.v2.ResourceTypesReaderServiceGetResourceTypeResponse.resource_type:type_name -> c1.connector.v2.ResourceType - 5, // 1: c1.reader.v2.ResourcesReaderServiceGetResourceRequest.resource_id:type_name -> c1.connector.v2.ResourceId - 6, // 2: c1.reader.v2.ResourcesReaderServiceGetResourceRequest.annotations:type_name -> google.protobuf.Any - 7, // 3: c1.reader.v2.ResourcesReaderServiceGetResourceResponse.resource:type_name -> c1.connector.v2.Resource - 0, // 4: c1.reader.v2.ResourceTypesReaderService.GetResourceType:input_type -> c1.reader.v2.ResourceTypesReaderServiceGetResourceTypeRequest - 2, // 5: c1.reader.v2.ResourcesReaderService.GetResource:input_type -> c1.reader.v2.ResourcesReaderServiceGetResourceRequest - 1, // 6: c1.reader.v2.ResourceTypesReaderService.GetResourceType:output_type -> c1.reader.v2.ResourceTypesReaderServiceGetResourceTypeResponse - 3, // 7: c1.reader.v2.ResourcesReaderService.GetResource:output_type -> c1.reader.v2.ResourcesReaderServiceGetResourceResponse - 6, // [6:8] is the sub-list for method output_type - 4, // [4:6] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name + 4, // 0: c1.reader.v2.ResourceTypesReaderServiceGetResourceTypeRequest.annotations:type_name -> google.protobuf.Any + 5, // 1: c1.reader.v2.ResourceTypesReaderServiceGetResourceTypeResponse.resource_type:type_name -> c1.connector.v2.ResourceType + 6, // 2: c1.reader.v2.ResourcesReaderServiceGetResourceRequest.resource_id:type_name -> c1.connector.v2.ResourceId + 4, // 3: c1.reader.v2.ResourcesReaderServiceGetResourceRequest.annotations:type_name -> google.protobuf.Any + 7, // 4: c1.reader.v2.ResourcesReaderServiceGetResourceResponse.resource:type_name -> c1.connector.v2.Resource + 0, // 5: c1.reader.v2.ResourceTypesReaderService.GetResourceType:input_type -> c1.reader.v2.ResourceTypesReaderServiceGetResourceTypeRequest + 2, // 6: c1.reader.v2.ResourcesReaderService.GetResource:input_type -> c1.reader.v2.ResourcesReaderServiceGetResourceRequest + 1, // 7: c1.reader.v2.ResourceTypesReaderService.GetResourceType:output_type -> c1.reader.v2.ResourceTypesReaderServiceGetResourceTypeResponse + 3, // 8: c1.reader.v2.ResourcesReaderService.GetResource:output_type -> c1.reader.v2.ResourcesReaderServiceGetResourceResponse + 7, // [7:9] is the sub-list for method output_type + 5, // [5:7] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name } func init() { file_c1_reader_v2_resource_proto_init() } diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/resource.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/resource.pb.validate.go index b5f27f72..e628ca15 100644 --- a/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/resource.pb.validate.go +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/resource.pb.validate.go @@ -61,6 +61,40 @@ func (m *ResourceTypesReaderServiceGetResourceTypeRequest) validate(all bool) er // no validation rules for ResourceTypeId + for idx, item := range m.GetAnnotations() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ResourceTypesReaderServiceGetResourceTypeRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ResourceTypesReaderServiceGetResourceTypeRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ResourceTypesReaderServiceGetResourceTypeRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + if len(errors) > 0 { return ResourceTypesReaderServiceGetResourceTypeRequestMultiError(errors) } diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/sync.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/sync.pb.go new file mode 100644 index 00000000..ec106f8e --- /dev/null +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/sync.pb.go @@ -0,0 +1,624 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.4 +// protoc (unknown) +// source: c1/reader/v2/sync.proto + +package v2 + +import ( + _ "github.com/envoyproxy/protoc-gen-validate/validate" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + anypb "google.golang.org/protobuf/types/known/anypb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type SyncRun struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + StartedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"` + EndedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=ended_at,json=endedAt,proto3" json:"ended_at,omitempty"` + SyncToken string `protobuf:"bytes,4,opt,name=sync_token,json=syncToken,proto3" json:"sync_token,omitempty"` + SyncType string `protobuf:"bytes,5,opt,name=sync_type,json=syncType,proto3" json:"sync_type,omitempty"` + ParentSyncId string `protobuf:"bytes,6,opt,name=parent_sync_id,json=parentSyncId,proto3" json:"parent_sync_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SyncRun) Reset() { + *x = SyncRun{} + mi := &file_c1_reader_v2_sync_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SyncRun) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SyncRun) ProtoMessage() {} + +func (x *SyncRun) ProtoReflect() protoreflect.Message { + mi := &file_c1_reader_v2_sync_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SyncRun.ProtoReflect.Descriptor instead. +func (*SyncRun) Descriptor() ([]byte, []int) { + return file_c1_reader_v2_sync_proto_rawDescGZIP(), []int{0} +} + +func (x *SyncRun) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *SyncRun) GetStartedAt() *timestamppb.Timestamp { + if x != nil { + return x.StartedAt + } + return nil +} + +func (x *SyncRun) GetEndedAt() *timestamppb.Timestamp { + if x != nil { + return x.EndedAt + } + return nil +} + +func (x *SyncRun) GetSyncToken() string { + if x != nil { + return x.SyncToken + } + return "" +} + +func (x *SyncRun) GetSyncType() string { + if x != nil { + return x.SyncType + } + return "" +} + +func (x *SyncRun) GetParentSyncId() string { + if x != nil { + return x.ParentSyncId + } + return "" +} + +type SyncsReaderServiceGetSyncRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + SyncId string `protobuf:"bytes,1,opt,name=sync_id,json=syncId,proto3" json:"sync_id,omitempty"` + Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SyncsReaderServiceGetSyncRequest) Reset() { + *x = SyncsReaderServiceGetSyncRequest{} + mi := &file_c1_reader_v2_sync_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SyncsReaderServiceGetSyncRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SyncsReaderServiceGetSyncRequest) ProtoMessage() {} + +func (x *SyncsReaderServiceGetSyncRequest) ProtoReflect() protoreflect.Message { + mi := &file_c1_reader_v2_sync_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SyncsReaderServiceGetSyncRequest.ProtoReflect.Descriptor instead. +func (*SyncsReaderServiceGetSyncRequest) Descriptor() ([]byte, []int) { + return file_c1_reader_v2_sync_proto_rawDescGZIP(), []int{1} +} + +func (x *SyncsReaderServiceGetSyncRequest) GetSyncId() string { + if x != nil { + return x.SyncId + } + return "" +} + +func (x *SyncsReaderServiceGetSyncRequest) GetAnnotations() []*anypb.Any { + if x != nil { + return x.Annotations + } + return nil +} + +type SyncsReaderServiceGetSyncResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Sync *SyncRun `protobuf:"bytes,1,opt,name=sync,proto3" json:"sync,omitempty"` + Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SyncsReaderServiceGetSyncResponse) Reset() { + *x = SyncsReaderServiceGetSyncResponse{} + mi := &file_c1_reader_v2_sync_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SyncsReaderServiceGetSyncResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SyncsReaderServiceGetSyncResponse) ProtoMessage() {} + +func (x *SyncsReaderServiceGetSyncResponse) ProtoReflect() protoreflect.Message { + mi := &file_c1_reader_v2_sync_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SyncsReaderServiceGetSyncResponse.ProtoReflect.Descriptor instead. +func (*SyncsReaderServiceGetSyncResponse) Descriptor() ([]byte, []int) { + return file_c1_reader_v2_sync_proto_rawDescGZIP(), []int{2} +} + +func (x *SyncsReaderServiceGetSyncResponse) GetSync() *SyncRun { + if x != nil { + return x.Sync + } + return nil +} + +func (x *SyncsReaderServiceGetSyncResponse) GetAnnotations() []*anypb.Any { + if x != nil { + return x.Annotations + } + return nil +} + +type SyncsReaderServiceListSyncsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + PageSize uint32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SyncsReaderServiceListSyncsRequest) Reset() { + *x = SyncsReaderServiceListSyncsRequest{} + mi := &file_c1_reader_v2_sync_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SyncsReaderServiceListSyncsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SyncsReaderServiceListSyncsRequest) ProtoMessage() {} + +func (x *SyncsReaderServiceListSyncsRequest) ProtoReflect() protoreflect.Message { + mi := &file_c1_reader_v2_sync_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SyncsReaderServiceListSyncsRequest.ProtoReflect.Descriptor instead. +func (*SyncsReaderServiceListSyncsRequest) Descriptor() ([]byte, []int) { + return file_c1_reader_v2_sync_proto_rawDescGZIP(), []int{3} +} + +func (x *SyncsReaderServiceListSyncsRequest) GetPageSize() uint32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *SyncsReaderServiceListSyncsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *SyncsReaderServiceListSyncsRequest) GetAnnotations() []*anypb.Any { + if x != nil { + return x.Annotations + } + return nil +} + +type SyncsReaderServiceListSyncsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Syncs []*SyncRun `protobuf:"bytes,1,rep,name=syncs,proto3" json:"syncs,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + Annotations []*anypb.Any `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SyncsReaderServiceListSyncsResponse) Reset() { + *x = SyncsReaderServiceListSyncsResponse{} + mi := &file_c1_reader_v2_sync_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SyncsReaderServiceListSyncsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SyncsReaderServiceListSyncsResponse) ProtoMessage() {} + +func (x *SyncsReaderServiceListSyncsResponse) ProtoReflect() protoreflect.Message { + mi := &file_c1_reader_v2_sync_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SyncsReaderServiceListSyncsResponse.ProtoReflect.Descriptor instead. +func (*SyncsReaderServiceListSyncsResponse) Descriptor() ([]byte, []int) { + return file_c1_reader_v2_sync_proto_rawDescGZIP(), []int{4} +} + +func (x *SyncsReaderServiceListSyncsResponse) GetSyncs() []*SyncRun { + if x != nil { + return x.Syncs + } + return nil +} + +func (x *SyncsReaderServiceListSyncsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +func (x *SyncsReaderServiceListSyncsResponse) GetAnnotations() []*anypb.Any { + if x != nil { + return x.Annotations + } + return nil +} + +type SyncsReaderServiceGetLatestFinishedSyncRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Annotations []*anypb.Any `protobuf:"bytes,1,rep,name=annotations,proto3" json:"annotations,omitempty"` + SyncType string `protobuf:"bytes,2,opt,name=sync_type,json=syncType,proto3" json:"sync_type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SyncsReaderServiceGetLatestFinishedSyncRequest) Reset() { + *x = SyncsReaderServiceGetLatestFinishedSyncRequest{} + mi := &file_c1_reader_v2_sync_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SyncsReaderServiceGetLatestFinishedSyncRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SyncsReaderServiceGetLatestFinishedSyncRequest) ProtoMessage() {} + +func (x *SyncsReaderServiceGetLatestFinishedSyncRequest) ProtoReflect() protoreflect.Message { + mi := &file_c1_reader_v2_sync_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SyncsReaderServiceGetLatestFinishedSyncRequest.ProtoReflect.Descriptor instead. +func (*SyncsReaderServiceGetLatestFinishedSyncRequest) Descriptor() ([]byte, []int) { + return file_c1_reader_v2_sync_proto_rawDescGZIP(), []int{5} +} + +func (x *SyncsReaderServiceGetLatestFinishedSyncRequest) GetAnnotations() []*anypb.Any { + if x != nil { + return x.Annotations + } + return nil +} + +func (x *SyncsReaderServiceGetLatestFinishedSyncRequest) GetSyncType() string { + if x != nil { + return x.SyncType + } + return "" +} + +type SyncsReaderServiceGetLatestFinishedSyncResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Sync *SyncRun `protobuf:"bytes,1,opt,name=sync,proto3" json:"sync,omitempty"` + Annotations []*anypb.Any `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SyncsReaderServiceGetLatestFinishedSyncResponse) Reset() { + *x = SyncsReaderServiceGetLatestFinishedSyncResponse{} + mi := &file_c1_reader_v2_sync_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SyncsReaderServiceGetLatestFinishedSyncResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SyncsReaderServiceGetLatestFinishedSyncResponse) ProtoMessage() {} + +func (x *SyncsReaderServiceGetLatestFinishedSyncResponse) ProtoReflect() protoreflect.Message { + mi := &file_c1_reader_v2_sync_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SyncsReaderServiceGetLatestFinishedSyncResponse.ProtoReflect.Descriptor instead. +func (*SyncsReaderServiceGetLatestFinishedSyncResponse) Descriptor() ([]byte, []int) { + return file_c1_reader_v2_sync_proto_rawDescGZIP(), []int{6} +} + +func (x *SyncsReaderServiceGetLatestFinishedSyncResponse) GetSync() *SyncRun { + if x != nil { + return x.Sync + } + return nil +} + +func (x *SyncsReaderServiceGetLatestFinishedSyncResponse) GetAnnotations() []*anypb.Any { + if x != nil { + return x.Annotations + } + return nil +} + +var File_c1_reader_v2_sync_proto protoreflect.FileDescriptor + +var file_c1_reader_v2_sync_proto_rawDesc = string([]byte{ + 0x0a, 0x17, 0x63, 0x31, 0x2f, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2f, 0x76, 0x32, 0x2f, 0x73, + 0x79, 0x6e, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x63, 0x31, 0x2e, 0x72, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xed, 0x01, 0x0a, + 0x07, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x75, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, + 0x64, 0x41, 0x74, 0x12, 0x35, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x79, + 0x6e, 0x63, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x73, 0x79, 0x6e, 0x63, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x79, 0x6e, + 0x63, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x79, + 0x6e, 0x63, 0x54, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x49, 0x64, 0x22, 0x73, 0x0a, 0x20, + 0x53, 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x47, 0x65, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x17, 0x0a, 0x07, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x73, 0x79, 0x6e, 0x63, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x22, 0x86, 0x01, 0x0a, 0x21, 0x53, 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x04, 0x73, 0x79, 0x6e, 0x63, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x75, 0x6e, 0x52, 0x04, 0x73, 0x79, + 0x6e, 0x63, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xb3, 0x01, 0x0a, 0x22, 0x53, + 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x27, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0d, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x2a, 0x05, 0x18, 0xfa, 0x01, 0x40, 0x01, + 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x2c, 0x0a, 0x0a, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, + 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0x28, 0x80, 0x10, 0xd0, 0x01, 0x01, 0x52, 0x09, 0x70, + 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x22, 0xc1, 0x01, 0x0a, 0x23, 0x53, 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x05, 0x73, 0x79, 0x6e, 0x63, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x75, 0x6e, 0x52, 0x05, + 0x73, 0x79, 0x6e, 0x63, 0x73, 0x12, 0x35, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, + 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x20, 0x01, 0x28, 0x80, 0x10, 0xd0, 0x01, 0x01, 0x52, 0x0d, 0x6e, + 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x36, 0x0a, 0x0b, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x85, 0x01, 0x0a, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x4c, 0x61, + 0x74, 0x65, 0x73, 0x74, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x53, 0x79, 0x6e, 0x63, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, + 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x1b, 0x0a, 0x09, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x73, 0x79, 0x6e, 0x63, 0x54, 0x79, 0x70, 0x65, 0x22, 0x94, 0x01, 0x0a, + 0x2f, 0x53, 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x46, 0x69, 0x6e, 0x69, + 0x73, 0x68, 0x65, 0x64, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x29, 0x0a, 0x04, 0x73, 0x79, 0x6e, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, + 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, + 0x6e, 0x63, 0x52, 0x75, 0x6e, 0x52, 0x04, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x36, 0x0a, 0x0b, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x32, 0x89, 0x03, 0x0a, 0x12, 0x53, 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6a, 0x0a, 0x07, 0x47, 0x65, + 0x74, 0x53, 0x79, 0x6e, 0x63, 0x12, 0x2e, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x70, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x79, + 0x6e, 0x63, 0x73, 0x12, 0x30, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, + 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x94, 0x01, 0x0a, 0x15, 0x47, 0x65, 0x74, + 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x53, 0x79, + 0x6e, 0x63, 0x12, 0x3c, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x76, + 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x46, 0x69, 0x6e, + 0x69, 0x73, 0x68, 0x65, 0x64, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x3d, 0x2e, 0x63, 0x31, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, + 0x53, 0x79, 0x6e, 0x63, 0x73, 0x52, 0x65, 0x61, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x46, 0x69, 0x6e, 0x69, 0x73, + 0x68, 0x65, 0x64, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, + 0x33, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, + 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, + 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x31, 0x2f, 0x72, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x2f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +}) + +var ( + file_c1_reader_v2_sync_proto_rawDescOnce sync.Once + file_c1_reader_v2_sync_proto_rawDescData []byte +) + +func file_c1_reader_v2_sync_proto_rawDescGZIP() []byte { + file_c1_reader_v2_sync_proto_rawDescOnce.Do(func() { + file_c1_reader_v2_sync_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_c1_reader_v2_sync_proto_rawDesc), len(file_c1_reader_v2_sync_proto_rawDesc))) + }) + return file_c1_reader_v2_sync_proto_rawDescData +} + +var file_c1_reader_v2_sync_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_c1_reader_v2_sync_proto_goTypes = []any{ + (*SyncRun)(nil), // 0: c1.reader.v2.SyncRun + (*SyncsReaderServiceGetSyncRequest)(nil), // 1: c1.reader.v2.SyncsReaderServiceGetSyncRequest + (*SyncsReaderServiceGetSyncResponse)(nil), // 2: c1.reader.v2.SyncsReaderServiceGetSyncResponse + (*SyncsReaderServiceListSyncsRequest)(nil), // 3: c1.reader.v2.SyncsReaderServiceListSyncsRequest + (*SyncsReaderServiceListSyncsResponse)(nil), // 4: c1.reader.v2.SyncsReaderServiceListSyncsResponse + (*SyncsReaderServiceGetLatestFinishedSyncRequest)(nil), // 5: c1.reader.v2.SyncsReaderServiceGetLatestFinishedSyncRequest + (*SyncsReaderServiceGetLatestFinishedSyncResponse)(nil), // 6: c1.reader.v2.SyncsReaderServiceGetLatestFinishedSyncResponse + (*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp + (*anypb.Any)(nil), // 8: google.protobuf.Any +} +var file_c1_reader_v2_sync_proto_depIdxs = []int32{ + 7, // 0: c1.reader.v2.SyncRun.started_at:type_name -> google.protobuf.Timestamp + 7, // 1: c1.reader.v2.SyncRun.ended_at:type_name -> google.protobuf.Timestamp + 8, // 2: c1.reader.v2.SyncsReaderServiceGetSyncRequest.annotations:type_name -> google.protobuf.Any + 0, // 3: c1.reader.v2.SyncsReaderServiceGetSyncResponse.sync:type_name -> c1.reader.v2.SyncRun + 8, // 4: c1.reader.v2.SyncsReaderServiceGetSyncResponse.annotations:type_name -> google.protobuf.Any + 8, // 5: c1.reader.v2.SyncsReaderServiceListSyncsRequest.annotations:type_name -> google.protobuf.Any + 0, // 6: c1.reader.v2.SyncsReaderServiceListSyncsResponse.syncs:type_name -> c1.reader.v2.SyncRun + 8, // 7: c1.reader.v2.SyncsReaderServiceListSyncsResponse.annotations:type_name -> google.protobuf.Any + 8, // 8: c1.reader.v2.SyncsReaderServiceGetLatestFinishedSyncRequest.annotations:type_name -> google.protobuf.Any + 0, // 9: c1.reader.v2.SyncsReaderServiceGetLatestFinishedSyncResponse.sync:type_name -> c1.reader.v2.SyncRun + 8, // 10: c1.reader.v2.SyncsReaderServiceGetLatestFinishedSyncResponse.annotations:type_name -> google.protobuf.Any + 1, // 11: c1.reader.v2.SyncsReaderService.GetSync:input_type -> c1.reader.v2.SyncsReaderServiceGetSyncRequest + 3, // 12: c1.reader.v2.SyncsReaderService.ListSyncs:input_type -> c1.reader.v2.SyncsReaderServiceListSyncsRequest + 5, // 13: c1.reader.v2.SyncsReaderService.GetLatestFinishedSync:input_type -> c1.reader.v2.SyncsReaderServiceGetLatestFinishedSyncRequest + 2, // 14: c1.reader.v2.SyncsReaderService.GetSync:output_type -> c1.reader.v2.SyncsReaderServiceGetSyncResponse + 4, // 15: c1.reader.v2.SyncsReaderService.ListSyncs:output_type -> c1.reader.v2.SyncsReaderServiceListSyncsResponse + 6, // 16: c1.reader.v2.SyncsReaderService.GetLatestFinishedSync:output_type -> c1.reader.v2.SyncsReaderServiceGetLatestFinishedSyncResponse + 14, // [14:17] is the sub-list for method output_type + 11, // [11:14] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name +} + +func init() { file_c1_reader_v2_sync_proto_init() } +func file_c1_reader_v2_sync_proto_init() { + if File_c1_reader_v2_sync_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_reader_v2_sync_proto_rawDesc), len(file_c1_reader_v2_sync_proto_rawDesc)), + NumEnums: 0, + NumMessages: 7, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_c1_reader_v2_sync_proto_goTypes, + DependencyIndexes: file_c1_reader_v2_sync_proto_depIdxs, + MessageInfos: file_c1_reader_v2_sync_proto_msgTypes, + }.Build() + File_c1_reader_v2_sync_proto = out.File + file_c1_reader_v2_sync_proto_goTypes = nil + file_c1_reader_v2_sync_proto_depIdxs = nil +} diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/sync.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/sync.pb.validate.go new file mode 100644 index 00000000..b87264e2 --- /dev/null +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/sync.pb.validate.go @@ -0,0 +1,1185 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: c1/reader/v2/sync.proto + +package v2 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on SyncRun with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *SyncRun) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SyncRun with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in SyncRunMultiError, or nil if none found. +func (m *SyncRun) ValidateAll() error { + return m.validate(true) +} + +func (m *SyncRun) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Id + + if all { + switch v := interface{}(m.GetStartedAt()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SyncRunValidationError{ + field: "StartedAt", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SyncRunValidationError{ + field: "StartedAt", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStartedAt()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SyncRunValidationError{ + field: "StartedAt", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetEndedAt()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SyncRunValidationError{ + field: "EndedAt", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SyncRunValidationError{ + field: "EndedAt", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEndedAt()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SyncRunValidationError{ + field: "EndedAt", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for SyncToken + + // no validation rules for SyncType + + // no validation rules for ParentSyncId + + if len(errors) > 0 { + return SyncRunMultiError(errors) + } + + return nil +} + +// SyncRunMultiError is an error wrapping multiple validation errors returned +// by SyncRun.ValidateAll() if the designated constraints aren't met. +type SyncRunMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SyncRunMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SyncRunMultiError) AllErrors() []error { return m } + +// SyncRunValidationError is the validation error returned by SyncRun.Validate +// if the designated constraints aren't met. +type SyncRunValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SyncRunValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SyncRunValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SyncRunValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SyncRunValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SyncRunValidationError) ErrorName() string { return "SyncRunValidationError" } + +// Error satisfies the builtin error interface +func (e SyncRunValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sSyncRun.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SyncRunValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SyncRunValidationError{} + +// Validate checks the field values on SyncsReaderServiceGetSyncRequest with +// the rules defined in the proto definition for this message. If any rules +// are violated, the first error encountered is returned, or nil if there are +// no violations. +func (m *SyncsReaderServiceGetSyncRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SyncsReaderServiceGetSyncRequest with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// SyncsReaderServiceGetSyncRequestMultiError, or nil if none found. +func (m *SyncsReaderServiceGetSyncRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *SyncsReaderServiceGetSyncRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for SyncId + + for idx, item := range m.GetAnnotations() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SyncsReaderServiceGetSyncRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SyncsReaderServiceGetSyncRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SyncsReaderServiceGetSyncRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return SyncsReaderServiceGetSyncRequestMultiError(errors) + } + + return nil +} + +// SyncsReaderServiceGetSyncRequestMultiError is an error wrapping multiple +// validation errors returned by +// SyncsReaderServiceGetSyncRequest.ValidateAll() if the designated +// constraints aren't met. +type SyncsReaderServiceGetSyncRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SyncsReaderServiceGetSyncRequestMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SyncsReaderServiceGetSyncRequestMultiError) AllErrors() []error { return m } + +// SyncsReaderServiceGetSyncRequestValidationError is the validation error +// returned by SyncsReaderServiceGetSyncRequest.Validate if the designated +// constraints aren't met. +type SyncsReaderServiceGetSyncRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SyncsReaderServiceGetSyncRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SyncsReaderServiceGetSyncRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SyncsReaderServiceGetSyncRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SyncsReaderServiceGetSyncRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SyncsReaderServiceGetSyncRequestValidationError) ErrorName() string { + return "SyncsReaderServiceGetSyncRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e SyncsReaderServiceGetSyncRequestValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sSyncsReaderServiceGetSyncRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SyncsReaderServiceGetSyncRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SyncsReaderServiceGetSyncRequestValidationError{} + +// Validate checks the field values on SyncsReaderServiceGetSyncResponse with +// the rules defined in the proto definition for this message. If any rules +// are violated, the first error encountered is returned, or nil if there are +// no violations. +func (m *SyncsReaderServiceGetSyncResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SyncsReaderServiceGetSyncResponse +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// SyncsReaderServiceGetSyncResponseMultiError, or nil if none found. +func (m *SyncsReaderServiceGetSyncResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *SyncsReaderServiceGetSyncResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetSync()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SyncsReaderServiceGetSyncResponseValidationError{ + field: "Sync", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SyncsReaderServiceGetSyncResponseValidationError{ + field: "Sync", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSync()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SyncsReaderServiceGetSyncResponseValidationError{ + field: "Sync", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for idx, item := range m.GetAnnotations() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SyncsReaderServiceGetSyncResponseValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SyncsReaderServiceGetSyncResponseValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SyncsReaderServiceGetSyncResponseValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return SyncsReaderServiceGetSyncResponseMultiError(errors) + } + + return nil +} + +// SyncsReaderServiceGetSyncResponseMultiError is an error wrapping multiple +// validation errors returned by +// SyncsReaderServiceGetSyncResponse.ValidateAll() if the designated +// constraints aren't met. +type SyncsReaderServiceGetSyncResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SyncsReaderServiceGetSyncResponseMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SyncsReaderServiceGetSyncResponseMultiError) AllErrors() []error { return m } + +// SyncsReaderServiceGetSyncResponseValidationError is the validation error +// returned by SyncsReaderServiceGetSyncResponse.Validate if the designated +// constraints aren't met. +type SyncsReaderServiceGetSyncResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SyncsReaderServiceGetSyncResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SyncsReaderServiceGetSyncResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SyncsReaderServiceGetSyncResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SyncsReaderServiceGetSyncResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SyncsReaderServiceGetSyncResponseValidationError) ErrorName() string { + return "SyncsReaderServiceGetSyncResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e SyncsReaderServiceGetSyncResponseValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sSyncsReaderServiceGetSyncResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SyncsReaderServiceGetSyncResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SyncsReaderServiceGetSyncResponseValidationError{} + +// Validate checks the field values on SyncsReaderServiceListSyncsRequest with +// the rules defined in the proto definition for this message. If any rules +// are violated, the first error encountered is returned, or nil if there are +// no violations. +func (m *SyncsReaderServiceListSyncsRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SyncsReaderServiceListSyncsRequest +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// SyncsReaderServiceListSyncsRequestMultiError, or nil if none found. +func (m *SyncsReaderServiceListSyncsRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *SyncsReaderServiceListSyncsRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetPageSize() != 0 { + + if m.GetPageSize() > 250 { + err := SyncsReaderServiceListSyncsRequestValidationError{ + field: "PageSize", + reason: "value must be less than or equal to 250", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + if m.GetPageToken() != "" { + + if l := len(m.GetPageToken()); l < 1 || l > 2048 { + err := SyncsReaderServiceListSyncsRequestValidationError{ + field: "PageToken", + reason: "value length must be between 1 and 2048 bytes, inclusive", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + for idx, item := range m.GetAnnotations() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SyncsReaderServiceListSyncsRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SyncsReaderServiceListSyncsRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SyncsReaderServiceListSyncsRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return SyncsReaderServiceListSyncsRequestMultiError(errors) + } + + return nil +} + +// SyncsReaderServiceListSyncsRequestMultiError is an error wrapping multiple +// validation errors returned by +// SyncsReaderServiceListSyncsRequest.ValidateAll() if the designated +// constraints aren't met. +type SyncsReaderServiceListSyncsRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SyncsReaderServiceListSyncsRequestMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SyncsReaderServiceListSyncsRequestMultiError) AllErrors() []error { return m } + +// SyncsReaderServiceListSyncsRequestValidationError is the validation error +// returned by SyncsReaderServiceListSyncsRequest.Validate if the designated +// constraints aren't met. +type SyncsReaderServiceListSyncsRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SyncsReaderServiceListSyncsRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SyncsReaderServiceListSyncsRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SyncsReaderServiceListSyncsRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SyncsReaderServiceListSyncsRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SyncsReaderServiceListSyncsRequestValidationError) ErrorName() string { + return "SyncsReaderServiceListSyncsRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e SyncsReaderServiceListSyncsRequestValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sSyncsReaderServiceListSyncsRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SyncsReaderServiceListSyncsRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SyncsReaderServiceListSyncsRequestValidationError{} + +// Validate checks the field values on SyncsReaderServiceListSyncsResponse with +// the rules defined in the proto definition for this message. If any rules +// are violated, the first error encountered is returned, or nil if there are +// no violations. +func (m *SyncsReaderServiceListSyncsResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SyncsReaderServiceListSyncsResponse +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// SyncsReaderServiceListSyncsResponseMultiError, or nil if none found. +func (m *SyncsReaderServiceListSyncsResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *SyncsReaderServiceListSyncsResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetSyncs() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SyncsReaderServiceListSyncsResponseValidationError{ + field: fmt.Sprintf("Syncs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SyncsReaderServiceListSyncsResponseValidationError{ + field: fmt.Sprintf("Syncs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SyncsReaderServiceListSyncsResponseValidationError{ + field: fmt.Sprintf("Syncs[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if m.GetNextPageToken() != "" { + + if l := len(m.GetNextPageToken()); l < 1 || l > 2048 { + err := SyncsReaderServiceListSyncsResponseValidationError{ + field: "NextPageToken", + reason: "value length must be between 1 and 2048 bytes, inclusive", + } + if !all { + return err + } + errors = append(errors, err) + } + + } + + for idx, item := range m.GetAnnotations() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SyncsReaderServiceListSyncsResponseValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SyncsReaderServiceListSyncsResponseValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SyncsReaderServiceListSyncsResponseValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return SyncsReaderServiceListSyncsResponseMultiError(errors) + } + + return nil +} + +// SyncsReaderServiceListSyncsResponseMultiError is an error wrapping multiple +// validation errors returned by +// SyncsReaderServiceListSyncsResponse.ValidateAll() if the designated +// constraints aren't met. +type SyncsReaderServiceListSyncsResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SyncsReaderServiceListSyncsResponseMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SyncsReaderServiceListSyncsResponseMultiError) AllErrors() []error { return m } + +// SyncsReaderServiceListSyncsResponseValidationError is the validation error +// returned by SyncsReaderServiceListSyncsResponse.Validate if the designated +// constraints aren't met. +type SyncsReaderServiceListSyncsResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SyncsReaderServiceListSyncsResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SyncsReaderServiceListSyncsResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SyncsReaderServiceListSyncsResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SyncsReaderServiceListSyncsResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SyncsReaderServiceListSyncsResponseValidationError) ErrorName() string { + return "SyncsReaderServiceListSyncsResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e SyncsReaderServiceListSyncsResponseValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sSyncsReaderServiceListSyncsResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SyncsReaderServiceListSyncsResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SyncsReaderServiceListSyncsResponseValidationError{} + +// Validate checks the field values on +// SyncsReaderServiceGetLatestFinishedSyncRequest with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *SyncsReaderServiceGetLatestFinishedSyncRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// SyncsReaderServiceGetLatestFinishedSyncRequest with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in +// SyncsReaderServiceGetLatestFinishedSyncRequestMultiError, or nil if none found. +func (m *SyncsReaderServiceGetLatestFinishedSyncRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *SyncsReaderServiceGetLatestFinishedSyncRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetAnnotations() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SyncsReaderServiceGetLatestFinishedSyncRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SyncsReaderServiceGetLatestFinishedSyncRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SyncsReaderServiceGetLatestFinishedSyncRequestValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + // no validation rules for SyncType + + if len(errors) > 0 { + return SyncsReaderServiceGetLatestFinishedSyncRequestMultiError(errors) + } + + return nil +} + +// SyncsReaderServiceGetLatestFinishedSyncRequestMultiError is an error +// wrapping multiple validation errors returned by +// SyncsReaderServiceGetLatestFinishedSyncRequest.ValidateAll() if the +// designated constraints aren't met. +type SyncsReaderServiceGetLatestFinishedSyncRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SyncsReaderServiceGetLatestFinishedSyncRequestMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SyncsReaderServiceGetLatestFinishedSyncRequestMultiError) AllErrors() []error { return m } + +// SyncsReaderServiceGetLatestFinishedSyncRequestValidationError is the +// validation error returned by +// SyncsReaderServiceGetLatestFinishedSyncRequest.Validate if the designated +// constraints aren't met. +type SyncsReaderServiceGetLatestFinishedSyncRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SyncsReaderServiceGetLatestFinishedSyncRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SyncsReaderServiceGetLatestFinishedSyncRequestValidationError) Reason() string { + return e.reason +} + +// Cause function returns cause value. +func (e SyncsReaderServiceGetLatestFinishedSyncRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SyncsReaderServiceGetLatestFinishedSyncRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SyncsReaderServiceGetLatestFinishedSyncRequestValidationError) ErrorName() string { + return "SyncsReaderServiceGetLatestFinishedSyncRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e SyncsReaderServiceGetLatestFinishedSyncRequestValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sSyncsReaderServiceGetLatestFinishedSyncRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SyncsReaderServiceGetLatestFinishedSyncRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SyncsReaderServiceGetLatestFinishedSyncRequestValidationError{} + +// Validate checks the field values on +// SyncsReaderServiceGetLatestFinishedSyncResponse with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *SyncsReaderServiceGetLatestFinishedSyncResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// SyncsReaderServiceGetLatestFinishedSyncResponse with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in +// SyncsReaderServiceGetLatestFinishedSyncResponseMultiError, or nil if none found. +func (m *SyncsReaderServiceGetLatestFinishedSyncResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *SyncsReaderServiceGetLatestFinishedSyncResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetSync()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SyncsReaderServiceGetLatestFinishedSyncResponseValidationError{ + field: "Sync", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SyncsReaderServiceGetLatestFinishedSyncResponseValidationError{ + field: "Sync", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSync()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SyncsReaderServiceGetLatestFinishedSyncResponseValidationError{ + field: "Sync", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for idx, item := range m.GetAnnotations() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SyncsReaderServiceGetLatestFinishedSyncResponseValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SyncsReaderServiceGetLatestFinishedSyncResponseValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SyncsReaderServiceGetLatestFinishedSyncResponseValidationError{ + field: fmt.Sprintf("Annotations[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return SyncsReaderServiceGetLatestFinishedSyncResponseMultiError(errors) + } + + return nil +} + +// SyncsReaderServiceGetLatestFinishedSyncResponseMultiError is an error +// wrapping multiple validation errors returned by +// SyncsReaderServiceGetLatestFinishedSyncResponse.ValidateAll() if the +// designated constraints aren't met. +type SyncsReaderServiceGetLatestFinishedSyncResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SyncsReaderServiceGetLatestFinishedSyncResponseMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SyncsReaderServiceGetLatestFinishedSyncResponseMultiError) AllErrors() []error { return m } + +// SyncsReaderServiceGetLatestFinishedSyncResponseValidationError is the +// validation error returned by +// SyncsReaderServiceGetLatestFinishedSyncResponse.Validate if the designated +// constraints aren't met. +type SyncsReaderServiceGetLatestFinishedSyncResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SyncsReaderServiceGetLatestFinishedSyncResponseValidationError) Field() string { + return e.field +} + +// Reason function returns reason value. +func (e SyncsReaderServiceGetLatestFinishedSyncResponseValidationError) Reason() string { + return e.reason +} + +// Cause function returns cause value. +func (e SyncsReaderServiceGetLatestFinishedSyncResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SyncsReaderServiceGetLatestFinishedSyncResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SyncsReaderServiceGetLatestFinishedSyncResponseValidationError) ErrorName() string { + return "SyncsReaderServiceGetLatestFinishedSyncResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e SyncsReaderServiceGetLatestFinishedSyncResponseValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sSyncsReaderServiceGetLatestFinishedSyncResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SyncsReaderServiceGetLatestFinishedSyncResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SyncsReaderServiceGetLatestFinishedSyncResponseValidationError{} diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/sync_grpc.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/sync_grpc.pb.go new file mode 100644 index 00000000..c9dc9e3c --- /dev/null +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/reader/v2/sync_grpc.pb.go @@ -0,0 +1,195 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc (unknown) +// source: c1/reader/v2/sync.proto + +package v2 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + SyncsReaderService_GetSync_FullMethodName = "/c1.reader.v2.SyncsReaderService/GetSync" + SyncsReaderService_ListSyncs_FullMethodName = "/c1.reader.v2.SyncsReaderService/ListSyncs" + SyncsReaderService_GetLatestFinishedSync_FullMethodName = "/c1.reader.v2.SyncsReaderService/GetLatestFinishedSync" +) + +// SyncsReaderServiceClient is the client API for SyncsReaderService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type SyncsReaderServiceClient interface { + GetSync(ctx context.Context, in *SyncsReaderServiceGetSyncRequest, opts ...grpc.CallOption) (*SyncsReaderServiceGetSyncResponse, error) + ListSyncs(ctx context.Context, in *SyncsReaderServiceListSyncsRequest, opts ...grpc.CallOption) (*SyncsReaderServiceListSyncsResponse, error) + GetLatestFinishedSync(ctx context.Context, in *SyncsReaderServiceGetLatestFinishedSyncRequest, opts ...grpc.CallOption) (*SyncsReaderServiceGetLatestFinishedSyncResponse, error) +} + +type syncsReaderServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewSyncsReaderServiceClient(cc grpc.ClientConnInterface) SyncsReaderServiceClient { + return &syncsReaderServiceClient{cc} +} + +func (c *syncsReaderServiceClient) GetSync(ctx context.Context, in *SyncsReaderServiceGetSyncRequest, opts ...grpc.CallOption) (*SyncsReaderServiceGetSyncResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SyncsReaderServiceGetSyncResponse) + err := c.cc.Invoke(ctx, SyncsReaderService_GetSync_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *syncsReaderServiceClient) ListSyncs(ctx context.Context, in *SyncsReaderServiceListSyncsRequest, opts ...grpc.CallOption) (*SyncsReaderServiceListSyncsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SyncsReaderServiceListSyncsResponse) + err := c.cc.Invoke(ctx, SyncsReaderService_ListSyncs_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *syncsReaderServiceClient) GetLatestFinishedSync(ctx context.Context, in *SyncsReaderServiceGetLatestFinishedSyncRequest, opts ...grpc.CallOption) (*SyncsReaderServiceGetLatestFinishedSyncResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SyncsReaderServiceGetLatestFinishedSyncResponse) + err := c.cc.Invoke(ctx, SyncsReaderService_GetLatestFinishedSync_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// SyncsReaderServiceServer is the server API for SyncsReaderService service. +// All implementations should embed UnimplementedSyncsReaderServiceServer +// for forward compatibility. +type SyncsReaderServiceServer interface { + GetSync(context.Context, *SyncsReaderServiceGetSyncRequest) (*SyncsReaderServiceGetSyncResponse, error) + ListSyncs(context.Context, *SyncsReaderServiceListSyncsRequest) (*SyncsReaderServiceListSyncsResponse, error) + GetLatestFinishedSync(context.Context, *SyncsReaderServiceGetLatestFinishedSyncRequest) (*SyncsReaderServiceGetLatestFinishedSyncResponse, error) +} + +// UnimplementedSyncsReaderServiceServer should be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedSyncsReaderServiceServer struct{} + +func (UnimplementedSyncsReaderServiceServer) GetSync(context.Context, *SyncsReaderServiceGetSyncRequest) (*SyncsReaderServiceGetSyncResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetSync not implemented") +} +func (UnimplementedSyncsReaderServiceServer) ListSyncs(context.Context, *SyncsReaderServiceListSyncsRequest) (*SyncsReaderServiceListSyncsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListSyncs not implemented") +} +func (UnimplementedSyncsReaderServiceServer) GetLatestFinishedSync(context.Context, *SyncsReaderServiceGetLatestFinishedSyncRequest) (*SyncsReaderServiceGetLatestFinishedSyncResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetLatestFinishedSync not implemented") +} +func (UnimplementedSyncsReaderServiceServer) testEmbeddedByValue() {} + +// UnsafeSyncsReaderServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to SyncsReaderServiceServer will +// result in compilation errors. +type UnsafeSyncsReaderServiceServer interface { + mustEmbedUnimplementedSyncsReaderServiceServer() +} + +func RegisterSyncsReaderServiceServer(s grpc.ServiceRegistrar, srv SyncsReaderServiceServer) { + // If the following call pancis, it indicates UnimplementedSyncsReaderServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&SyncsReaderService_ServiceDesc, srv) +} + +func _SyncsReaderService_GetSync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SyncsReaderServiceGetSyncRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SyncsReaderServiceServer).GetSync(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SyncsReaderService_GetSync_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SyncsReaderServiceServer).GetSync(ctx, req.(*SyncsReaderServiceGetSyncRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SyncsReaderService_ListSyncs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SyncsReaderServiceListSyncsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SyncsReaderServiceServer).ListSyncs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SyncsReaderService_ListSyncs_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SyncsReaderServiceServer).ListSyncs(ctx, req.(*SyncsReaderServiceListSyncsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SyncsReaderService_GetLatestFinishedSync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SyncsReaderServiceGetLatestFinishedSyncRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SyncsReaderServiceServer).GetLatestFinishedSync(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SyncsReaderService_GetLatestFinishedSync_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SyncsReaderServiceServer).GetLatestFinishedSync(ctx, req.(*SyncsReaderServiceGetLatestFinishedSyncRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// SyncsReaderService_ServiceDesc is the grpc.ServiceDesc for SyncsReaderService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var SyncsReaderService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "c1.reader.v2.SyncsReaderService", + HandlerType: (*SyncsReaderServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetSync", + Handler: _SyncsReaderService_GetSync_Handler, + }, + { + MethodName: "ListSyncs", + Handler: _SyncsReaderService_ListSyncs_Handler, + }, + { + MethodName: "GetLatestFinishedSync", + Handler: _SyncsReaderService_GetLatestFinishedSync_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "c1/reader/v2/sync.proto", +} diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/transport/v1/transport.pb.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/transport/v1/transport.pb.go new file mode 100644 index 00000000..a899c5f6 --- /dev/null +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/transport/v1/transport.pb.go @@ -0,0 +1,246 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.4 +// protoc (unknown) +// source: c1/transport/v1/transport.proto + +package v1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + anypb "google.golang.org/protobuf/types/known/anypb" + structpb "google.golang.org/protobuf/types/known/structpb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Request struct { + state protoimpl.MessageState `protogen:"open.v1"` + Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"` + Req *anypb.Any `protobuf:"bytes,2,opt,name=req,proto3" json:"req,omitempty"` + Headers *structpb.Struct `protobuf:"bytes,3,opt,name=headers,proto3" json:"headers,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Request) Reset() { + *x = Request{} + mi := &file_c1_transport_v1_transport_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Request) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Request) ProtoMessage() {} + +func (x *Request) ProtoReflect() protoreflect.Message { + mi := &file_c1_transport_v1_transport_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Request.ProtoReflect.Descriptor instead. +func (*Request) Descriptor() ([]byte, []int) { + return file_c1_transport_v1_transport_proto_rawDescGZIP(), []int{0} +} + +func (x *Request) GetMethod() string { + if x != nil { + return x.Method + } + return "" +} + +func (x *Request) GetReq() *anypb.Any { + if x != nil { + return x.Req + } + return nil +} + +func (x *Request) GetHeaders() *structpb.Struct { + if x != nil { + return x.Headers + } + return nil +} + +type Response struct { + state protoimpl.MessageState `protogen:"open.v1"` + Resp *anypb.Any `protobuf:"bytes,1,opt,name=resp,proto3" json:"resp,omitempty"` + Status *anypb.Any `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` + Headers *structpb.Struct `protobuf:"bytes,3,opt,name=headers,proto3" json:"headers,omitempty"` + Trailers *structpb.Struct `protobuf:"bytes,4,opt,name=trailers,proto3" json:"trailers,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Response) Reset() { + *x = Response{} + mi := &file_c1_transport_v1_transport_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Response) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Response) ProtoMessage() {} + +func (x *Response) ProtoReflect() protoreflect.Message { + mi := &file_c1_transport_v1_transport_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Response.ProtoReflect.Descriptor instead. +func (*Response) Descriptor() ([]byte, []int) { + return file_c1_transport_v1_transport_proto_rawDescGZIP(), []int{1} +} + +func (x *Response) GetResp() *anypb.Any { + if x != nil { + return x.Resp + } + return nil +} + +func (x *Response) GetStatus() *anypb.Any { + if x != nil { + return x.Status + } + return nil +} + +func (x *Response) GetHeaders() *structpb.Struct { + if x != nil { + return x.Headers + } + return nil +} + +func (x *Response) GetTrailers() *structpb.Struct { + if x != nil { + return x.Trailers + } + return nil +} + +var File_c1_transport_v1_transport_proto protoreflect.FileDescriptor + +var file_c1_transport_v1_transport_proto_rawDesc = string([]byte{ + 0x0a, 0x1f, 0x63, 0x31, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x76, + 0x31, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x0f, 0x63, 0x31, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, + 0x76, 0x31, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, + 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7c, 0x0a, 0x07, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x26, + 0x0a, 0x03, 0x72, 0x65, 0x71, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, + 0x79, 0x52, 0x03, 0x72, 0x65, 0x71, 0x12, 0x31, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, + 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x22, 0xca, 0x01, 0x0a, 0x08, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x04, 0x72, 0x65, 0x73, 0x70, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x04, 0x72, 0x65, 0x73, 0x70, + 0x12, 0x2c, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x31, + 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x73, 0x12, 0x33, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x08, 0x74, 0x72, + 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x6f, 0x6e, + 0x65, 0x2f, 0x62, 0x61, 0x74, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x2f, 0x63, + 0x31, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +}) + +var ( + file_c1_transport_v1_transport_proto_rawDescOnce sync.Once + file_c1_transport_v1_transport_proto_rawDescData []byte +) + +func file_c1_transport_v1_transport_proto_rawDescGZIP() []byte { + file_c1_transport_v1_transport_proto_rawDescOnce.Do(func() { + file_c1_transport_v1_transport_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_c1_transport_v1_transport_proto_rawDesc), len(file_c1_transport_v1_transport_proto_rawDesc))) + }) + return file_c1_transport_v1_transport_proto_rawDescData +} + +var file_c1_transport_v1_transport_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_c1_transport_v1_transport_proto_goTypes = []any{ + (*Request)(nil), // 0: c1.transport.v1.Request + (*Response)(nil), // 1: c1.transport.v1.Response + (*anypb.Any)(nil), // 2: google.protobuf.Any + (*structpb.Struct)(nil), // 3: google.protobuf.Struct +} +var file_c1_transport_v1_transport_proto_depIdxs = []int32{ + 2, // 0: c1.transport.v1.Request.req:type_name -> google.protobuf.Any + 3, // 1: c1.transport.v1.Request.headers:type_name -> google.protobuf.Struct + 2, // 2: c1.transport.v1.Response.resp:type_name -> google.protobuf.Any + 2, // 3: c1.transport.v1.Response.status:type_name -> google.protobuf.Any + 3, // 4: c1.transport.v1.Response.headers:type_name -> google.protobuf.Struct + 3, // 5: c1.transport.v1.Response.trailers:type_name -> google.protobuf.Struct + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_c1_transport_v1_transport_proto_init() } +func file_c1_transport_v1_transport_proto_init() { + if File_c1_transport_v1_transport_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_c1_transport_v1_transport_proto_rawDesc), len(file_c1_transport_v1_transport_proto_rawDesc)), + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_c1_transport_v1_transport_proto_goTypes, + DependencyIndexes: file_c1_transport_v1_transport_proto_depIdxs, + MessageInfos: file_c1_transport_v1_transport_proto_msgTypes, + }.Build() + File_c1_transport_v1_transport_proto = out.File + file_c1_transport_v1_transport_proto_goTypes = nil + file_c1_transport_v1_transport_proto_depIdxs = nil +} diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/transport/v1/transport.pb.validate.go b/vendor/github.com/conductorone/baton-sdk/pb/c1/transport/v1/transport.pb.validate.go new file mode 100644 index 00000000..a85bbaba --- /dev/null +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/transport/v1/transport.pb.validate.go @@ -0,0 +1,409 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: c1/transport/v1/transport.proto + +package v1 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Request with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *Request) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Request with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in RequestMultiError, or nil if none found. +func (m *Request) ValidateAll() error { + return m.validate(true) +} + +func (m *Request) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Method + + if all { + switch v := interface{}(m.GetReq()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RequestValidationError{ + field: "Req", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RequestValidationError{ + field: "Req", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetReq()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RequestValidationError{ + field: "Req", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetHeaders()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RequestValidationError{ + field: "Headers", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RequestValidationError{ + field: "Headers", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHeaders()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RequestValidationError{ + field: "Headers", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return RequestMultiError(errors) + } + + return nil +} + +// RequestMultiError is an error wrapping multiple validation errors returned +// by Request.ValidateAll() if the designated constraints aren't met. +type RequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RequestMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RequestMultiError) AllErrors() []error { return m } + +// RequestValidationError is the validation error returned by Request.Validate +// if the designated constraints aren't met. +type RequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RequestValidationError) ErrorName() string { return "RequestValidationError" } + +// Error satisfies the builtin error interface +func (e RequestValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RequestValidationError{} + +// Validate checks the field values on Response with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *Response) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Response with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ResponseMultiError, or nil +// if none found. +func (m *Response) ValidateAll() error { + return m.validate(true) +} + +func (m *Response) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetResp()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ResponseValidationError{ + field: "Resp", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ResponseValidationError{ + field: "Resp", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetResp()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ResponseValidationError{ + field: "Resp", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetStatus()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ResponseValidationError{ + field: "Status", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ResponseValidationError{ + field: "Status", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStatus()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ResponseValidationError{ + field: "Status", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetHeaders()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ResponseValidationError{ + field: "Headers", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ResponseValidationError{ + field: "Headers", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetHeaders()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ResponseValidationError{ + field: "Headers", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetTrailers()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ResponseValidationError{ + field: "Trailers", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ResponseValidationError{ + field: "Trailers", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTrailers()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ResponseValidationError{ + field: "Trailers", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return ResponseMultiError(errors) + } + + return nil +} + +// ResponseMultiError is an error wrapping multiple validation errors returned +// by Response.ValidateAll() if the designated constraints aren't met. +type ResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ResponseMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ResponseMultiError) AllErrors() []error { return m } + +// ResponseValidationError is the validation error returned by +// Response.Validate if the designated constraints aren't met. +type ResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ResponseValidationError) ErrorName() string { return "ResponseValidationError" } + +// Error satisfies the builtin error interface +func (e ResponseValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ResponseValidationError{} diff --git a/vendor/github.com/conductorone/baton-sdk/pb/c1/transport/v1/transport.proto b/vendor/github.com/conductorone/baton-sdk/pb/c1/transport/v1/transport.proto new file mode 100644 index 00000000..94efa33c --- /dev/null +++ b/vendor/github.com/conductorone/baton-sdk/pb/c1/transport/v1/transport.proto @@ -0,0 +1,22 @@ +syntax = "proto3"; + +package c1.svc.transport.v1; + +import "google/protobuf/struct.proto"; +import "google/protobuf/any.proto"; + + +option go_package = "github.com/conductorone/baton-sdk/pb/c1/transport/v1"; + +message Request { + string method = 1; + google.protobuf.Any req = 2; + google.protobuf.Struct headers = 3; +} + +message Response { + google.protobuf.Any resp = 1; + google.protobuf.Any status = 2; + google.protobuf.Struct headers = 3; + google.protobuf.Struct trailers = 4; +} \ No newline at end of file diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/annotations/annotations.go b/vendor/github.com/conductorone/baton-sdk/pkg/annotations/annotations.go index e1284bd1..0f062108 100644 --- a/vendor/github.com/conductorone/baton-sdk/pkg/annotations/annotations.go +++ b/vendor/github.com/conductorone/baton-sdk/pkg/annotations/annotations.go @@ -3,6 +3,7 @@ package annotations import ( "fmt" + c1zpb "github.com/conductorone/baton-sdk/pb/c1/c1z/v1" v2 "github.com/conductorone/baton-sdk/pb/c1/connector/v2" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/known/anypb" @@ -84,6 +85,22 @@ func (a *Annotations) Contains(msg proto.Message) bool { return false } +func (a *Annotations) ContainsAny(msgs ...proto.Message) bool { + if len(msgs) == 0 { + return false + } + + for _, v := range *a { + for _, msg := range msgs { + if v.MessageIs(msg) { + return true + } + } + } + + return false +} + // Pick checks if the message is in the annotations slice. func (a *Annotations) Pick(needle proto.Message) (bool, error) { if needle == nil { @@ -106,3 +123,16 @@ func (a *Annotations) WithRateLimiting(rateLimit *v2.RateLimitDescription) *Anno a.Update(rateLimit) return a } + +func GetSyncIdFromAnnotations(annos Annotations) (string, error) { + syncDetails := &c1zpb.SyncDetails{} + ok, err := annos.Pick(syncDetails) + if err != nil { + return "", err + } + if ok { + return syncDetails.GetId(), nil + } + + return "", nil +} diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/auth/jwt.go b/vendor/github.com/conductorone/baton-sdk/pkg/auth/jwt.go new file mode 100644 index 00000000..bc54390b --- /dev/null +++ b/vendor/github.com/conductorone/baton-sdk/pkg/auth/jwt.go @@ -0,0 +1,143 @@ +package auth + +import ( + "context" + "encoding/json" + "fmt" + "time" + + "github.com/go-jose/go-jose/v4" + "github.com/pquerna/xjwt" + "github.com/pquerna/xjwt/xkeyset" +) + +// Config holds the configuration for JWT validation. +type Config struct { + PublicKeyJWK string // JWK format public key + JWKSUrl string // URL to JWKS endpoint (mutually exclusive with PublicKeyJWK) + Issuer string // Expected issuer + Subject string // Expected subject (optional) + Audience string // Expected audience (optional) + Nonce string // Expected nonce (optional) + MaxExpirationFromNow time.Duration // Maximum expiration time from now (optional, defaults to 24 hours) +} + +type KeySet interface { + Get() (*jose.JSONWebKeySet, error) +} + +// Validator handles JWT validation with a specific configuration. +type Validator struct { + config Config + keySet KeySet + + now func() time.Time +} + +type staticKeySet struct { + keyset *jose.JSONWebKeySet +} + +func (s *staticKeySet) Get() (*jose.JSONWebKeySet, error) { + return s.keyset, nil +} + +// NewValidator creates a new JWT validator with the given configuration. +func NewValidator(ctx context.Context, config Config) (*Validator, error) { + // Ensure only one key source is provided. + if config.PublicKeyJWK != "" && config.JWKSUrl != "" { + return nil, fmt.Errorf("cannot specify both PublicKeyJWK and JWKSUrl") + } + if config.PublicKeyJWK == "" && config.JWKSUrl == "" { + return nil, fmt.Errorf("must specify either PublicKeyJWK or JWKSUrl") + } + + var keySet KeySet + if config.PublicKeyJWK != "" { + var jwk jose.JSONWebKey + if err := json.Unmarshal([]byte(config.PublicKeyJWK), &jwk); err != nil { + return nil, fmt.Errorf("failed to parse JWK: %w", err) + } + + if !jwk.Valid() { + return nil, fmt.Errorf("invalid JWK") + } + + // Create a key set with the single key. + keySet = &staticKeySet{ + keyset: &jose.JSONWebKeySet{ + Keys: []jose.JSONWebKey{jwk}, + }, + } + } else { + // Use JWKS URL. + remoteKeySet, err := xkeyset.New(ctx, xkeyset.Options{ + URL: config.JWKSUrl, + RefreshContext: ctx, + }) + if err != nil { + return nil, fmt.Errorf("failed to create keyset from JWKS URL: %w", err) + } + + // Load the cache. + _, err = remoteKeySet.Get() + if err != nil { + return nil, fmt.Errorf("failed to get keyset from JWKS URL: %w", err) + } + keySet = remoteKeySet + } + + // Set default MaxExpiry if not specified. + if config.MaxExpirationFromNow == 0 { + config.MaxExpirationFromNow = 24 * time.Hour // TODO(morgabra): ?? + } + + return &Validator{ + config: config, + keySet: keySet, + now: time.Now, + }, nil +} + +// ValidateToken validates the JWT token string and returns the claims if valid. +func (v *Validator) ValidateToken(ctx context.Context, token string) (map[string]interface{}, error) { + if token == "" { + return nil, fmt.Errorf("token is empty") + } + + keyset, err := v.keySet.Get() + if err != nil { + return nil, fmt.Errorf("failed to get keyset: %w", err) + } + + // Now validate the token. + vc := xjwt.VerifyConfig{ + ExpectedIssuer: v.config.Issuer, + ExpectedSubject: v.config.Subject, + ExpectedAudience: v.config.Audience, + ExpectedNonce: v.config.Nonce, + KeySet: keyset, + Now: v.now, + MaxExpirationFromNow: v.config.MaxExpirationFromNow, + ExpectSSignatureAlgorithms: []jose.SignatureAlgorithm{}, + } + + data, err := xjwt.Verify([]byte(token), vc) + if err != nil { + return nil, fmt.Errorf("token is invalid: %w", err) + } + + return data, nil +} + +// ExtractBearerToken extracts the bearer token from the Authorization header. +func ExtractBearerToken(authHeader string) (string, error) { + const prefix = "Bearer " + if authHeader == "" { + return "", fmt.Errorf("missing Authorization header") + } + if len(authHeader) <= len(prefix) || authHeader[:len(prefix)] != prefix { + return "", fmt.Errorf("invalid Authorization header format") + } + return authHeader[len(prefix):], nil +} diff --git a/vendor/github.com/conductorone/baton-sdk/pkg/bid/bid.go b/vendor/github.com/conductorone/baton-sdk/pkg/bid/bid.go new file mode 100644 index 00000000..bf639b78 --- /dev/null +++ b/vendor/github.com/conductorone/baton-sdk/pkg/bid/bid.go @@ -0,0 +1,193 @@ +/* +Package bid implements functions to create and parse Baton IDs. + +Baton IDs are standardized identifiers for Baton resources, entitlements, and grants. +They are not required when writing a connector, but they should help make serializing and deserializing IDs easier. + +Format: + +Resource: `bid:r: